Changeset 404 for branches/Modular/Common/Module.php
- Timestamp:
- Jun 12, 2012, 6:41:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Modular/Common/Module.php
r403 r404 32 32 DebugLog('Installing module '.$this->Name.'...'); 33 33 $this->Installed = true; 34 35 // Install dependencies first 34 36 foreach($this->Dependencies as $Dependency) 35 37 $this->System->Modules[$Dependency]->Install(); 38 36 39 $this->LoadModels(); 37 40 foreach($this->Models as $Index => $Module) … … 45 48 { 46 49 DebugLog('Uninstalling module '.$this->Name.'...'); 50 $this->Installed = false; 51 52 // Remove dependent modules first 53 foreach($this->System->Modules as $Module) 54 foreach($Module->Dependencies as $Dependency) 55 if(($Dependency == $this->Name) and ($Module->Installed)) $this->System->Modules[$Module->Name]->UnInstall(); 56 47 57 $this->LoadModels(); 48 58 foreach(array_reverse($this->Models, true) as $Index => $Model) … … 51 61 } 52 62 $this->Database->query('UPDATE SystemModule SET Installed=0 WHERE Name="'.$this->Name.'"'); 53 $this->Installed = false;54 63 } 55 64 … … 115 124 $this->LoadModules(); 116 125 foreach($this->Modules as $Index => $Module) 126 { 127 //DebugLog('Init module '.$Module->Name); 117 128 $this->Modules[$Index]->Init(); 129 } 118 130 } 119 131 … … 171 183 $this->ReloadList(); 172 184 $this->LoadModules(false); 173 //$this->Modules['System']->Install();174 foreach($this->Modules as $Index => $Module)185 $this->Modules['System']->Install(); 186 /*foreach($this->Modules as $Index => $Module) 175 187 { 176 188 $this->Modules[$Index]->Install(); 177 } 189 }*/ 178 190 } 179 191
Note:
See TracChangeset
for help on using the changeset viewer.