예제 #1
0
파일: Postmortem.php 프로젝트: nlsun/morgue
 /**
  * Delete an event from the database. All child assets are left in their
  * undeleted state to differentiate them from manually-deleted assets.
  *
  * @param $event_id - id of the event to get
  * @param $conn - PDO connection object, will be newly instantiated when
  *                null (default: null)
  *
  * @returns ( "status" => self::OK ) on success
  * or ( "status" => self::ERROR, "error" => "message" ) on failure
  */
 static function delete_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_deleted('postmortems', 'id', $event_id, $conn);
 }
예제 #2
0
파일: lib.php 프로젝트: lursu/morgue
 /**
  * function to delete 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 delete_channel($theid, $conn = null)
 {
     $conn = $conn ?: Persistence::get_database_object();
     if (is_null($conn)) {
         return array("status" => self::ERROR, "error" => "Couldn't get connection object.");
     }
     return Persistence::flag_as_deleted('irc', 'id', $theid, $conn);
 }