]> git.mjollnir.org Git - moodle.git/commitdiff
eaccelerator: never set the mode if we failed to init
authormartinlanghoff <martinlanghoff>
Thu, 20 Sep 2007 06:51:13 +0000 (06:51 +0000)
committermartinlanghoff <martinlanghoff>
Thu, 20 Sep 2007 06:51:13 +0000 (06:51 +0000)
lib/eaccelerator.class.php

index 4f0b709f21dbefa3b34521660a9ad8042df3d345..6ead149e1227f209ae3ed82e0a755c6379662d51 100644 (file)
@@ -22,14 +22,13 @@ class eaccelerator {
     function eaccelerator() {
         global $CFG;
         if ( function_exists('eaccelerator_get')) {
-            $mode = 'eaccelerator';
+            $this->mode = 'eaccelerator';
         } elseif (function_exists('mmcache_get')) {
-            $mode = 'mmcache';
+            $this->mode = 'mmcache';
         } else {
             debugging("\$CFG->eaccelerator is set to true but the required functions are not available. You need to have either eaccelerator or turckmmcache extensions installed, compiled with the shmem keys option enabled.");
         }
 
-        $this->mode   = $mode;
         $this->prefix = $CFG->dbname .'|' . $CFG->prefix . '|';
     }