Ignore:
Timestamp:
Apr 12, 2010, 8:27:00 PM (15 years ago)
Author:
maron
Message:

Oprava při vybrání pouze některých překladů u addonu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/create_addon.php

    r445 r451  
    107107    while($Group = $DbResult->fetch_assoc())
    108108    {
     109          //získání čísla verze pro export
    109110      $ID = $this->Database->query('SELECT LastVersion FROM `Group` WHERE Id = '.$Group['Id']);
    110111      $LastVersion = $ID->fetch_assoc();
     
    150151      }
    151152    }
     153
     154
     155    // Generete list file of translated
     156    $CountFiles = 'CountFiles.lua';
     157    $Buffer = '';
     158    foreach($CreatedFileList as $CreatedFile)
     159      $Buffer .= 'CZWOW_'.str_replace('_','_count=',$CreatedFile).';'."\n";
     160    foreach($TranslationTree as $Group)
     161      foreach($TranslationTree[$Group['Id']]['Items'] as $Column)
     162      if (($Column['AddonFileName'] != '') and (!in_array($Column['AddonFileName'].'_1', $CreatedFileList)))
     163      {
     164        $Buffer .= 'CZWOW_'.$Column['AddonFileName'].'_count=0;'."\n";
     165          }
     166         
     167    file_put_contents($this->TempDir.'CzWoW/'.$CountFiles, $Buffer);
     168 
    152169 
    153170    // Generate file Translates.xml
    154171    $Buffer = '<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/.\FrameXML\UI.xsd">'."\n";
     172    $Buffer .= '<script file="'.$CountFiles.'"/>'."\n";
    155173    foreach($CreatedFileList as $CreatedFile)
    156174      $Buffer .= '<script file="'.$CreatedFile.'.lua"/>'."\n";
     
    170188    $Column['Column'] = 'Text';
    171189   
    172     $DbResult = $this->Database->query($this->BuildQuery($Group));
     190    $DbResult = $this->Database->query('SELECT `Group`.* FROM `ExportGroup` JOIN `Group` ON `Group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$this->Id.' AND `Group`.`TablePrefix` != "" AND `Group`.`Id` = 14');
     191    //$Group = $DbResult->fetch_assoc();
     192    if ($DbResult->num_rows == 0)
     193      $CanGenerated = '-1';
     194    else
     195      $CanGenerated = '';
     196   
     197    $DbResult = $this->Database->query($this->BuildQuery($Group,'',$CanGenerated));
    173198    while($Line = $DbResult->fetch_array())
    174199    {
Note: See TracChangeset for help on using the changeset viewer.