/**
* Delete record
* @param int|string $id
* @return bool True in case of success
* @throws \Exception
*/
public function delete($id, $extCall = false)
{
$this->gp->checkAccess(__FUNCTION__, $extCall);
$parsed_arg = $this->checkArguments($id);
if (is_numeric($parsed_arg) !== true) {
throw new \Exception("Argumunt is not a string", 6024);
}
if ($this->isImplement("FileManage")) {
$this->deleteFile($parsed_arg);
}
if (EMA_DEBUG && EMA_LOG_SQL_QUERIES) {
$this->logDeleteQuery($this->dbTable, array("id" => $parsed_arg));
}
$dbData = $this->dbConnection->delete($this->dbTable, array("id" => $parsed_arg));
if (is_numeric($dbData) === false || $dbData < 1) {
$this->throwMysqlError();
}
if ($this->isImplement("Sitemap")) {
$this->generateSitemap();
}
if ($this->isImplement("RssFeed")) {
$this->rssFeedUpdate();
}
return true;
}