Changeset 8 for Common/AppModule.php


Ignore:
Timestamp:
Jan 22, 2016, 5:13:22 PM (9 years ago)
Author:
chronos
Message:
  • Added: Setup and Update class for basic web application setup and configuration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/AppModule.php

    r5 r8  
    197197    $this->Modules = array();
    198198    $this->System = &$System;
    199     $this->FileName = 'Config/Modules.php';
     199    $this->FileName = dirname(__FILE__).'/../../Config/ModulesConfig.php';
    200200    $this->ModulesDir = dirname(__FILE__).'/../../Modules';
    201201  }
     
    232232    {
    233233      if(!array_key_exists($Dependency, $this->Modules))
    234         throw new Exception('Module "'.$Module->Name.'" dependency "'.$Dependency.'" not found');
     234        throw new Exception(sprintf(T('Module "%s" dependency "%s" not found'), $Module->Name, $Dependency));
    235235      $DepModule = $this->Modules[$Dependency];
    236236      if(in_array(ModuleCondition::All, $Conditions) or
     
    318318  }
    319319
     320  function ModuleEnabled($Name)
     321  {
     322    return(array_key_exists($Name, $this->Modules) and $this->Modules[$Name]->Enabled);
     323  }
     324
     325  function ModuleRunning($Name)
     326  {
     327    return(array_key_exists($Name, $this->Modules) and $this->Modules[$Name]->Running);
     328  }
     329
    320330  /* @return Module */
    321331  function SearchModuleById($Id)
Note: See TracChangeset for help on using the changeset viewer.