Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/erikdubbelboer/phpRedisAdmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut K. C. Tessarek <tessarek@evermeet.cx>2019-11-25 22:46:35 +0300
committerErik Dubbelboer <erik@dubbelboer.com>2019-11-25 22:46:35 +0300
commit8c7bfcfe7a7bee5e2a0ede68eb95d29450682d93 (patch)
tree464695668fd27d92a81fd712cf6dd4503c6561c7
parentc291de34a179faefa84ea53bee89176a5d380817 (diff)
minor changes (#156)
* change order of evaluation PHP evaluates conditions from left to right count needs more instructions thus should be on the right side (probably not necessary, but I'm a perf guy...) * set a default in case it is not set in confg (to avoid PHP warnings)
-rw-r--r--includes/common.inc.php4
-rw-r--r--index.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/includes/common.inc.php b/includes/common.inc.php
index c50a2f3..ca63814 100644
--- a/includes/common.inc.php
+++ b/includes/common.inc.php
@@ -115,6 +115,10 @@ if (!isset($config['hideEmptyDBs'])) {
$config['hideEmptyDBs'] = false;
}
+if (!isset($config['showEmptyNamespaceAsKey'])) {
+ $config['showEmptyNamespaceAsKey'] = false;
+}
+
// Setup a connection to Redis.
if(isset($server['scheme']) && $server['scheme'] === 'unix' && $server['path']) {
$redis = new Predis\Client(array('scheme' => 'unix', 'path' => $server['path']));
diff --git a/index.php b/index.php
index fa0c51e..5ea3b25 100644
--- a/index.php
+++ b/index.php
@@ -34,7 +34,7 @@ if($redis) {
}
$key = explode($server['seperator'], $key);
- if ($key[count($key) - 1] == '' && $config['showEmptyNamespaceAsKey']) {
+ if ($config['showEmptyNamespaceAsKey'] && $key[count($key) - 1] == '') {
array_pop($key);
$key[count($key) - 1] .= ':';
}