Ignore:
Timestamp:
Sep 12, 2013, 11:19:43 PM (11 years ago)
Author:
chronos
Message:
  • Fixed: Make absolute path in some recorded logs.
  • Fixed: Do not use global variable $User in export.
File:
1 edited

Legend:

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

    r573 r582  
    5050  function BuildQuery($Group, $Columns = '', $Version = '')
    5151  {
    52     global $TranslationTree, $Config;
     52    global $TranslationTree;
    5353   
    5454    if ($Version <> '')
     
    7373    $Query = 'SELECT `T4`.*, '.$OriginalColumns.' FROM ('.$Query.') AS `T4` '.
    7474    ' LEFT JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T3`.`Entry` = `T4`.`Entry`) '.
    75     'AND (`T3`.`Language` = '.$Config['OriginalLanguage'].') AND '.
     75    'AND (`T3`.`Language` = '.$this->System->Config['OriginalLanguage'].') AND '.
    7676    '(`T3`.`VersionStart` = `T4`.`VersionStart`) AND (`T3`.`VersionEnd` = `T4`.`VersionEnd`)'; 
    7777
     
    8181  function ExportToMangosSQL()
    8282  {
    83     global $TranslationTree, $User, $Config;
     83    global $TranslationTree;
    8484 
    8585    $this->LoadFilters();
     
    9393      "-- Znaková sada: ".$this->Config['Database']['Charset']." / ".$this->Config['Web']['Charset']."\n".
    9494      "-- Diakritika: ".$this->AnoNe[$this->Export['WithDiacritic']]."\n".
    95       "-- Vygeneroval uživatel: ".$User->Name."\n".
     95      "-- Vygeneroval uživatel: ".$this->System->User->Name."\n".
    9696      "-- Vzato od uživatelů: ".$this->UserNames."\n".
    9797      "-- Generované tabulky: ";
     
    149149  function ExportToAoWoWSQL()
    150150  {
    151     global $Config, $TranslationTree, $AoWoWconf;
     151    global $TranslationTree, $AoWoWconf;
    152152 
    153153    //require_once('../aowow/configs/config.php');
     
    175175        $Ori_text = $Line['name'];
    176176        $DbResult2 = $Database2->query('SELECT `Text` AS `En`,
    177         (SELECT `Text` FROM `'.$Config['Database']['Database'].'`.`TextGlobalString` AS `TableTran`
     177        (SELECT `Text` FROM `'.$this->System->Config['Database']['Database'].'`.`TextGlobalString` AS `TableTran`
    178178         WHERE `TableEn`.`Entry` = `TableTran`.`Entry` AND (`Complete` = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.' LIMIT 1) AS `Tran`
    179          FROM `'.$Config['Database']['Database'].'`.`TextGlobalString` AS `TableEn` WHERE
     179         FROM `'.$this->System->Config['Database']['Database'].'`.`TextGlobalString` AS `TableEn` WHERE
    180180          `Text` = "'.addslashes($Ori_text).'" LIMIT 1');
    181181        $Tran = $DbResult2->fetch_assoc();
     
    205205  function ExportToXML()
    206206  {
    207     global $TranslationTree, $User;
     207    global $TranslationTree;
    208208 
    209209    $this->LoadFilters();
     
    215215    "    <time>".date('r')."</time>\n".
    216216    "    <diacritics mode=".'"'.$this->Export['WithDiacritic'].'"'." />\n".
    217     "    <author>".$User->Name."</author>\n".
     217    "    <author>".$this->System->User->Name."</author>\n".
    218218    "    <contributors>\n";
    219219    foreach(explode(',', $this->UserNames) as $UserName)
     
    258258  function ExportToDBC()
    259259  {
    260     global $TranslationTree, $Config;
     260    global $TranslationTree;
    261261 
    262262    $this->LoadFilters();
Note: See TracChangeset for help on using the changeset viewer.