Changeset 445 for trunk/export


Ignore:
Timestamp:
Apr 11, 2010, 4:24:53 PM (15 years ago)
Author:
maron
Message:

Exportování starších textů, které nemají vliv na verzi clienta pokud nejsou dostupné nejnovější

Location:
trunk/export
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/create_addon.php

    r407 r445  
    107107    while($Group = $DbResult->fetch_assoc())
    108108    {
     109      $ID = $this->Database->query('SELECT LastVersion FROM `Group` WHERE Id = '.$Group['Id']);
     110      $LastVersion = $ID->fetch_assoc();
     111     
     112      if ($LastVersion['LastVersion'] < $this->ClientVersion['BuildNumber'])
     113        $ExportVersion = $LastVersion['LastVersion'];
     114      else $ExportVersion = '';
     115
    109116      foreach($TranslationTree[$Group['Id']]['Items'] as $Column)
    110117      if($Column['AddonFileName'] != '') 
     
    123130        $Buffer = 'CZWOW_'.$Column['AddonFileName'].'_count='.$FileIndex.';CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={';
    124131   
    125         $DbResult2 = $this->Database->query($this->BuildQuery($Group));
     132        $DbResult2 = $this->Database->query($this->BuildQuery($Group,'',$ExportVersion));
    126133       
    127134        while($Line = $DbResult2->fetch_assoc())
  • trunk/export/export.php

    r444 r445  
    3939  }
    4040 
    41   function BuildQuery($Group, $Columns = '')
     41  function BuildQuery($Group, $Columns = '', $Version = '')
    4242  {
    4343    global $TranslationTree;
     44   
     45    if ($Version <> '')
     46      $ExportVersion = $Version;
     47    else
     48      $ExportVersion = $this->ClientVersion['BuildNumber'];
    4449   
    4550    $Query = 'SELECT * FROM (SELECT `T`.*, '.$Columns.'`User`.`Name` AS `UserName` FROM `'.$Group['TablePrefix'].'` AS `T`'.
     
    4752    ' JOIN `User` ON `User`.`ID`=`T`.`User`'.
    4853    ' JOIN `ExportLanguage` ON (`ExportLanguage`.`Export`='.$this->Id.')'.
    49     ' WHERE (`Complete` = 1) AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].')'.
     54    ' WHERE (`Complete` = 1) AND (`VersionStart` <= '.$ExportVersion.') AND (`VersionEnd` >= '.$ExportVersion.')'.
    5055    ' ORDER BY `ExportLanguage`.`Sequence`, `ExportUser`.`Sequence`) AS `TT` GROUP BY `TT`.`Entry`';
    51    
     56
    5257    // Build columns for english texts
    5358    $OriginalColumns = '';
Note: See TracChangeset for help on using the changeset viewer.