Changeset 838 for trunk/includes
- Timestamp:
- Jan 9, 2016, 11:45:01 PM (9 years ago)
- Location:
- trunk/includes
- Files:
-
- 5 deleted
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/PageEdit.php
r837 r838 1 1 <?php 2 3 class Page4 {5 var $System;6 var $Database;7 var $RawPage;8 var $Title;9 10 function __construct($System)11 {12 $this->System = &$System;13 $this->Database = &$System->Database;14 $this->RawPage = false;15 }16 17 function Show()18 {19 return('');20 }21 22 function GetOutput()23 {24 $Output = $this->Show();25 return($Output);26 }27 }28 2 29 3 class PageEdit extends Page -
trunk/includes/Version.php
r837 r838 6 6 // and system will need database update. 7 7 8 $Revision = 83 7; // Subversion revision8 $Revision = 838; // Subversion revision 9 9 $DatabaseRevision = 811; // Database structure revision 10 $ReleaseTime = '201 5-12-27';10 $ReleaseTime = '2016-01-11'; -
trunk/includes/global.php
r836 r838 1 1 <?php 2 2 3 include_once(dirname(__FILE__).'/Database.php'); 4 include_once(dirname(__FILE__).'/Base.php'); 3 include_once(dirname(__FILE__).'/../Packages/Common/Common.php'); 5 4 include_once(dirname(__FILE__).'/system.php'); 6 5 include_once(dirname(__FILE__).'/Update.php'); 7 include_once(dirname(__FILE__).'/Page .php');6 include_once(dirname(__FILE__).'/PageEdit.php'); 8 7 if(file_exists(dirname(__FILE__).'/config.php')) 9 8 include_once(dirname(__FILE__).'/config.php'); 10 9 include_once(dirname(__FILE__).'/Version.php'); 11 include_once(dirname(__FILE__).'/AppModule.php');12 10 include_once(dirname(__FILE__).'/Locale.php'); 13 include_once(dirname(__FILE__).'/UTF8.php');14 11 require_once(dirname(__FILE__).'/../HTML/BBCodeParser2.php'); 15 12 … … 41 38 if(isset($InitSystem) and $InitSystem) 42 39 { 43 $System = new System();40 $System = new Core(); 44 41 $System->DoNotShowPage = true; 45 42 $System->Run(); 46 $User = $System->User; // Back compatibility, will be removed47 43 } 48 44 -
trunk/includes/system.php
r837 r838 1 1 <?php 2 2 3 include_once('Database.php'); 4 include_once('Application.php'); 5 6 class System extends Application 3 class Core extends Application 7 4 { 8 var $Database;9 5 var $Config; 10 var $ModuleManager;11 6 var $PathItems; 12 7 var $Menu; 13 8 var $DoNotShowPage; 14 9 var $OnPageNotFound; 10 var $Pages; 15 11 16 12 function __construct() 17 13 { 14 parent::__construct(); 18 15 $this->Config = array(); 19 16 $this->Menu = array(); … … 21 18 $this->DoNotShowPage = false; 22 19 $this->OnPageNotFound = array(); 20 $this->Pages = array(); 23 21 } 24 22 … … 28 26 29 27 $this->Config = $Config; 30 $this->Database = new Database();31 28 $this->Database->Connect($this->Config['Database']['Host'], 32 29 $this->Config['Database']['User'], $this->Config['Database']['Password'], … … 36 33 $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError']; 37 34 $this->Database->LogSQLQuery = $this->Config['Web']['LogSQLQuery']; 38 $this->ModuleManager = new AppModuleManager();39 35 40 36 $this->PathItems = ProcessURL(); … … 59 55 $this->Menu = array 60 56 ( 61 /* array(62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 57 /* array( 58 'Title' => T('Files'), 59 'Hint' => 'Stahování různých pomocných souborů a programů', 60 'Link' => $this->Link('/download.php'), 61 'Permission' => LICENCE_ANONYMOUS, 62 'Icon' => '', 63 ), 64 */ 65 array( 66 'Title' => T('Instructions'), 67 'Hint' => 'Informace k překladu hry', 68 'Link' => $this->Link('/info.php'), 69 'Permission' => LICENCE_ANONYMOUS, 70 'Icon' => '', 71 ), 72 array( 73 'Title' => T('Data source'), 74 'Hint' => 'Informace o překladových skupinách', 75 'Link' => $this->Link('/TranslationList.php?action=grouplist'), 76 'Permission' => LICENCE_ANONYMOUS, 77 'Icon' => '', 78 ), 79 array( 80 'Title' => T('Presentation'), 81 'Hint' => 'Prezentace a motivace překladu', 82 'Link' => $this->Link('/promotion.php'), 83 'Permission' => LICENCE_ANONYMOUS, 84 'Icon' => '', 85 ), 86 array( 87 'Title' => T('IRC chat'), 88 'Hint' => 'IRC chat pro překladatele', 89 'Link' => 'http://embed.mibbit.com/?server=game.zdechov.net%3A6667&channel=%23wowpreklad&forcePrompt=true&charset=utf-8', 90 'Permission' => LICENCE_ANONYMOUS, 91 'Icon' => '', 92 ), 93 array( 94 'Title' => T('Administration'), 95 'Hint' => 'Volby pro správu', 96 'Link' => $this->Link('/admin/'), 97 'Permission' => LICENCE_ADMIN, 98 'Icon' => '', 99 ), 104 100 ); 105 101 } … … 107 103 function Run() 108 104 { 109 global $S ystem, $ScriptStartTime, $TranslationTree, $User, $StopAfterUpdateManager,105 global $ScriptStartTime, $TranslationTree, $StopAfterUpdateManager, 110 106 $UpdateManager, $Config, $DatabaseRevision; 111 107 … … 139 135 140 136 // Initialize application modules 141 $this->ModuleManager->RegisterModule(new ModuleError($System)); 142 $this->ModuleManager->Modules['Error']->ShowError = $Config['Web']['ShowPHPError']; 143 $this->ModuleManager->RegisterModule(new ModuleLog($System)); 144 $this->ModuleManager->RegisterModule(new ModuleUser($System)); 145 $this->ModuleManager->RegisterModule(new ModuleAoWoW($System)); 146 $this->ModuleManager->RegisterModule(new ModuleReferrer($System)); 147 $this->ModuleManager->Modules['Referrer']->Excludes[] = $System->Config['Web']['Host']; 148 $this->ModuleManager->RegisterModule(new ModuleTeam($System)); 149 $this->ModuleManager->RegisterModule(new ModuleDictionary($System)); 150 $this->ModuleManager->RegisterModule(new ModuleTranslation($System)); 151 $this->ModuleManager->RegisterModule(new ModuleImport($System)); 152 $this->ModuleManager->RegisterModule(new ModuleExport($System)); 153 $this->ModuleManager->RegisterModule(new ModuleServer($System)); 154 $this->ModuleManager->RegisterModule(new ModuleClientVersion($System)); 155 $this->ModuleManager->RegisterModule(new ModuleShoutBox($System)); 156 $this->ModuleManager->RegisterModule(new ModuleNews($System)); 157 $this->ModuleManager->RegisterModule(new ModuleWiki($System)); 158 $this->ModuleManager->RegisterModule(new ModuleSearch($System)); 159 $this->ModuleManager->RegisterModule(new ModuleFrontPage($System)); 160 $this->ModuleManager->RegisterModule(new ModuleDownload($System)); 161 $this->ModuleManager->RegisterModule(new ModuleForum($System)); 162 $this->ModuleManager->RegisterModule(new ModuleRedirection($System)); 137 $this->ModuleManager->RegisterModule(new ModuleError($this)); 138 $this->ModuleManager->Modules['Error']->ErrorHandler->ShowError = $Config['Web']['ShowPHPError']; 139 $this->ModuleManager->RegisterModule(new ModuleLog($this)); 140 $this->ModuleManager->RegisterModule(new ModuleUser($this)); 141 $this->ModuleManager->RegisterModule(new ModuleAoWoW($this)); 142 $this->ModuleManager->RegisterModule(new ModuleReferrer($this)); 143 $this->ModuleManager->Modules['Referrer']->Excludes[] = $this->Config['Web']['Host']; 144 $this->ModuleManager->RegisterModule(new ModuleTeam($this)); 145 $this->ModuleManager->RegisterModule(new ModuleDictionary($this)); 146 $this->ModuleManager->RegisterModule(new ModuleTranslation($this)); 147 $this->ModuleManager->RegisterModule(new ModuleImport($this)); 148 $this->ModuleManager->RegisterModule(new ModuleExport($this)); 149 $this->ModuleManager->RegisterModule(new ModuleServer($this)); 150 $this->ModuleManager->RegisterModule(new ModuleClientVersion($this)); 151 $this->ModuleManager->RegisterModule(new ModuleShoutBox($this)); 152 $this->ModuleManager->RegisterModule(new ModuleNews($this)); 153 $this->ModuleManager->RegisterModule(new ModuleWiki($this)); 154 $this->ModuleManager->RegisterModule(new ModuleSearch($this)); 155 $this->ModuleManager->RegisterModule(new ModuleFrontPage($this)); 156 $this->ModuleManager->RegisterModule(new ModuleDownload($this)); 157 $this->ModuleManager->RegisterModule(new ModuleForum($this)); 158 $this->ModuleManager->RegisterModule(new ModuleRedirection($this)); 159 $this->ModuleManager->FileName = dirname(__FILE__).'/../Config/ModulesConfig.php'; 160 // TODO: Allow control from web which modules should be installed 161 $this->ModuleManager->InstallAll(); 163 162 $this->ModuleManager->StartAll(); 164 163 … … 276 275 if($this->System->User->Licence(LICENCE_USER)) 277 276 { 278 //$DbResult = $System->Database->query('SELECT `Id`, `Name` FROM `Team` WHERE `Id`='.$this->System->User->Team);277 //$DbResult =$this->Database->query('SELECT `Id`, `Name` FROM `Team` WHERE `Id`='.$this->System->User->Team); 279 278 //$Team = $DbResult->fetch_assoc(); 280 279 //$Output .= ''<span class="MenuItem">Moje překlady: <a href="">Dokončené</a> <a href="">Rozpracované</a> <a href="">Exporty</a> Tým: <a href="">'.$Team['name'].'</a></span>';
Note:
See TracChangeset
for help on using the changeset viewer.