/** * @return boolean */ public function delete() { if (!$this->exists()) { return false; } // Unlink articles ArticleAuthor::OnAuthorDelete($this->getId()); // Unlink aliases AuthorAlias::OnAuthorDelete($this->getId()); // Unlink authors AuthorAssignedType::OnAuthorDelete($this->getId()); // Unlink biographies AuthorBiography::OnAuthorDelete($this->getId()); // Save author data for logging purposes $tmpData = $this->m_data; // Delete row from Authors table. $result = parent::delete(); if ($result) { if (function_exists("camp_load_translation_strings")) { camp_load_translation_strings("api"); } $logText = getGS('Author #$1 "$2" deleted.', $tmpData['id'], $tmpData['first_name'] . ' ' . $tmpData['last_name']); Log::Message($logText, null, 174); } return $result; }
/** * @return boolean */ public function delete() { if (!$this->exists()) { return false; } // Unlink articles ArticleAuthor::OnAuthorDelete($this->getId()); // Unlink aliases AuthorAlias::OnAuthorDelete($this->getId()); // Unlink authors AuthorAssignedType::OnAuthorDelete($this->getId()); // Unlink biographies AuthorBiography::OnAuthorDelete($this->getId()); // Save author data for logging purposes $tmpData = $this->m_data; // Delete row from Authors table. $result = parent::delete(); return $result; }