/** * Restore (undelete) an event. */ static function undelete_event($event_id, $conn = null) { $conn = $conn ?: Persistence::get_database_object(); if (is_null($conn)) { return array("id" => null, "error" => "Couldn't get connection object."); } return Persistence::flag_as_undeleted('postmortems', 'id', $event_id, $conn); }
/** * function to UNdelete a channel from the association table * * @param $id - ID to delete * @param $conn - PDO connection object (default: null) * * @returns ( "status" => self::OK ) on success * or ( "status" => self::ERROR, "error" => "an error message" ) on failure */ static function undelete_channel($theid, $conn = null) { $conn = $conn ?: Persistence::get_database_object(); $table_name = 'irc'; if (is_null($conn)) { return array("status" => self::ERROR, "error" => "Couldn't get connection object."); } return Persistence::flag_as_undeleted($table_name, 'postmortem_id', $theid, $conn); }