Changeset 408 for trunk/export
- Timestamp:
- Mar 28, 2010, 6:19:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/export.php
r407 r408 50 50 ' ORDER BY `ExportLanguage`.`Sequence`, `ExportUser`.`Sequence`) AS `TT` GROUP BY `TT`.`Entry`'; 51 51 52 // Build columns for english texts 52 53 $OriginalColumns = ''; 53 54 foreach($TranslationTree[$Group['Id']]['Items'] as $Column) … … 55 56 $OriginalColumns = substr($OriginalColumns, 0, -2); 56 57 58 // Expand query for loading english texts 57 59 $Query = 'SELECT `T4`.*, '.$OriginalColumns.' FROM ('.$Query.') AS `T4` '. 58 60 ' LEFT JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T3`.`Entry` = `T4`.`Entry`) AND (`T3`.`Language` = 0) AND (`T3`.`VersionStart` = `T4`.`VersionStart`) AND (`T3`.`VersionEnd` = `T4`.`VersionEnd`)'; 59 echo($Query); 61 60 62 return($Query); 61 63 } … … 282 284 $File2->CreateFile($this->TempDir.'lua/'.$Group['LuaFileName'].'.lua'); 283 285 286 $LookupTable = array(); 284 287 $DbResult2 = $this->Database->query($this->BuildQuery($Group)); 288 while($DbRow = $DbResult2->fetch_assoc()) 289 $LookupTable[$DbRow['ShortCut']] = $DbRow; 285 290 286 291 while(!$File->EOF()) … … 295 300 $Value['Comment'] = substr(trim($LineParts[1]), 3); 296 301 297 if( $DbResult2->num_rows > 0)302 if(array_key_exists($Value['ShortCut'], $LookupTable)) 298 303 { 299 $DbRow = $ DbResult2->fetch_assoc();304 $DbRow = $LookupTable[$Value['ShortCut']]; 300 305 $Value['Text'] = addslashes($DbRow['Text']); 301 306 // Escape new line control characters
Note:
See TracChangeset
for help on using the changeset viewer.