Load($id); $local_path = FULL_PATH . $this->GetDBField('LocalPath'); $thumb_path = FULL_PATH . $this->GetDBField('ThumbPath'); if ( file_exists($local_path) ) { unlink($local_path); } if ( file_exists($thumb_path) ) { unlink($thumb_path); } return parent::Delete($id); } }