Changeset 366 for trunk/export/create_addon.php
- Timestamp:
- Mar 9, 2010, 1:01:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/create_addon.php
r334 r366 104 104 $CreatedFileListCount = array(); 105 105 106 $DbResult = $this->Database->query('SELECT ` group`.* FROM `ExportGroup` JOIN `group` ON `group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$this->Id.' AND `group`.`TablePrefix` != ""');106 $DbResult = $this->Database->query('SELECT `Group`.* FROM `ExportGroup` JOIN `Group` ON `Group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$this->Id.' AND `Group`.`TablePrefix` != ""'); 107 107 while($Group = $DbResult->fetch_assoc()) 108 108 { … … 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)';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 126 $DbResult2 = $this->Database->query($Query); 127 127 128 128 129 129 if ($this->Database->affected_rows == 0) { 130 131 132 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)';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 135 $DbResult2 = $this->Database->query($Query); 136 137 136 137 } 138 138 139 139 while($Line = $DbResult2->fetch_assoc()) … … 202 202 function MakeReadme() 203 203 { 204 $DbResult = $this->Database->query('SELECT * FROM verseclient ORDER BY DATEDESC');204 $DbResult = $this->Database->query('SELECT * FROM `CzWoWPackageVersion` ORDER BY `Date` DESC'); 205 205 $Line = $DbResult->fetch_assoc(); 206 206 … … 216 216 217 217 Verze: 218 Verze Addonu: '.$Line[' verse'].'218 Verze Addonu: '.$Line['Version'].' 219 219 Tato verze je pro verzi hry '.$this->ClientVersion['Version'].' 220 220 … … 222 222 223 223 '; 224 $DbResult = $Database->query('SELECT * FROM verseclient ORDER BY DATE 225 DESC'); 224 $DbResult = $Database->query('SELECT * FROM `CzWoWPackageVersion` ORDER BY `Date` DESC'); 226 225 while($Line = $DbResult->fetch_assoc()) 227 226 { 228 227 $Buffer .=' 229 Verze: '.$Line[' verse'].'228 Verze: '.$Line['Version'].' 230 229 ============= 231 230 '.$Line['text'].'
Note:
See TracChangeset
for help on using the changeset viewer.