Changeset 405 for branches/Modular
- Timestamp:
- Jun 12, 2012, 7:25:25 PM (12 years ago)
- Location:
- branches/Modular
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Modular/Common/Global.php
r401 r405 25 25 include_once('ViewForm.php'); 26 26 include_once('Types/Type.php'); 27 include_once('Localization.php'); 28 include_once('Navigation.php'); 27 29 28 30 … … 73 75 $System->RootFolder = $Config['Web']['RootFolder']; 74 76 $System->Config = &$Config; 77 $System->Localization = new Localization(); 78 $System->Localization->Locale = $Config['Web']['Locale']; 79 $System->Localization->Load(); 80 $System->Navigation = new Navigation(); 75 81 } 76 82 -
branches/Modular/Common/Module.php
r404 r405 270 270 } 271 271 } 272 273 function SearchModuleById($Id) 274 { 275 foreach($this->Modules as $Module) 276 { 277 DebugLog($Module->Name.' '.$Module->Id); 278 if($Module->Id == $Id) return($Module->Name); 279 } 280 return(''); 281 } 272 282 } 273 283 -
branches/Modular/Common/ViewList.php
r404 r405 55 55 foreach($this->Actions as $Action) 56 56 { 57 if(array_key_exists('Confirm', $Action)) $Confirm = ' onclick="return confirmAction(\''.$this->System->Localization->Translate($Action['Confirm']).'\');"'; 57 if(array_key_exists('Confirm', $Action) and ($Action['Confirm'] != '')) 58 $Confirm = ' onclick="return confirmAction(\''.$this->System->Localization->Translate($Action['Confirm']).'\');"'; 58 59 else $Confirm = ''; 59 60 if(strpos($Action['Name'], '<') !== false) $ActionName = $Action['Name']; … … 148 149 'Type' => ViewItemTypeOneToMany, 'SQL' => $Name, 'TargetTable' => $TargetTable); 149 150 } 151 152 function AddItemAction($Name, $Module, $Action, $Confirm) 153 { 154 $this->Actions[$Name] = array('Name' => $Name, 'Module' => $Module, 155 'Action' => $Action, 'Confirm' => $Confirm); 156 } 150 157 } 151 158 -
branches/Modular/Modules/Finance/Finance.php
r379 r405 286 286 $this->License = 'GNU/GPL'; 287 287 $this->Description = 'Accounting processing'; 288 $this->Dependencies = array('User', 'Subject' );288 $this->Dependencies = array('User', 'Subject', 'Member', 'Network'); 289 289 $this->SupportedModels = array('FinanceYear', 'DocumentLine', 'DocumentLineSequence', 290 290 'FinanceTariff', 'FinanceOperation', 'FinanceClaimsLiabilities', -
branches/Modular/Modules/System/System.php
r404 r405 12 12 function Show() 13 13 { 14 $Output = ''; 15 if(array_key_exists('A', $_GET)) 16 { 17 if($_GET['A'] == 'Install') 18 { 19 $this->System->LoadModules(false); 20 $ModuleName = $this->System->SearchModuleById($_GET['Id']); 21 if($ModuleName != '') 22 { 23 $this->System->Modules[$ModuleName]->Install(); 24 $this->System->Init(); 25 } else $Output .= 'Modul id '.$_GET['Id'].' nenalezen'; 26 27 } 28 if($_GET['A'] == 'Uninstall') 29 { 30 $ModuleName = $this->System->SearchModuleById($_GET['Id']); 31 if($ModuleName != '') 32 { 33 $this->System->Modules[$ModuleName]->UnInstall(); 34 $this->System->Init(); 35 } else $Output .= 'Modul id '.$_GET['Id'].' nenalezen'; 36 } 37 } 14 38 $View = new ViewModules($this->System); 15 39 $View->LoadFromDatabase(); 16 return($View->Show()); 40 $Output .= $View->Show(); 41 return($Output); 17 42 } 18 43 } … … 30 55 $this->AddItemBoolean('Installed', 'Instalováno'); 31 56 $this->AddItemText('Description', 'Popis'); 57 $this->AddItemAction('Install', 'System', 'Install', ''); 58 $this->AddItemAction('Uninstall', 'System', 'Uninstall', ''); 32 59 } 33 60 } -
branches/Modular/Modules/User/User.php
r398 r405 383 383 $thus->System->Modules['User']->Models['User']->AnonymousUserId = ANONYMOUS_ID; 384 384 $this->System->Pages['uzivatele'] = 'UserListPage'; 385 if(isset($_SERVER['REMOTE_ADDR'])) $this->System->Modules['User']->Models['User']->Check(); 385 if(isset($_SERVER['REMOTE_ADDR'])) $this->System->Modules['User']->Models['User']->Check(); 386 386 } 387 387 -
branches/Modular/config.sample.php
r398 r405 16 16 'Web' => array 17 17 ( 18 'Locale' => 'csCZ', 18 19 'Style' => 'simple', 19 20 'FormatHTML' => false, -
branches/Modular/index.php
r403 r405 11 11 $Page = $System->PathItems[0]; 12 12 //if(substr($Page, -1) == '/') $Page = substr($Page, 0, -1); 13 //print_r($System->Pages);13 print_r($System->Pages); 14 14 if(array_key_exists($Page, $System->Pages)) 15 15 {
Note:
See TracChangeset
for help on using the changeset viewer.