Changeset 751


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
Location:
trunk
Files:
2 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`))';
  • trunk/includes/Version.php

    r750 r751  
    66// and system will need database update.
    77
    8 $Revision = 749; // Subversion revision
     8$Revision = 750; // Subversion revision
    99$DatabaseRevision = 748; // Database structure revision
    1010$ReleaseTime = '2014-01-12';
Note: See TracChangeset for help on using the changeset viewer.