/**
  * sotfShow::delete()
  *
  * purpose: to delete data from the tables
  *
  * @return (bool)
  */
 function delete()
 {
     if (!$this->isLocal()) {
         error("Can delete only local stations");
         return false;
     }
     // delete files from the repository
     sotf_Utils::erase($this->getDir());
     // delete programmes of the station
     // TODO getallprogrammes: call delete
     // delete user permissions
     $this->db->query("DELETE FROM sotf_user_group WHERE station = '" . $this->id . "'");
     // propagate deletion to other nodes
     $data = array('what' => 'station', 'del_time' => db_Wrap::getTimestampTZ(), 'node' => $GLOBALS['nodeId']);
     sotf_Base::saveDataWithId("sotf_deletions", 'id', $this->id, $data);
     // delete station description
     return parent::delete("sotf_stations", "station");
 }
 /**
  * delete a node
  */
 function delete()
 {
     return parent::delete("sotf_neighbours", "id");
 }
 /**
  * delete a node
  */
 function delete()
 {
     return parent::delete("sotf_nodes", "id");
 }
 /** deletes the program, and all its data and files
  */
 function delete()
 {
     $id = $this->id;
     $this->deleteStats();
     $this->deleteRefs();
     // todo: delete topics
     // todo: delete extradata
     $ii = array('what' => 'item', 'id' => $id->toString(), 'del_time' => DBWrap::getTimestampTZ(), 'node' => $nodeId);
     sotf_Base::saveDataWithId("sotf_deletions", 'id', $this->id, $ii);
     return parent::delete("sotf_programmes", "id");
 }