Changeset 859 for trunk/includes/Global.php
- Timestamp:
- Jan 21, 2016, 10:20:04 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Global.php
r858 r859 336 336 } 337 337 338 function GetTranslationTree()339 {340 global $System;341 342 $Result = array();343 $Groups = array();344 $DbResult = $System->Database->query('SELECT *, UNIX_TIMESTAMP(`LastImport`) AS `LastImportTime` FROM `Group`');345 while($DbRow = $DbResult->fetch_assoc())346 $Groups[T($DbRow['Name'])] = $DbRow;347 ksort($Groups);348 foreach($Groups as $Group)349 {350 $Group['Items'] = array();351 $Group['Game'] = T($Group['Name']);352 $Result[$Group['Id']] = $Group;353 }354 $DbResult = $System->Database->query('SELECT * FROM `GroupItem` ORDER BY `Group`, `Sequence`');355 while($DbRow = $DbResult->fetch_assoc())356 {357 $Result[$DbRow['Group']]['Items'][] = $DbRow;358 }359 return($Result);360 }361 362 338 $Moderators = array('Překladatel', 'Moderátor', 'Administrátor'); 363 339 … … 459 435 function LoadGroupIdParameter() 460 436 { 461 global $TranslationTree; 437 global $System; 438 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 462 439 463 440 if(array_key_exists('group', $_GET)) $GroupId = $_GET['group'] * 1; … … 556 533 function GetIDbyName($Table) 557 534 { 558 global $TranslationTree; 535 global $System; 536 537 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 559 538 560 539 foreach($TranslationTree as $TableID => $Value)
Note:
See TracChangeset
for help on using the changeset viewer.