Changeset 407 for trunk/export/create_addon.php
- Timestamp:
- Mar 28, 2010, 6:09:33 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/create_addon.php
r400 r407 123 123 $Buffer = 'CZWOW_'.$Column['AddonFileName'].'_count='.$FileIndex.';CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={'; 124 124 125 $Query = 'SELECT `T2`.`'.$Column['Column'].'` AS `Translation`, `T3`.`'.$Column['Column'].'` AS `Original` FROM (SELECT `T1`.`Entry`, `T1`.`'.$Column['Column'].'` FROM (SELECT `Entry`,`'.$Column['Column'].'` FROM `'.$Group['TablePrefix'].'` WHERE (`Complete` = 1) AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].') AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS `T1` GROUP BY `T1`.`Entry`) AS `T2` JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T2`.`Entry` = `T3`.`Entry`) AND (`T3`.`Language` = 0)'; 126 $DbResult2 = $this->Database->query($Query); 127 128 129 if ($this->Database->affected_rows == 0) { 130 $ID = $this->Database->query('SELECT MAX(`VersionEnd`) FROM `'.$Group['TablePrefix'].'`'); 131 $BuildNumber_max = $ID->fetch_assoc(); 132 $BuildNumber_max = $BuildNumber_max['MAX(`VersionEnd`)']; 133 134 $Query = 'SELECT `T2`.`'.$Column['Column'].'` AS `Translation`, `T3`.`'.$Column['Column'].'` AS `Original` FROM (SELECT `T1`.`Entry`, `T1`.`'.$Column['Column'].'` FROM (SELECT `Entry`,`'.$Column['Column'].'` FROM `'.$Group['TablePrefix'].'` WHERE (`Complete` = 1) AND (`VersionStart` <= '.$BuildNumber_max.') AND (`VersionEnd` >= '.$BuildNumber_max.') AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS `T1` GROUP BY `T1`.`Entry`) AS `T2` JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T2`.`Entry` = `T3`.`Entry`) AND (`T3`.`Language` = 0)'; 135 $DbResult2 = $this->Database->query($Query); 136 137 } 125 $DbResult2 = $this->Database->query($this->BuildQuery($Group)); 138 126 139 127 while($Line = $DbResult2->fetch_assoc()) 140 128 { 141 $en = trim($this->ReplaceEnText($Line[' Original']));142 $cz = $this->ReplaceCzText($Line[ 'Translation']);129 $en = trim($this->ReplaceEnText($Line['En'.$Column['Column']])); 130 $cz = $this->ReplaceCzText($Line[$Column['Column']]); 143 131 if(($en <> '') and ($cz <> '') and ($this->NotCancel($en))) 144 132 { … … 174 162 $Group = $TranslationTree[14]; // client table 175 163 $Column['Column'] = 'Text'; 176 $Query = 'SELECT `T2`.`'.$Column['Column'].'` AS `Translation`, `T3`.`'.$Column['Column'].'` AS `Original`, `T3`.`ShortCut` FROM (SELECT `T1`.`Entry`, `T1`.`'.$Column['Column'].'` FROM (SELECT `Entry`,`'.$Column['Column'].'` FROM '.$Group['TablePrefix'].' WHERE (`Complete` = 1) AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].') AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS `T1` GROUP BY `T1`.`Entry`) AS `T2` JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T2`.`Entry` = `T3`.`Entry`) AND (`T3`.`Language` = 0)';177 $DbResult = $this->Database->query($ Query);164 165 $DbResult = $this->Database->query($this->BuildQuery($Group)); 178 166 while($Line = $DbResult->fetch_array()) 179 167 { 180 $Original = $this->my_trim($Line[' Original']);181 $Translated = $this->my_trim($Line[ 'Translation']);182 if 168 $Original = $this->my_trim($Line['En'.$Column['Column']]); 169 $Translated = $this->my_trim($Line[$Column['Column']]); 170 if($this->ClientVersion['Version'] == '2.4.3') 183 171 { 184 172 $Original = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Original);
Note:
See TracChangeset
for help on using the changeset viewer.