Changeset 751 for trunk/Modules


Ignore:
Timestamp:
Jan 13, 2014, 1:25:02 AM (11 years ago)
Author:
maron
Message:
  • Fixed: Bad filtering not translated when all language is selected
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Translation/TranslationList.php

    r747 r751  
    100100                }
    101101                $Output .= '</select></td>';
    102                 if($Filter['Language'] != 0) $LanguageFilter = ' AND (`T`.`Language` = '.$Filter['Language'].')';
    103                 else $LanguageFilter = '';
     102                $LanguageFilter = '';
     103                $LanguageFilterSub = '';
     104                if($Filter['Language'] != 0) {
     105      $LanguageFilter = ' AND (`T`.`Language` = '.$Filter['Language'].')';
     106      $LanguageFilterSub = ' AND (`Sub`.`Language` = '.$Filter['Language'].')';
     107    }
    104108       
    105109                // User
     
    144148                {
    145149                    $WithoutAlter =       ' AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '.
    146                                         '(`Sub`.`Language` <> '.$this->System->Config['OriginalLanguage'].')'.$LanguageFilter.
     150                                        '(`Sub`.`Language` <> '.$this->System->Config['OriginalLanguage'].')'.$LanguageFilterSub.
    147151                                        ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`ID` != `T`.`ID`) AND (`Sub`.`Complete` = 1) AND '.
    148152                                        '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`) LIMIT 1 ) ';
     
    159163                        else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].') '.
    160164                                        'AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '.
    161                                         '(`Sub`.`Language` = '.$Filter['Language'].')'.$UserFilter.
     165                                        '(`Sub`.`Language` <> '.$this->System->Config['OriginalLanguage'].') '.$LanguageFilterSub.$UserFilter.
    162166                                        ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '.
    163167                                        '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))';
Note: See TracChangeset for help on using the changeset viewer.