MDL-25290 cache: Fixed up memcache server settings and a couple of minor things
authorSam Hemelryk <sam@moodle.com>
Tue, 18 Sep 2012 04:21:21 +0000 (16:21 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 7 Oct 2012 20:53:52 +0000 (09:53 +1300)
cache/renderer.php
cache/stores/memcache/lib.php
cache/stores/memcached/lib.php
theme/base/style/admin.css

index e0459b1..1d89f61 100644 (file)
@@ -214,7 +214,7 @@ class core_cache_renderer extends plugin_renderer_base {
             'mappings',
             'actions'
         );
-        $table->data = array('none', 'cache');
+        $table->data = array();
 
         $none = new lang_string('none', 'cache');
         foreach ($definitions as $id => $definition) {
index d00eb63..6d4c33f 100644 (file)
@@ -90,6 +90,9 @@ class cachestore_memcache implements cache_store {
             // Nothing configured.
             return;
         }
+        if (!is_array($configuration['servers'])) {
+            $configuration['servers'] = array($configuration['servers']);
+        }
         foreach ($configuration['servers'] as $server) {
             if (!is_array($server)) {
                 $server = explode(':', $server, 3);
index 2910aa7..af74c41 100644 (file)
@@ -96,6 +96,9 @@ class cachestore_memcached implements cache_store {
             // Nothing configured.
             return;
         }
+        if (!is_array($configuration['servers'])) {
+            $configuration['servers'] = array($configuration['servers']);
+        }
 
         $compression = array_key_exists('compression', $configuration) ? (bool)$configuration['compression'] : true;
         if (array_key_exists('serialiser', $configuration)) {
index 8b7b19a..ff933b9 100644 (file)
 
 #core-cache-plugin-summaries table,
 #core-cache-store-summaries table {width:100%;}
+#core-cache-lock-summary table,
 #core-cache-definition-summaries table,
 #core-cache-mode-mappings table {margin:0 auto;}
 #core-cache-store-summaries .default-store td {color:#333;font-style: italic;}