Changeset 776 for trunk/Modules/Export
- Timestamp:
- Feb 2, 2014, 8:28:37 PM (11 years ago)
- Location:
- trunk/Modules/Export
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/CreateAddon.php
r731 r776 133 133 134 134 $Buffer = 'CZWOW_'.$Column['AddonFileName'].'_count='.$FileIndex.';CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={'; 135 136 $DbResult2 = $this->Database->query($this->BuildQuery($Group,$ExportVersion)); 135 $TableTexts = array(); 136 137 //old version 138 //get version before 139 $BuildNumber = $ExportVersion; 140 if ($ExportVersion == '') $BuildNumber = $this->ClientVersion['BuildNumber']; 141 $ID = $this->Database->query('SELECT `BuildNumber` FROM `ClientVersion` WHERE '. 142 ' `Imported` = 1 AND `BuildNumber` < '.$BuildNumber.' ORDER BY `BuildNumber` DESC LIMIT 1'); 143 if($ID->num_rows > 0) { 144 $ExportVersionOld = $ID->fetch_assoc(); 145 $ExportVersionOld = $ExportVersionOld['BuildNumber']; 137 146 147 echo 'old:'.$ExportVersionOld.' last:'.$ExportVersion; 148 149 $DbResult2 = $this->Database->query($this->BuildQuery($Group,$ExportVersionOld)); 150 while($Line = $DbResult2->fetch_assoc()) 151 { 152 $en = trim($this->ReplaceEnText($Line['En'.$Column['Column']])); 153 $cz = $this->ReplaceCzText($Line[$Column['Column']]); 154 if(($en <> '') and ($cz <> '') and ($this->NotCancel($en))) 155 { 156 $TableTexts[$en] = $cz; 157 } 158 } 159 } 160 //last version 161 162 $DbResult2 = $this->Database->query($this->BuildQuery($Group,$ExportVersion)); 138 163 while($Line = $DbResult2->fetch_assoc()) 139 164 { … … 142 167 if(($en <> '') and ($cz <> '') and ($this->NotCancel($en))) 143 168 { 144 $Buffer .= "\n".'["'.$en.'"]="'.$cz.'",'; 145 $i++; 169 $TableTexts[$en] = $cz; 146 170 } 147 171 } 172 173 foreach($TableTexts as $key => $value) { 174 $Buffer .= "\n".'["'.$key.'"]="'.$value.'",'; 175 $i++; 176 } 177 148 178 149 179 $Buffer = $Buffer."\n};if not CZWOW_".$Column['AddonFileName']." then CZWOW_".$Column['AddonFileName']."=0; end; CZWOW_".$Column['AddonFileName']."=CZWOW_".$Column['AddonFileName']."+".$i.";\n"; -
trunk/Modules/Export/ProcessTask.php
r740 r776 41 41 if (file_exists($dst)) DeleteOldFiles($dst); 42 42 if (is_dir($src)) { 43 if (!file_exists($dst)) mkdir($dst );43 if (!file_exists($dst)) mkdir($dst, 0777, true); 44 44 $files = scandir($src); 45 45 foreach ($files as $file) … … 133 133 echo 'Caught exception: ', $e->getMessage(), "\n"; 134 134 } 135 SetProgress($Export,100); 135 136 } else 136 137 {
Note:
See TracChangeset
for help on using the changeset viewer.