Skip to content

Commit 65880d3

Browse files
tessuserikdubbelboer
authored andcommitted
fix reset stat code (erikdubbelboer#152)
as mentioned earlier the method 'resetstat' does not exist and therefore the test will always be false. config resetstat is part of redis forever, so there's no reason for testing for this functionality.
1 parent 484714a commit 65880d3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

info.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66

77

8-
if (isset($_GET['reset']) && method_exists($redis, 'resetStat')) {
9-
$redis->resetStat();
8+
if (isset($_GET['reset'])) {
9+
$redis->config('resetstat');
1010

1111
header('Location: info.php');
1212
die;
@@ -29,11 +29,9 @@
2929
?>
3030
<h2>Info</h2>
3131

32-
<?php if (method_exists($redis, 'resetStat')) { ?>
3332
<p>
34-
<a href="http://github.com/?reset&amp;s=%3Cspan%20class="pl-ent"><?php echo $server['id']?>&amp;d=<?php echo $server['db']?>" class="reset">Reset usage statistics</a>
33+
<a href="http://github.com/?reset%3Cspan%20class="x x-first x-last">=1&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>" class="reset">Reset usage statistics</a>
3534
</p>
36-
<?php } ?>
3735

3836
<table>
3937
<tr><th><div>Key</div></th><th><div>Value</div></th></tr>

0 commit comments

Comments
 (0)