示例#1
0
 /**
  * The getInfo method gets information on module.
  *
  * Return array of module information or false if core ( id = 0 ).
  *
  * @param integer $modid The module ID.
  *
  * @return array|boolean Module information array or false.
  */
 public static function getInfo($modid = 0)
 {
     // a $modid of 0 is associated with the core ( blocks.mid, ... ).
     if (!is_numeric($modid)) {
         return false;
     }
     if (!is_array(self::$modinfo) || System::isInstalling()) {
         self::$modinfo = self::getModsTable();
         if (!self::$modinfo) {
             return null;
         }
         if (!isset(self::$modinfo[$modid])) {
             self::$modinfo[$modid] = false;
             return self::$modinfo[$modid];
         }
     }
     if (isset(self::$modinfo[$modid])) {
         return self::$modinfo[$modid];
     }
     return false;
 }