Changeset 880 for trunk/Modules/Export/ProcessTask.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ProcessTask.php
r869 r880 23 23 function DeleteOldFiles($deldir) 24 24 { 25 if (file_exists($deldir.'/'))25 if (file_exists($deldir.'/')) 26 26 { 27 27 $Dir = opendir($deldir.'/') ; 28 while (($File = readdir($Dir)) !== false)28 while (($File = readdir($Dir)) !== false) 29 29 { 30 if (($File != '..') and ($File != '.') and (!is_dir($File))) unlink($deldir.'/'.$File);30 if (($File != '..') and ($File != '.') and (!is_dir($File))) unlink($deldir.'/'.$File); 31 31 } 32 32 closedir($Dir); … … 56 56 function MPQPack($packdir) 57 57 { 58 if (file_exists($packdir.DIRECTORY_SEPARATOR))58 if (file_exists($packdir.DIRECTORY_SEPARATOR)) 59 59 { 60 60 $Dir = opendir($packdir.DIRECTORY_SEPARATOR); 61 while (($File = readdir($Dir)) !== false)61 while (($File = readdir($Dir)) !== false) 62 62 { 63 if (($File != '..') and ($File != '.')) {63 if (($File != '..') and ($File != '.')) { 64 64 $File = str_replace('/', DIRECTORY_SEPARATOR, $File); 65 65 $InDir = ''; … … 109 109 // Delete old files 110 110 $this->DeleteOldFiles($Export->TempDir.'dbc'); 111 if (file_exists($Export->TempDir.'CzWoW_DBC.zip')) unlink($Export->TempDir.'CzWoW_DBC.zip');111 if (file_exists($Export->TempDir.'CzWoW_DBC.zip')) unlink($Export->TempDir.'CzWoW_DBC.zip'); 112 112 113 113 $this->SetProgress(20); 114 if (function_exists('gzcompress'))114 if (function_exists('gzcompress')) 115 115 { 116 116 $Export->ExportToDBC(); … … 185 185 global $Config; 186 186 187 while (1)187 while (1) 188 188 { 189 189 $DbResult = $this->Database->query('SELECT `ExportTask`.`Id`, `ExportTask`.`Export`, '. … … 191 191 'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '. 192 192 '(`ExportTask`.`TimeFinish` IS NULL) ORDER BY `TimeQueued`'); 193 while ($Task = $DbResult->fetch_assoc())193 while ($Task = $DbResult->fetch_assoc()) 194 194 { 195 195 $this->Id = $Task['Id']; 196 if ($Task['ExportId'] != '')196 if ($Task['ExportId'] != '') 197 197 { 198 198 try … … 201 201 $this->Database->update('ExportTask', '`Id`='.$this->Id, array('TimeStart' => 'NOW()')); 202 202 203 if ($Task['ExportOutput'] == 9)203 if ($Task['ExportOutput'] == 9) 204 204 { 205 205 $this->ExportDBC($Task); 206 206 } else 207 if ($Task['ExportOutput'] == 10)207 if ($Task['ExportOutput'] == 10) 208 208 { 209 209 $this->ExportEXE($Task);
Note:
See TracChangeset
for help on using the changeset viewer.