Ignore:
Timestamp:
08/27/10 23:01:58 (21 months ago)
Author:
vain
Message:
  • minor change to all security constant checks
  • fixed the non rewrite routing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/moduleinfocontroller.core.php

    r4578 r4599  
    3030 
    3131# Security Handler 
    32 if(defined('IN_CS') == false) 
     32if(defined('IN_CS') === false) 
    3333{ 
    3434    die('Clansuite not loaded. Direct Access forbidden.'); 
     
    106106            # get the modulename, so strip the path info 
    107107            $modulename = str_replace( ROOT_MOD, '', $modulepath); 
     108            # $modulename_by_dirname = str_replace( ROOT . 'modules' . DS ,'', $module_path); 
    108109 
    109110            # create array with pieces of information about a module 
     
    118119 
    119120            # hasInfo 
    120             if(is_file($modulepath . DS . $modulename.'.info.php') === true) 
    121             { 
    122                 self::$modulesinfo[$modulename]['info'] = Clansuite_CMS::getInjector()->instantiate('Clansuite_Config') 
    123                                                           ->readConfig( $modulepath . DS . $modulename.'.info.php' ); 
     121            $module_infofile = $modulepath . DS . $modulename . '.info.php'; 
     122            $config_object = Clansuite_CMS::getInjector()->instantiate('Clansuite_Config'); 
     123            if(is_file($module_infofile) === true) 
     124            { 
     125                #Clansuite_Debug::firebug($module_infofile); 
     126 
     127                self::$modulesinfo[$modulename]['info'] = $config_object->readConfig($module_infofile); 
    124128            } 
    125             else # if the info file for a module does not exists yet, create it 
    126             { 
    127                 Clansuite_CMS::getInjector()->instantiate('Clansuite_Config') 
    128                 ->writeConfig( $modulepath . DS . $modulename.'.info.php' ); 
     129            else # create file in DEV MODE 
     130            { 
     131                # if the info file for a module does not exists yet, create it 
     132                $config_object->writeConfig($module_infofile); 
    129133            } 
    130134 
     
    146150        } 
    147151        ksort(self::$modulesinfo); 
    148         #Clansuite_Debug::printR(self::$modulesinfos); 
     152 
    149153        return self::$modulesinfo; 
    150154    } 
     
    152156    public static function getModuleInformations($module = null) 
    153157    { 
    154          # check if the infos of this specific module were catched before 
     158        # check if the infos of this specific module were catched before 
    155159        if($module === false and isset(self::$modulesinfo[$module]) === null) 
    156160        { 
    157             Clansuite_Debug::printR(self::$modulesinfo); 
    158161            return self::$modulesinfo[$module]; 
    159162        } 
     
    164167            return self::scanModuleInformations(); 
    165168        } 
    166         # fetch infos for the requested $module 
    167         else 
     169        else # fetch infos for the requested $module 
    168170        { 
    169171            return self::scanModuleInformations($module); 
     
    213215    { 
    214216        return Clansuite_CMS::getInjector()->instantiate('Clansuite_Config') 
    215                 ->readConfig( ROOT . 'configuration' . DS . 'modules.config.php' ); 
     217                ->readConfig(ROOT . 'configuration' . DS . 'modules.config.php'); 
    216218    } 
    217219 
Note: See TracChangeset for help on using the changeset viewer.