function delete() { global $db, $config_vars; if (check_auth_action_allowed()) { // remove from content table $sql = "DELETE FROM " . $config_vars['table_prefix'] . get_class($this) . "s WHERE id = " . $this->id; if (!($result = $db->sql_query($sql))) { error_report(SQL_ERROR, 'delete', __LINE__, __FILE__, $sql); } unset($this->id); } return OP_NP_MISSING_DELETE; }
function delete() { global $db, $config_vars; if (check_auth_action_allowed()) { // remove from content table $sql = "DELETE FROM " . $config_vars['table_prefix'] . get_class($this) . " WHERE (usergroup_id = {$this->usergroup_id}) and (usergroupgroup_id = {$this->usergroupgroup_id})"; if (!($result = $db->sql_query($sql))) { $error = new phreak_error(E_WARNING, SQL_ERROR, __LINE__, __FILE__, 'delete', $this->id, 0, 0, $sql); $error->commit(); // error_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql); } unset($this->id); } else { return OP_NP_MISSING_DELETE; } }
function check_group_action_allowed() { return check_auth_action_allowed(); }