diff --git a/.gitignore b/.gitignore index daf3eea..deb58b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ config.inc.php *.phar vendor +*.idea diff --git a/composer.json b/composer.json index 24fb027..fd6edaf 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "erik-dubbelboer/php-redis-admin", "description": "Simple web interface to manage Redis databases.", - "version": "1.1.0", + "version": "1.1.1", "license": "CC-BY-ND", "homepage": "https://github.com/ErikDubbelboer/phpRedisAdmin", "authors": [ diff --git a/includes/functions.inc.php b/includes/functions.inc.php index 3f49f4b..5e10ded 100644 --- a/includes/functions.inc.php +++ b/includes/functions.inc.php @@ -64,3 +64,15 @@ function str_rand($length) { return $r; } +/** + * Return relative file URL with actual timestamp (last mod) + * + * @author Fabian Lenczewski + * @since 2014-06-23 + * + * @param $name + * @return string + */ +function loadStaticFile($name) { + return file_exists($name) ? $name .'?rev='. filemtime($name) : $name; +} \ No newline at end of file diff --git a/includes/header.inc.php b/includes/header.inc.php index 368da14..aa618f1 100644 --- a/includes/header.inc.php +++ b/includes/header.inc.php @@ -1,5 +1,7 @@ - phpRedisAdmin - + - + diff --git a/index.php b/index.php index 5f1be31..d142f99 100644 --- a/index.php +++ b/index.php @@ -49,7 +49,6 @@ function print_namespace($item, $name, $fullkey, $islast) { // Unset it so we won't loop over it when printing this namespace. unset($item['__phpredisadmin__']); - $type = $redis->type($fullkey); $class = array(); $len = false; @@ -62,7 +61,7 @@ function print_namespace($item, $name, $fullkey, $islast) { // Get the number of items in the key. if (!isset($config['faster']) || !$config['faster']) { - switch ($type) { + switch ($redis->type($fullkey)) { case 'hash': $len = $redis->hLen($fullkey); break;