Ignore:
Timestamp:
Mar 6, 2023, 12:16:38 PM (14 months ago)
Author:
chronos
Message:
  • Fixed: Export error due to PHP 8.1 deprecated code.
  • Modified: Code cleanup.
File:
1 edited

Legend:

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

    r890 r894  
    3737  {
    3838    if (file_exists($dst)) $this->DeleteOldFiles($dst);
    39     if (is_dir($src)) {
     39    if (is_dir($src))
     40    {
    4041      if (!file_exists($dst)) mkdir($dst, 0777, true);
    4142      $files = scandir($src);
    4243      foreach ($files as $file)
    43       if ($file != "." and $file != ".." and (!is_dir($src.'/'.$file))) $this->rcopy($src.'/'.$file, $dst.'/'.$file);
     44      {
     45        if (($file != ".") and ($file != "..") and (!is_dir($src.'/'.$file)))
     46          $this->rcopy($src.'/'.$file, $dst.'/'.$file);
     47      }
    4448    }
    4549    else if (file_exists($src)) copy($src, $dst);
     
    117121    if (function_exists('gzcompress'))
    118122    {
    119       $Export->ExportToDBC();
     123      echo(strip_tags($Export->ExportToDBC()));
    120124      echo('Komprese...'."\n");
    121       exec('zip -r -j '.$Export->TempDir.'CzWoW_DBC.zip '.$Export->TempDir.'dbc/');
     125      $SourceDir = $Export->TempDir.'dbc/';
     126      if (file_exists($SourceDir))
     127      {
     128        exec('zip -r -j '.$Export->TempDir.'CzWoW_DBC.zip '.$SourceDir);
     129      } else echo('Directory doesn\'t exist '.$SourceDir);
    122130      $this->SetProgress(80);
    123131    } else echo('Funkce pro tvorbu Zip souboru není podporována!'."\n");
Note: See TracChangeset for help on using the changeset viewer.