Changeset 297 for trunk/export/process_task.php
- Timestamp:
- Dec 28, 2009, 2:32:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/process_task.php
r292 r297 17 17 if($DbRow['ExportId'] != '') 18 18 { 19 $Export = new Export($System); 20 $Export->Id = $DbRow['Export']; 21 $Export->Init(); 19 try 20 { 21 $Export = new Export($System); 22 $Export->Id = $DbRow['Export']; 23 $Export->Init(); 22 24 23 if(function_exists('gzcompress')) 25 if(function_exists('gzcompress')) 26 { 27 echo('Generování DBC souborů pro export '.$Export->Id.'.. '."\n"); 28 $Export->ExportToDBC(); 29 $SaveFilename = $Export->TempDir.'/CzWoW_DBC.zip'; 30 $Zip = new zipfile(); 31 CreateZipFromDir($Zip, $Export->TempDir.'dbc/', 'DBFilesClient/'); 32 $Buffer = $Zip->file(); 33 file_put_contents($SaveFilename, $Buffer); 34 echo('Hotovo'); 35 } else echo('Funkce pro tvorbu Zip souboru není podporována!'); 36 $Database->SQLCommand('UPDATE ExportTask SET TimeFinish=NOW() WHERE Export='.$Export->Id); 37 } catch (Exception $e) 24 38 { 25 echo('Generování DBC souborů pro export '.$Export->Id.'.. '."\n"); 26 $Export->ExportToDBC(); 27 $SaveFilename = $Config['Web']['TempFolder'].'Export/'.$Export->Id.'/CzWoW_DBC.zip'; 28 $Zip = new zipfile(); 29 CreateZipFromDir($Zip, $Export->TempDir, 'DBFilesClient/'); 30 $Buffer = $Zip->file(); 31 file_put_contents($SaveFilename, $Buffer); 32 echo('Hotovo'); 33 } else echo('Funkce pro tvorbu Zip souboru není podporována!'); 34 $Database->SQLCommand('UPDATE ExportTask SET TimeFinish=NOW() WHERE Export='.$Export->Id); 39 echo 'Caught exception: ', $e->getMessage(), "\n"; 40 } 35 41 } else echo('Export '.$DbRow['Export'].' nenalezen'."\n"); 36 42 }
Note:
See TracChangeset
for help on using the changeset viewer.