Ignore:
Timestamp:
Apr 15, 2009, 8:30:13 PM (16 years ago)
Author:
maron
Message:

Generování addonu pro 2.x.x a 3.x.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/export.php

    r179 r180  
    129129        $ID = $Database->SQLCommand($Query);
    130130                while($Line = mysql_fetch_assoc($ID)) {
     131                        $Ori_text = $Line['name'];
    131132                $Tran = mysql_fetch_assoc($Database->SQLCommand('SELECT text as en,
    132133                (SELECT text FROM '.$Config['Database']['Database'].'.global_strings as tabletran
     
    134135                  AND '.$WhereUsers.' ORDER BY FIELD(User, '.$SelectedUsers.') LIMIT 1) as tran
    135136                 FROM '.$Config['Database']['Database'].'.global_strings as tableen WHERE
    136                   text = "'.addslashes($Line['name']).'" LIMIT 1'));
     137                  text = "'.addslashes($Ori_text).'" LIMIT 1'));
    137138                        //echo ($Line['name'].'='.$Tran['tran']);
     139                        if ($Tran['tran'] <> '') {} else {
     140                        $Tran = mysql_fetch_assoc($Database->SQLCommand('SELECT OptionText as en,
     141                        (SELECT OptionText FROM '.$Config['Database']['Database'].'.npc_option as tabletran
     142                         WHERE tableen.entry = tabletran.entry AND (Complete = 1) AND '.$WhereLang.'
     143                          AND '.$WhereUsers.' ORDER BY FIELD(User, '.$SelectedUsers.') LIMIT 1) as tran
     144                        FROM '.$Config['Database']['Database'].'.npc_option as tableen WHERE
     145                        OptionText = "'.addslashes($Ori_text).'" LIMIT 1'));
     146                        }
    138147                        if ($Tran['tran'] <> '')
    139148                                $Buffer .= 'UPDATE `'.$AoWoWTable.'` SET name = "'.addslashes($Tran['tran']).'" WHERE '.$IndexColum.' = '.$Line[$IndexColum].' ;'."\n";
Note: See TracChangeset for help on using the changeset viewer.