- Timestamp:
- Jan 31, 2014, 8:55:12 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/TranslationList.php
r759 r772 1 1 <?php 2 3 class CompletionState 4 { 5 const All = 0; 6 const NotTranslated = 1; 7 const Translated = 2; 8 const NotFinished = 3; 9 const Original = 4; 10 const NotFinishedNotTranslated = 5; 11 const Missing1 = 6; 12 const Missing2 = 7; 13 } 14 2 15 3 16 class PageTranslationList extends Page … … 23 36 $Filter['State'] = GetParameter('state', 0, true, true); 24 37 $Output .= '<td><select name="state">'; 25 $StateTypes = array('Všechny','Nepřeložené','Přeložené','Rozpracované','Anglické','Rozpracované-Nepřeložené','Chybějící $ ($N,$s..)','Chybějící $-Neopravený'); 38 $StateTypes = array( 39 CompletionState::All => 'Všechny', 40 CompletionState::NotTranslated => 'Nepřeložené', 41 CompletionState::Translated => 'Přeložené', 42 CompletionState::NotFinished => 'Rozpracované', 43 CompletionState::Original => 'Anglické', 44 CompletionState::NotFinishedNotTranslated => 'Rozpracované-Nepřeložené', 45 CompletionState::Missing1 => 'Chybějící $ ($N,$s..)', 46 CompletionState::Missing2 => 'Chybějící $-Neopravený' 47 ); 26 48 foreach ($StateTypes as $index=>$StateType) { 27 49 if($Filter['State'] == $index) $Selected = ' selected="selected"'; … … 160 182 ')'; 161 183 } 162 if($Filter['State'] == 0) $Filter['SQL'] .= $UserFilter.$VersionFilter.'';163 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].') '.184 if($Filter['State'] == CompletionState::All) $Filter['SQL'] .= $UserFilter.$VersionFilter.''; 185 else if($Filter['State'] == CompletionState::NotTranslated) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].') '. 164 186 'AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '. 165 187 '(`Sub`.`Language` <> '.$this->System->Config['OriginalLanguage'].') '.$LanguageFilterSub.$UserFilter. 166 188 ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '. 167 189 '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))'; 168 else if($Filter['State'] == 2) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Complete` = 1)';169 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage'].190 else if($Filter['State'] == CompletionState::Translated) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Complete` = 1)'; 191 else if($Filter['State'] == CompletionState::NotFinished) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage']. 170 192 ') AND (`T`.`Complete` = 0)'; 171 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].')';172 else if($Filter['State'] == 5) $Filter['SQL'] .= $UserFilter.$VersionFilter.$WithoutAlter.193 else if($Filter['State'] == CompletionState::Original) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].')'; 194 else if($Filter['State'] == CompletionState::NotFinishedNotTranslated) $Filter['SQL'] .= $UserFilter.$VersionFilter.$WithoutAlter. 173 195 ' AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage']. 174 196 ') AND (`T`.`Complete` = 0)'. 175 197 ''; 176 else if($Filter['State'] == 6) {198 else if($Filter['State'] == CompletionState::Missing1) { 177 199 $Filter['SQL'] .= $UserFilter.$VersionFilter.' AND (`T`.`Complete` = 1) AND `T`.`Language` != '.$this->System->Config['OriginalLanguage']; 178 200 $Filter['SQL'] .= ' AND ('.implode(' OR ', $ItemsVar).') '; 179 201 } 180 else if($Filter['State'] == 7) {202 else if($Filter['State'] == CompletionState::Missing2) { 181 203 $Filter['SQL'] .= $UserFilter.$VersionFilter.' AND (`T`.`Complete` = 1) AND `T`.`Language` != '.$this->System->Config['OriginalLanguage']; 182 204 $Filter['SQL'] .= ' '. $WithoutAlter; -
trunk/includes/Version.php
r769 r772 6 6 // and system will need database update. 7 7 8 $Revision = 77 0; // Subversion revision8 $Revision = 772; // Subversion revision 9 9 $DatabaseRevision = 748; // Database structure revision 10 10 $ReleaseTime = '2014-01-30';
Note:
See TracChangeset
for help on using the changeset viewer.