Ignore:
Timestamp:
Jan 20, 2012, 9:17:37 PM (13 years ago)
Author:
chronos
Message:
  • Opraveno: Odkazy mezi modely.
  • Přidáno: Definice NetworkAP.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Module.php

    r378 r379  
    9090  function LoadModules($Installed = true)
    9191  {
     92    //DebugLog('Loading modules...');
     93    $this->Modules = array();
    9294    $Query = 'SELECT `Id`, `Name` FROM `SystemModule`';
    9395    if($Installed) $Query .= ' WHERE `Installed`=1';
     
    9698    while($Module = $DbResult->fetch_array())
    9799    {
     100      //echo($Module['Name'].',');
    98101      include_once('Modules/'.$Module['Name'].'/'.$Module['Name'].'.php');
    99102      $ModuleClassName = 'Module'.$Module['Name'];
    100       $this->Modules[$Module['Name']] = new $ModuleClassName($this->Database, $this);
    101       $this->Modules[$Module['Name']]->Id = $Module['Id'];
     103      $NewModule = new $ModuleClassName($this->Database, $this);     
     104      $NewModule->Id = $Module['Id'];
     105      $this->Modules[$Module['Name']] = $NewModule;
    102106    }     
    103107  }
     
    105109  function Init()
    106110  {
     111    $this->LoadModules();
    107112    foreach($this->Modules as $Index => $Module)
    108113      $this->Modules[$Index]->Init();
Note: See TracChangeset for help on using the changeset viewer.