Changeset 525 for trunk/TranslationList.php
- Timestamp:
- Feb 20, 2013, 11:30:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r524 r525 5 5 function ShowFilter($GroupId = 0) 6 6 { 7 global $System, $TranslationTree ;7 global $System, $TranslationTree, $Config; 8 8 9 9 $Filter = array('SQL' => ''); … … 153 153 { 154 154 if($Filter['State'] == 0) $Filter['SQL'] .= $UserFilter.$VersionFilter.''; 155 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = 0) AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> 0)'.$LanguageFilter.$UserFilter.' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND (`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))'; 155 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = '.$Config['OriginalLanguage'].') '. 156 'AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '. 157 '(`Sub`.`Language` <> '.$Config['OriginalLanguage'].')'.$LanguageFilter.$UserFilter. 158 ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '. 159 '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))'; 156 160 else if($Filter['State'] == 2) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`Complete` = 1)'; 157 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`Language` != 0) AND (`Complete` = 0)';158 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = 0)';161 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`Language` != '.$Config['OriginalLanguage'].') AND (`Complete` = 0)'; 162 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = '.$Config['OriginalLanguage'].')'; 159 163 } 160 164 … … 193 197 $Query = 'SELECT `T`.`ID`, `T`.`Entry`, `T`.`VersionStart`, `T`.`VersionEnd`, '. 194 198 '`T`.`'.$TranslationTree[$Filter['Group']]['Items'][0]['Column'].'`, '. 195 '(SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `T`.`User`) '. 196 'AS `UserName` FROM `'.$Table.'` AS `T` WHERE 1 '.$Filter['SQL']; 199 '(SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `T`.`User`) AS `UserName`, '. 200 '(SELECT `Language`.`Name` FROM `Language` WHERE `Language`.`ID` = `T`.`Language`) AS `LanguageName` '. 201 'FROM `'.$Table.'` AS `T` WHERE 1 '.$Filter['SQL']; 197 202 198 203 // Get total item count … … 207 212 array('Name' => $TranslationTree[$Filter['Group']]['Items'][0]['Column'], 'Title' => 'Název'), 208 213 array('Name' => 'VersionStart', 'Title' => 'Verze'), 209 array('Name' => 'UserName', 'Title' => 'Překladatel'), 214 array('Name' => 'LanguageName', 'Title' => 'Jazyk'), 215 array('Name' => 'UserName', 'Title' => 'Překladatel'), 210 216 ); 211 217 … … 220 226 '<td>'.htmlspecialchars($Line[$TranslationTree[$Filter['Group']]['Items'][0]['Column']]).'</td>'. 221 227 '<td>'.GetVersionWOW($Line['VersionStart']).'-'.GetVersionWOW($Line['VersionEnd']).'</td>'. 228 '<td>'.$Line['LanguageName'].'</td>'. 222 229 '<td>'.$Line['UserName'].'</td>'; 223 230 '</tr>';
Note:
See TracChangeset
for help on using the changeset viewer.