Ignore:
Timestamp:
Apr 7, 2020, 10:15:48 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Export/ProcessTask.php

    r869 r880  
    2323  function DeleteOldFiles($deldir)
    2424  {
    25     if(file_exists($deldir.'/'))
     25    if (file_exists($deldir.'/'))
    2626    {
    2727      $Dir = opendir($deldir.'/') ;
    28       while(($File = readdir($Dir)) !== false)
     28      while (($File = readdir($Dir)) !== false)
    2929      {
    30         if(($File != '..') and ($File != '.') and (!is_dir($File))) unlink($deldir.'/'.$File);
     30        if (($File != '..') and ($File != '.') and (!is_dir($File))) unlink($deldir.'/'.$File);
    3131      }
    3232      closedir($Dir);
     
    5656  function MPQPack($packdir)
    5757  {
    58     if(file_exists($packdir.DIRECTORY_SEPARATOR))
     58    if (file_exists($packdir.DIRECTORY_SEPARATOR))
    5959    {
    6060      $Dir = opendir($packdir.DIRECTORY_SEPARATOR);
    61       while(($File = readdir($Dir)) !== false)
     61      while (($File = readdir($Dir)) !== false)
    6262      {
    63         if(($File != '..') and ($File != '.')) {
     63        if (($File != '..') and ($File != '.')) {
    6464          $File = str_replace('/', DIRECTORY_SEPARATOR, $File);
    6565          $InDir = '';
     
    109109    // Delete old files
    110110    $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');
    112112
    113113    $this->SetProgress(20);
    114     if(function_exists('gzcompress'))
     114    if (function_exists('gzcompress'))
    115115    {
    116116      $Export->ExportToDBC();
     
    185185    global $Config;
    186186
    187     while(1)
     187    while (1)
    188188    {
    189189      $DbResult = $this->Database->query('SELECT `ExportTask`.`Id`, `ExportTask`.`Export`, '.
     
    191191        'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '.
    192192        '(`ExportTask`.`TimeFinish` IS NULL) ORDER BY `TimeQueued`');
    193       while($Task = $DbResult->fetch_assoc())
     193      while ($Task = $DbResult->fetch_assoc())
    194194      {
    195195        $this->Id = $Task['Id'];
    196         if($Task['ExportId'] != '')
     196        if ($Task['ExportId'] != '')
    197197        {
    198198          try
     
    201201            $this->Database->update('ExportTask', '`Id`='.$this->Id, array('TimeStart' => 'NOW()'));
    202202
    203             if($Task['ExportOutput'] == 9)
     203            if ($Task['ExportOutput'] == 9)
    204204            {
    205205              $this->ExportDBC($Task);
    206206            } else
    207             if($Task['ExportOutput'] == 10)
     207            if ($Task['ExportOutput'] == 10)
    208208            {
    209209              $this->ExportEXE($Task);
Note: See TracChangeset for help on using the changeset viewer.