Changeset 899 for trunk/Modules/Export


Ignore:
Timestamp:
Aug 30, 2023, 10:46:15 PM (16 months ago)
Author:
chronos
Message:
  • Fixed: Process task export error.
Location:
trunk/Modules/Export
Files:
2 edited

Legend:

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

    r898 r899  
    298298  function HaveVariable($String1, $String2, $StartChar = '$')
    299299  {
    300     if (strpos($String1, $StartChar) !== false)
     300    if (($String1 != '') and (strpos($String1, $StartChar) !== false))
    301301    {
    302302      while (strpos($String1, $StartChar) !== false)
     
    311311        if (strpos($Variable, chr(10))) $Variable = substr($Variable, 0, strpos($Variable, chr(10)));
    312312
    313         if (($Variable != '') and (strpos($String2, $Variable) === false))
     313        if (($Variable != '') and (($String2 == '') or (strpos($String2, $Variable) === false)))
    314314        {
    315315          return false;
  • trunk/Modules/Export/ProcessTask.php

    r894 r899  
    6565      while (($File = readdir($Dir)) !== false)
    6666      {
    67         if (($File != '..') and ($File != '.')) {
     67        if (($File != '..') and ($File != '.'))
     68        {
    6869          $File = str_replace('/', DIRECTORY_SEPARATOR, $File);
    6970          $InDir = '';
    70           if (strpos($packdir, 'dbc') !== false) {
     71          if (strpos($packdir, 'dbc') !== false)
     72          {
    7173            $InDir = 'DBFilesClient\\';
    7274            if (DIRECTORY_SEPARATOR == '/') // linux
    7375              $InDir = 'DBFilesClient\\\\';
    7476          }
    75           if (strpos($packdir.$File, 'luaGlobal') !== false) {
     77          if (strpos($packdir.$File, 'luaGlobal') !== false)
     78          {
    7679            $InDir = 'Interface\\FrameXML\\';
    7780            if (DIRECTORY_SEPARATOR == '/') // linux
    7881              $InDir = 'Interface\\\\FrameXML\\\\';
    7982          }
    80           if (strpos($packdir.$File, 'luaGlue') !== false) {
     83          if (strpos($packdir.$File, 'luaGlue') !== false)
     84          {
    8185            $InDir = 'Interface\\GlueXML\\';
    8286            if (DIRECTORY_SEPARATOR == '/') // linux
     
    8589
    8690          if (DIRECTORY_SEPARATOR == '/') // linux
    87             echo exec('wine cmd /C mpq.exe "'.$this->GetWinZPatch($packdir.DIRECTORY_SEPARATOR.
     91          {
     92            echo(exec('wine mpq.exe "'.$this->GetWinZPatch($packdir.DIRECTORY_SEPARATOR.
    8893              '..'.DIRECTORY_SEPARATOR).'patch-5.MPQ" '.$InDir.basename($File).' "'.
    89               $this->GetWinZPatch($packdir.DIRECTORY_SEPARATOR).$File.'" ');
    90 
     94              $this->GetWinZPatch($packdir.DIRECTORY_SEPARATOR).$File.'" '));
     95          } else
    9196          if (DIRECTORY_SEPARATOR == '\\') // windows
    92             echo exec('mpq.exe "'.$packdir.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.
    93               'patch-5.MPQ" '.$InDir.basename($File).' "'.$packdir.DIRECTORY_SEPARATOR.$File.'" ');
    94 
    95           echo "\n";
     97          {
     98            echo(exec('mpq.exe "'.$packdir.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.
     99              'patch-5.MPQ" '.$InDir.basename($File).' "'.$packdir.DIRECTORY_SEPARATOR.$File.'" '));
     100          }
     101
     102          echo("\n");
    96103        }
    97104      }
Note: See TracChangeset for help on using the changeset viewer.