Example #1
0
 static function IsPluignEnabled($type, $plugin)
 {
     if (empty(self::$plugin_data)) {
         $db = JFactory::getDBO();
         $qry = "SELECT * FROM #__fss_plugins";
         $db->setQuery($qry);
         $pluigns = $db->loadObjectList();
         self::$plugin_data = array();
         foreach ($pluigns as $plg) {
             $key = $plg->type . $plg->name;
             self::$plugin_data[$key] = $plg->enabled;
         }
     }
     $key = $type . $plugin;
     if (!array_key_exists($key, self::$plugin_data)) {
         return 0;
     }
     return self::$plugin_data[$key];
 }