diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2012-08-19 18:31:15 +0400 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2012-08-19 18:31:15 +0400 |
commit | 306b73dfb8e13d2a9f1c2da1c7f7bc8ddf7777ea (patch) | |
tree | 6788d94ca7462fc7a38aa1b8710415c99fba3356 /view.php | |
parent | 9fcb29db0d6753a6645d964b01b9a3087f3b3811 (diff) |
Now usable without php module.
- Changed phpredis to predis.
Diffstat (limited to 'view.php')
-rw-r--r-- | view.php | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -49,7 +49,6 @@ if (!$exists) { $alt = false; -$type = $redistypes[$type]; $ttl = $redis->ttl($_GET['key']); $encoding = $redis->object('encoding', $_GET['key']); @@ -66,7 +65,7 @@ switch ($type) { break; case 'list': - $size = $redis->lSize($_GET['key']); + $size = $redis->lLen($_GET['key']); break; case 'set': @@ -139,7 +138,7 @@ else if ($type == 'list') { ?> <tr><th><div>Index</div></th><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr> <?php for ($i = 0; $i < $size; ++$i) { - $value = $redis->lGet($_GET['key'], $i); + $value = $redis->lIndex($_GET['key'], $i); ?> <tr <?php echo $alt ? 'class="alt"' : ''?>><td><div><?php echo $i?></div></td><td><div><?php echo nl2br(format_html($value))?></div></td><td><div> <a href="edit.php?s=<?php echo $server['id']?>&type=list&key=<?php echo urlencode($_GET['key'])?>&index=<?php echo $i?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> |