Changeset 859 for trunk/Modules/Import


Ignore:
Timestamp:
Jan 21, 2016, 10:20:04 AM (9 years ago)
Author:
chronos
Message:
  • Modified: Function GetTranslationTree moved from global to Translation module where it belongs.
Location:
trunk/Modules/Import
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Import/Import.php

    r838 r859  
    1515    $this->License = 'GNU/GPL';
    1616    $this->Description = 'Support for import of data.';
    17     $this->Dependencies = array();
     17    $this->Dependencies = array('Translation');
    1818  }
    1919
     
    183183  function ImportLUA()
    184184  {
    185     global $TranslationTree, $PatchVersion;
     185    global $PatchVersion;
     186
     187    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
    186188    $Output = 'Načítání textů z LUA souboru...';
    187189
     
    237239  function UpdateTranslated()
    238240  {
    239     global $TranslationTree, $PatchVersion, $Config;
    240 
     241    global $PatchVersion, $Config;
     242
     243    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
    241244    $Output = '<br /><br />Začínám se synchronizací VersionEnd u přeložených textů<br />';
    242245    foreach($TranslationTree as $Group)
     
    341344  function ImportDBC()
    342345  {
    343     global $System, $TranslationTree, $Config;
    344 
     346    global $System, $Config;
     347
     348    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
    345349    $Output = 'Načítání textů z DBC souboru...';
    346350    if(($this->Group['DBCFileName'] != '') and ($this->Group['TablePrefix'] != ''))
     
    392396  function ImportGroup($GroupId)
    393397  {
    394     global $TranslationTree;
     398    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
    395399
    396400    $this->Group = $TranslationTree[$GroupId];
     
    406410  function ImportSQL()
    407411  {
    408     global $TranslationTree, $PatchVersion;
    409 
    410     $Output= '';
     412    global $PatchVersion;
     413
     414    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
     415    $Output = '';
    411416    $File = new FileStream();
    412417    $File->OpenFile(dirname(__FILE__).'/../../source/'.$this->Version['Version'].'/sql/'.$this->Group['MangosTable'].'.sql');
  • trunk/Modules/Import/Manage.php

    r848 r859  
    4343  function ShowMenu()
    4444  {
    45     global $TranslationTree, $System;
    46 
     45    $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree();
    4746    $Output = '<strong>Import zdrojů:</strong><br/>'.
    4847      '<a href="?action=instructions">Instrukce pro přípravu zdrojových souborů</a><br/>'.
    4948      '<a href="?action=update_translated">Zaktualizovat verze přeložených</a><br/><br/>'.
    50       'Verze klienta použitá pro import: <strong>'.$System->Config['Web']['GameVersion'].'</strong><br/>';
    51     $DbResult = $System->Database->query('SELECT COUNT(*) FROM `Group`');
     49      'Verze klienta použitá pro import: <strong>'.$this->System->Config['Web']['GameVersion'].'</strong><br/>';
     50    $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Group`');
    5251    $DbRow = $DbResult->fetch_row();
    5352    $PageList = GetPageList($DbRow[0]);
     
    6867    $Output .= $Order['Output'];
    6968
    70     $DbResult = $System->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']);
     69    $DbResult = $this->System->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']);
    7170    while($Group = $DbResult->fetch_assoc())
    7271    {
  • trunk/Modules/Import/cmd.php

    r848 r859  
    99$System->Run();
    1010$Import = new Import($System);
     11$TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree();
    1112
    1213$Output = '';
Note: See TracChangeset for help on using the changeset viewer.