Changeset 859 for trunk/Modules/Translation/Translation.php
- Timestamp:
- Jan 21, 2016, 10:20:04 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.