/** * @see parent::delete() */ function delete() { // Remove previews $this->loadRefsFiles(); foreach ($this->_ref_files as $_file) { $_file->delete(); } if ($msg = parent::delete()) { return $msg; } // Actually remove the file @unlink($this->_file_path); // Delete any index entries $query = "DELETE FROM files_index_mediboard WHERE file_id = '{$this->_id}'"; if (!$this->_spec->ds->exec($query)) { return $this->_spec->ds->error(); } return null; }
/** * Suppression de document / modèle * * @return string */ function delete() { $this->completeField("content_id"); $this->loadContent(false); $this->loadRefsFiles(); // Remove PDF preview foreach ($this->_ref_files as $_file) { $_file->delete(); } if ($msg = parent::delete()) { return $msg; } // Remove content return $this->_ref_content->delete(); }