Changeset 731 for trunk/Modules/Export/Export.php
- Timestamp:
- Jan 8, 2014, 1:05:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/Export.php
r729 r731 302 302 303 303 function AddProgress($add = 2) { 304 if (file_exists($this->TempDir.'progress')) { 305 $File = new FileStream(); 306 $File->OpenFile($this->TempDir.'progress'); 307 $Line = $File->ReadLine(); 308 309 $File = new FileStream(); 310 $File->CreateFile($this->TempDir.'progress'); 311 $Line+=$add; 312 $File->WriteLine($Line); 313 } 304 305 $DbResult = $this->System->Database->query('SELECT Progress FROM `ExportTask` WHERE `Export`='.$this->Id); 306 $Task = $DbResult->fetch_assoc(); 307 $per = $Task['Progress']+$add; 308 $this->System->Database->query('UPDATE `ExportTask` SET `Progress`='.$per.' WHERE `Export`='.$this->Id); 314 309 } 315 310 … … 411 406 if($Progress != $OldProgress) 412 407 { 413 if ( $Group['Id'] == 13) $this->AddProgress(0.01);408 if (($Group['Id'] == 13) and ($Progress <> 100)) $this->AddProgress(0.01); 414 409 $Output .= $Progress."%\r"; 415 410 echo($Output); … … 436 431 while($Group = $DbResult->fetch_assoc()) 437 432 { 433 $this->AddProgress(1); 438 434 // $this->AddProgress(); 439 435 $Output .= $Group['Name'].'... ';
Note:
See TracChangeset
for help on using the changeset viewer.