- Timestamp:
- 03/30/10 23:49:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/www/app/models/request.php
r307 r339 71 71 $this->Preprocessor->callback('validateFile'); 72 72 $this->Preprocessor->callback('saveField', 'state', self::STATE_QUEUED); 73 $this->Preprocessor->errback(' saveField', 'state', self::STATE_PREPROCESSOR_FAILED);73 $this->Preprocessor->errback('preprocessorError'); 74 74 } 75 75 … … 404 404 $this->data['Request']['state_info'] = $result; 405 405 $this->data['Request']['expire'] = date('Y-m-d H:i:s'); 406 $this->save(); 407 406 408 $this->log('Clamd scanned ' . $path . ' (Request ID: ' . $this->id . '): FOUND ' . $result, LOG_DEBUG); 407 409 return false; … … 416 418 $this->data['Request']['state_info'] = $result; 417 419 $this->data['Request']['expire'] = date('Y-m-d H:i:s'); 420 $this->save(); 418 421 419 422 $this->log('Clamd error scanning ' . $path . ' (Request ID: ' . $this->id . '): ' . $result); … … 493 496 return true; 494 497 } 498 499 public function preprocessorError() 500 { 501 $state = $this->field('state'); 502 if ($state == self::STATE_PREPROCESSOR_QUEUED) { 503 $this->saveField('state', self::STATE_PREPROCESSOR_FAILED); 504 } 505 } 495 506 } 496 507
Note: See TracChangeset
for help on using the changeset viewer.