Ignore:
Timestamp:
Feb 20, 2013, 11:30:49 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazení porovnání překladů.
  • Opraveno: Zobrazení stavu dokončení pro všechny překlady.
  • Přidáno: V seznamu překladů přidán sloupec Jazyk.
  • Opraveno: Místa, kde s pevným indexem anglického originálu upravena na nastavitelný.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global.php

    r524 r525  
    328328}
    329329
    330 function WriteLanguagesWithoutSel($Selected)
    331 {
    332   global $LanguageList;
    333  
    334   $Output = '';
    335   foreach($LanguageList as $Language)
    336   {
    337     if($Selected == $Language['Id']) $Output .= $Language['Name'];
    338   }
    339   return($Output);
    340 }
    341 
    342330function GetLanguageList()
    343331{
     
    398386function FollowingTran($TextID, $Table, $GroupId, $Prev = false)
    399387{
    400   global $System;
     388  global $System, $Config;
    401389 
    402390  if($Prev)
    403   {
    404     $sql = 'SELECT ID FROM '.$Table.' as item WHERE Language = 0 AND NOT EXISTS(SELECT entry FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = item.entry) AND ID < '.$TextID.' ORDER BY ID DESC LIMIT 1';
    405   } else
    406   {
    407     $sql = 'SELECT ID FROM '.$Table.' as item WHERE Language = 0 AND NOT EXISTS(SELECT entry FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = item.entry) AND ID > '.$TextID.' ORDER BY ID LIMIT 1';
    408   }
     391    $sql = 'SELECT `ID` FROM `'.$Table.'` AS `item` WHERE '.
     392      '(`Language` = '.$Config['OriginalLanguage'].') AND NOT EXISTS(SELECT `entry` '.
     393      'FROM `'.$Table.'` AS `sub` WHERE (`sub`.`Language` <> '.$Config['OriginalLanguage'].') '.
     394      'AND (`sub`.`entry` = `item`.`entry`)) AND (`ID` < '.$TextID.') ORDER BY `ID` DESC LIMIT 1';
     395    else $sql = 'SELECT `ID` FROM `'.$Table.'` AS `item` WHERE '.
     396      '(`Language` = '.$Config['OriginalLanguage'].') AND NOT EXISTS(SELECT `entry` '.
     397      'FROM `'.$Table.'` AS `sub` WHERE (`sub`.`Language` <> '.$Config['OriginalLanguage'].') '.
     398      'AND (`sub`.`entry` = `item`.`entry`)) AND `ID` > '.$TextID.' ORDER BY `ID` LIMIT 1';
    409399 
    410400  $DbResult = $System->Database->query($sql);
     
    570560function GetTranslatNames($Text,$mode,$TablesColumn)
    571561{
    572   global $System;
     562  global $System, $Config;
    573563 
    574564 /* $TablesID = array('gameobject' => 5,
     
    582572  foreach($TablesColumn as $Table => $Column)
    583573  { 
    584     $sql = 'SELECT `ID`,`'.$Column.'`, (SELECT `'.$Column.'` FROM `'.$Table.'` AS `T` WHERE `O`.`Entry` = `T`.`Entry` AND `Language` <> 0 LIMIT 1) AS `Tran` FROM `'.$Table.'` AS `O` WHERE ';
     574    $sql = 'SELECT `ID`,`'.$Column.'`, (SELECT `'.$Column.'` FROM `'.$Table.'` AS `T` WHERE '.
     575      '(`O`.`Entry` = `T`.`Entry`) AND (`Language` <> '.$Config['OriginalLanguage'].') LIMIT 1) AS `Tran` FROM `'.$Table.'` AS `O` WHERE ';
    585576    $groupby = ' GROUP BY `'.$Column.'`';
    586577 
    587578    $ArrStr = explode(' ', $Text);
    588     $where = '`Language` = 0 ';
    589     if ($mode == 1) $where .= ' AND EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> 0) AND (`Sub`.`Entry` = `O`.`Entry`))';
    590     if ($mode == 2) $where .= ' AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> 0) AND (`Sub`.`Entry` = `O`.`Entry`))';
     579    $where = '(`Language` = '.$Config['OriginalLanguage'].') ';
     580    if ($mode == 1) $where .= ' AND EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> '.$Config['OriginalLanguage'].') AND (`Sub`.`Entry` = `O`.`Entry`))';
     581    if ($mode == 2) $where .= ' AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> '.$Config['OriginalLanguage'].') AND (`Sub`.`Entry` = `O`.`Entry`))';
    591582    $where .= ' AND (';
    592583   
Note: See TracChangeset for help on using the changeset viewer.