Changeset 859 for trunk/Modules/Translation
- Timestamp:
- Jan 21, 2016, 10:20:04 AM (9 years ago)
- Location:
- trunk/Modules/Translation
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Comparison.php
r847 r859 40 40 function Show() 41 41 { 42 global $TranslationTree;42 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 43 43 44 44 $Output = ''; -
trunk/Modules/Translation/Form.php
r848 r859 19 19 function ShowForm() 20 20 { 21 global $TranslationTree;21 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 22 22 23 23 $Output = ''; … … 261 261 function Delete() 262 262 { 263 global $TranslationTree;263 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 264 264 265 265 if($this->System->User->Licence(LICENCE_MODERATOR)) -
trunk/Modules/Translation/LoadNames.php
r843 r859 58 58 function LoadNames() 59 59 { 60 global $TranslationTree;60 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 61 61 62 62 $Output = ''; … … 79 79 } else { 80 80 if(($GroupId == 13)) { 81 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 'TextGlobalString' => 'Text', 'TextArea' => 'Name', 'TextItemSubClass' => 'Name', 'TextCharacterRace' => 'Name1',),false); 81 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 82 'TextGlobalString' => 'Text', 'TextArea' => 'Name', 83 'TextItemSubClass' => 'Name', 'TextCharacterRace' => 'Name1',), false); 82 84 } else { 83 85 $names = GetTranslatNames($Text, 0, GetTranslatNamesArray()); -
trunk/Modules/Translation/Save.php
r848 r859 176 176 function Show() 177 177 { 178 global $ TranslationTree, $Message, $MessageType;178 global $Message, $MessageType; 179 179 180 180 $Output = ''; 181 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 181 182 182 183 unset($Message); -
trunk/Modules/Translation/Translation.php
r854 r859 24 24 function DoStart() 25 25 { 26 global $TranslationTree;26 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 27 27 28 28 $this->System->RegisterPage('comparison.php', 'PageTranslationComparison'); … … 135 135 return($Output); 136 136 } 137 138 function GetTranslationTree() 139 { 140 if(isset($this->TranslationTree)) return($this->TranslationTree); 141 else { 142 $Result = array(); 143 $Groups = array(); 144 $DbResult = $this->System->Database->query('SELECT *, UNIX_TIMESTAMP(`LastImport`) AS `LastImportTime` FROM `Group`'); 145 while($DbRow = $DbResult->fetch_assoc()) 146 $Groups[T($DbRow['Name'])] = $DbRow; 147 ksort($Groups); 148 foreach($Groups as $Group) 149 { 150 $Group['Items'] = array(); 151 $Group['Game'] = T($Group['Name']); 152 $Result[$Group['Id']] = $Group; 153 } 154 $DbResult = $this->System->Database->query('SELECT * FROM `GroupItem` ORDER BY `Group`, `Sequence`'); 155 while($DbRow = $DbResult->fetch_assoc()) 156 { 157 $Result[$DbRow['Group']]['Items'][] = $DbRow; 158 } 159 $this->TranslationTree = $Result; 160 return($Result); 161 } 162 } 137 163 } -
trunk/Modules/Translation/TranslationList.php
r855 r859 18 18 function ShowFilter($GroupId = 0) 19 19 { 20 global $TranslationTree;20 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 21 21 22 22 $Filter = array('SQL' => ''); … … 251 251 function ShowTranslationList($Filter) 252 252 { 253 global $TranslationTree;253 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 254 254 255 255 $Output = $Filter['Output']; … … 310 310 function ShowGroupList($Filter) 311 311 { 312 global $TranslationTree;312 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 313 313 314 314 $Output = $Filter['Output']; … … 333 333 function ShowMenu() 334 334 { 335 global $TranslationTree;335 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 336 336 337 337 $GroupId = GetParameter('group', 0, true); -
trunk/Modules/Translation/UserLevel.php
r833 r859 21 21 function GetXPFromTranslation($UserId) 22 22 { 23 global $System, $TranslationTree, $xp_from_word, $from_diakrit, $Config; 23 global $System, $xp_from_word, $from_diakrit, $Config; 24 25 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 24 26 25 27 $xp = 0; … … 72 74 function UserLevelUpdate($UserId) 73 75 { 74 global $System, $ TranslationTree, $Config;76 global $System, $Config; 75 77 78 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 76 79 // Main code for users 77 80 $DbResult = $System->Database->query('SELECT `ID`, `Name` FROM `User` WHERE `Id` = '.$UserId);
Note:
See TracChangeset
for help on using the changeset viewer.