Changeset 893 for trunk/Modules/Translation/Progress.php
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Progress.php
r888 r893 9 9 $BuildNumber = GetBuildNumber($_SESSION['StatVersion']); 10 10 if (is_numeric($_SESSION['language'])) $LanguageFilter = 'AND (`Language`='.$_SESSION['language'].')'; 11 else $LanguageFilter = ' AND (`Language`!='. $this->System->Config['OriginalLanguage'].')';11 else $LanguageFilter = ' AND (`Language`!='.Core::Cast($this->System)->Config['OriginalLanguage'].')'; 12 12 13 13 $GroupListQuery = 'SELECT `Id`, `TablePrefix`, `Name` FROM `Group`'; … … 25 25 '(SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 26 26 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 27 'WHERE (`Language` = '. $this->System->Config['OriginalLanguage'].') '.27 'WHERE (`Language` = '.Core::Cast($this->System)->Config['OriginalLanguage'].') '. 28 28 'AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 29 29 ') AS `C2`) AS `Total`, "'.$DbRow['Name'].'" AS `Name` UNION '; … … 59 59 else $TotalCount = 0; 60 60 $Output .= '<tr><td><strong>'.T('Total').'</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, $TotalCount).'</strong></td></tr>'. 61 61 '</table>'; 62 62 } 63 63 return $Output; … … 66 66 function Show(): string 67 67 { 68 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 68 69 $this->Title = T('Progress'); 69 70 $LanguageList = GetLanguageList(); … … 72 73 if (!array_key_exists('StatVersion', $_SESSION)) 73 74 { 74 if ($ this->System->User->Licence(LICENCE_USER) and ($this->System->User->PreferredVersionGame != ''))75 if ($User->Licence(LICENCE_USER) and ($User->PreferredVersionGame != '')) 75 76 { 76 $_SESSION['StatVersion'] = $this->System->User->PreferredVersionGame; 77 } else { 78 $_SESSION['StatVersion'] = $this->System->Config['Web']['GameVersion']; 77 $_SESSION['StatVersion'] = $User->PreferredVersionGame; 78 } else 79 { 80 $_SESSION['StatVersion'] = Core::Cast($this->System)->Config['Web']['GameVersion']; 79 81 } 80 82 } … … 82 84 if (!isset($_SESSION['language'])) 83 85 { 84 if ($ this->System->User->Licence(LICENCE_USER))86 if ($User->Licence(LICENCE_USER)) 85 87 { 86 $_SESSION['language'] = $this->System->User->Language; 87 } else { 88 $_SESSION['language'] = $User->Language; 89 } else 90 { 88 91 $_SESSION['language'] = ''; 89 92 } … … 93 96 if ($_GET['language'] == '') { 94 97 $_SESSION['language'] = ''; 95 } else { 98 } else 99 { 96 100 $_SESSION['language'] = $_GET['language'] * 1; 97 101 } … … 103 107 $DbResult = $this->Database->query('SELECT `Version`, `Title` FROM `ClientVersion` WHERE `Imported`=1 ORDER BY `Version`'); 104 108 while ($DbRow = $DbResult->fetch_assoc()) 109 { 105 110 $Output .= '<a href="?Version='.$DbRow['Version'].'" title="'.$DbRow['Title'].'">'.$DbRow['Version'].'</a> '; 111 } 106 112 $Output .= '<br/>'; 107 113
Note:
See TracChangeset
for help on using the changeset viewer.