/**
  * 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_nodes", "id");
 }
 function set($name, $val)
 {
     $this->vars[$name] = $val;
     sotf_Base::setData("sotf_vars", array('name' => $name, 'value' => $val), 'name');
     debug("setvar", "{$name}={$val}");
 }
 /**
  * delete a node
  */
 function delete()
 {
     return parent::delete("sotf_neighbours", "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");
 }