Changeset 577 for trunk/Modules/Translation/TranslationList.php
- Timestamp:
- Sep 11, 2013, 10:37:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/TranslationList.php
r561 r577 5 5 function ShowFilter($GroupId = 0) 6 6 { 7 global $ System, $TranslationTree, $Config;7 global $TranslationTree; 8 8 9 9 $Filter = array('SQL' => ''); … … 59 59 else $Selected = ''; 60 60 $Output .= '<option value="0"'.$Selected.'>Všechny</option>'; 61 $DbResult = $ System->Database->query('SELECT `Id`,`Name` FROM `Group` ORDER BY `Name`');61 $DbResult = $this->Database->query('SELECT `Id`,`Name` FROM `Group` ORDER BY `Name`'); 62 62 while($Group = $DbResult->fetch_assoc()) 63 63 { … … 72 72 if($Filter['Version'] != 0) 73 73 { 74 $DbResult = $ System->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE (`Imported` = 1) AND (`Id` ='.$Filter['Version'].')');74 $DbResult = $this->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE (`Imported` = 1) AND (`Id` ='.$Filter['Version'].')'); 75 75 if($DbResult->num_rows > 0) 76 76 { … … 83 83 else $Selected = ''; 84 84 $Output .= '<option value="0"'.$Selected.'>Všechny</option>'; 85 $DbResult = $ System->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE `Imported` = 1 ORDER BY `BuildNumber` DESC');85 $DbResult = $this->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE `Imported` = 1 ORDER BY `BuildNumber` DESC'); 86 86 while($Version = $DbResult->fetch_assoc()) 87 87 { … … 101 101 else $Selected = ''; 102 102 $Output .= '<option value="0"'.$Selected.'>Všechny</option>'; 103 $DbResult = $ System->Database->query('SELECT `Id`, `Name` FROM `Language` WHERE `Enabled` = 1 ORDER BY `Name`');103 $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `Language` WHERE `Enabled` = 1 ORDER BY `Name`'); 104 104 while($Language = $DbResult->fetch_assoc()) 105 105 { … … 118 118 else $Selected = ''; 119 119 $Output .= '<option value="0"'.$Selected.'>Všichni</option>'; 120 $DbResult = $ System->Database->query('SELECT `Id`, `Name` FROM `User` ORDER BY `Name`');120 $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `User` ORDER BY `Name`'); 121 121 while($User = $DbResult->fetch_assoc()) 122 122 { … … 153 153 { 154 154 if($Filter['State'] == 0) $Filter['SQL'] .= $UserFilter.$VersionFilter.''; 155 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$ Config['OriginalLanguage'].') '.155 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].') '. 156 156 'AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '. 157 '(`Sub`.`Language` <> '.$ Config['OriginalLanguage'].')'.$LanguageFilter.$UserFilter.157 '(`Sub`.`Language` <> '.$this->System->Config['OriginalLanguage'].')'.$LanguageFilter.$UserFilter. 158 158 ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '. 159 159 '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))'; 160 160 else if($Filter['State'] == 2) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Complete` = 1)'; 161 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Language` != '.$ Config['OriginalLanguage'].161 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage']. 162 162 ') AND (`T`.`Complete` = 0)'; 163 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$ Config['OriginalLanguage'].')';163 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].')'; 164 164 } 165 165 … … 191 191 function ShowTranslationList($Filter) 192 192 { 193 global $ System, $TranslationTree;193 global $TranslationTree; 194 194 195 195 $Output = $Filter['Output']; … … 208 208 209 209 // Get total item count 210 $DbResult = $ System->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`');210 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`'); 211 211 $DbRow = $DbResult->fetch_row(); 212 212 $PageList = GetPageList($DbRow[0]); … … 226 226 $Order['Output']; 227 227 228 $DbResult = $ System->Database->query($Query.' '.$Order['SQL'].' '.$PageList['SQLLimit']);228 $DbResult = $this->Database->query($Query.' '.$Order['SQL'].' '.$PageList['SQLLimit']); 229 229 while($Line = $DbResult->fetch_assoc()) 230 230 { … … 243 243 function ShowGroupList($Filter) 244 244 { 245 global $ System, $TranslationTree;245 global $TranslationTree; 246 246 247 247 $Output = $Filter['Output']; … … 253 253 { 254 254 $Filter = $this->ShowFilter($Group['Id']); 255 $ID = $ System->Database->query('SELECT COUNT(*) FROM `'.$Group['TablePrefix'].'` AS `T` WHERE 1 '.$Filter['SQL']);255 $ID = $this->Database->query('SELECT COUNT(*) FROM `'.$Group['TablePrefix'].'` AS `T` WHERE 1 '.$Filter['SQL']); 256 256 $Line = $ID->fetch_row(); 257 257 $Output .= '<tr><td><a href="?group='.$Group['Id'].'">'.$Group['Name'].'</td><td>'.$Line[0].'</a></tr>'; … … 265 265 function ShowGroupTypeList() 266 266 { 267 global $System, $User; 268 269 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `Group`'); 267 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Group`'); 270 268 $DbRow = $DbResult->fetch_row(); 271 269 $PageList = GetPageList($DbRow[0]); … … 285 283 $Output .= $Order['Output']; 286 284 287 $DbResult = $ System->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']);285 $DbResult = $this->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']); 288 286 while($Group = $DbResult->fetch_assoc()) 289 287 { … … 297 295 $Output .= '</table>'. 298 296 '<br /><a title="Záznam změn po importu" href="log.php?type=11">Záznam změn v textech při importu</a><br/>'; 299 if($ User->Licence(LICENCE_ADMIN)) $Output .= '<a href="?action=groupadd">Přidat překladovou skupinu</a>';297 if($this->System->User->Licence(LICENCE_ADMIN)) $Output .= '<a href="?action=groupadd">Přidat překladovou skupinu</a>'; 300 298 return($Output); 301 299 } … … 303 301 function ShowMenu() 304 302 { 305 global $ User, $TranslationTree;303 global $TranslationTree; 306 304 307 305 $GroupId = GetParameter('group', 0, true); … … 321 319 '<td>Texty označené jako rozpracované.</td></tr>'; 322 320 323 if($ User->Licence(LICENCE_USER))321 if($this->System->User->Licence(LICENCE_USER)) 324 322 { 325 $Output .= '<tr><td><a title="Nedokončené texty" href="?group='.$GroupId.'&state=3&user='.$ User->Id.'">Moje nedokončené</a></td>323 $Output .= '<tr><td><a title="Nedokončené texty" href="?group='.$GroupId.'&state=3&user='.$this->System->User->Id.'">Moje nedokončené</a></td> 326 324 <td>Nedokončené texty přihlášeného uživatele</td></tr> 327 <tr><td><a title="Přeložené texty přihlášeného uživatele" href="?group='.$GroupId.'&state=2&user='.$ User->Id.'">Moje přeložené</a></td>325 <tr><td><a title="Přeložené texty přihlášeného uživatele" href="?group='.$GroupId.'&state=2&user='.$this->System->User->Id.'">Moje přeložené</a></td> 328 326 <td>Přeložené texty přihlášeného uživatele</td></tr>'; 329 327 } … … 348 346 function ShowGroupAdd() 349 347 { 350 global $User; 351 352 if($User->Licence(LICENCE_ADMIN)) 348 if($this->System->User->Licence(LICENCE_ADMIN)) 353 349 { 354 350 $Output = '<h3>Vložení nové překladové skupiny</h3>'. … … 368 364 function ShowGroupAddFinish() 369 365 { 370 global $User; 371 372 if($User->Licence(LICENCE_ADMIN)) 366 if($this->System->User->Licence(LICENCE_ADMIN)) 373 367 { 374 368 // TODO: Add group items manipulation oprations
Note:
See TracChangeset
for help on using the changeset viewer.