Changeset 865 for trunk


Ignore:
Timestamp:
Feb 5, 2016, 11:51:42 PM (9 years ago)
Author:
chronos
Message:
  • Fixed: Division by zero error in case of zero progress of export task.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r864 r865  
    77
    88$Version = '1.0';
    9 $Revision = 864; // Subversion revision
     9$Revision = 865; // Subversion revision
    1010$DatabaseRevision = 857; // Database structure revision
    1111$ReleaseDate = strtotime('2016-02-05');
  • trunk/Modules/Export/Export.php

    r864 r865  
    744744      // Show estimated time to complete
    745745      $PrefixMultiplier = new PrefixMultiplier();
    746       $EstimatedTime = (time() - MysqlDateTimeToTime($Task['TimeStart'])) / $Task['Progress'] * (100 - $Task['Progress']);
    747       $Output .= 'Zbývající odhadovaný čas: '.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'<br/>';
     746      if($Task['Progress'] > 0) {
     747        $EstimatedTime = (time() - MysqlDateTimeToTime($Task['TimeStart'])) / $Task['Progress'] * (100 - $Task['Progress']);
     748        $Output .= 'Zbývající odhadovaný čas: '.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'<br/>';
     749      }
    748750
    749751      if($Task['Progress'] > 99)
Note: See TracChangeset for help on using the changeset viewer.