Changeset 379 for trunk/Common/Module.php
- Timestamp:
- Jan 20, 2012, 9:17:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Module.php
r378 r379 90 90 function LoadModules($Installed = true) 91 91 { 92 //DebugLog('Loading modules...'); 93 $this->Modules = array(); 92 94 $Query = 'SELECT `Id`, `Name` FROM `SystemModule`'; 93 95 if($Installed) $Query .= ' WHERE `Installed`=1'; … … 96 98 while($Module = $DbResult->fetch_array()) 97 99 { 100 //echo($Module['Name'].','); 98 101 include_once('Modules/'.$Module['Name'].'/'.$Module['Name'].'.php'); 99 102 $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; 102 106 } 103 107 } … … 105 109 function Init() 106 110 { 111 $this->LoadModules(); 107 112 foreach($this->Modules as $Index => $Module) 108 113 $this->Modules[$Index]->Init();
Note:
See TracChangeset
for help on using the changeset viewer.