Author: pmacadden
Date: 2010-02-08 17:50:33 +0100 (Mon, 08 Feb 2010)
New Revision: 27744

Modified:
   plugins/pmModuleEnablerPlugin/trunk/lib/model/pmConfiguration.php
Log:
optimized for performance

Modified: plugins/pmModuleEnablerPlugin/trunk/lib/model/pmConfiguration.php
===================================================================
--- plugins/pmModuleEnablerPlugin/trunk/lib/model/pmConfiguration.php   
2010-02-08 15:47:39 UTC (rev 27743)
+++ plugins/pmModuleEnablerPlugin/trunk/lib/model/pmConfiguration.php   
2010-02-08 16:50:33 UTC (rev 27744)
@@ -13,9 +13,9 @@
       {
         self::$instance = new self();
         self::$instance->save();
+        self::$instance->loadModules();
       }
     }
-    self::$instance->loadModules();
 
     return self::$instance;
   }
@@ -60,6 +60,11 @@
       }
       else
       {
+        $c = new Criteria();
+        $c->add(pmModulePeer::NAME, $module_name);
+        $pm_module = pmModulePeer::doSelectOne($c);
+        $ret = $pm_module?$pm_module->getIsEnabled():false;
+        /*
         foreach ($this->getpmModules() as $pm_module)
         {
           if ($pm_module->getName() == $module_name && 
$pm_module->getIsEnabled())
@@ -67,6 +72,7 @@
             $ret = true;
           }
         }
+        */
       }
     }
 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to