Changeset 383


Ignore:
Timestamp:
07/07/10 10:49:37 (10 years ago)
Author:
sander
Message:

Properly clean up all files in a result. Fixes #36

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/www/app/models/result.php

    r367 r383  
    150150        /** 
    151151         * When deleting a result, find the Job that has it's ID and clear it. 
     152         * Also remove the files from the filesystem 
    152153         */ 
    153154        public function beforeDelete() 
     
    156157                $this->Job->id = $data['Job']['id']; 
    157158                $this->Job->saveField('result_id', ''); 
    158                 $this->deleteFile(); 
     159 
     160                $path = $this->field('path'); 
     161                if ($path) { 
     162                        $Folder = new Folder(FILES . $path); 
     163                        $Folder->delete(); 
     164                } 
    159165 
    160166                return true; 
Note: See TracChangeset for help on using the changeset viewer.