44 $this->module = $a_module;
46 if (!is_object($ilDB))
48 die (
"Fatal Error: ilSettings object instantiated without DB initialisation.");
51 $query =
"SELECT * FROM settings WHERE module=" . $ilDB->quote($this->module);
52 $res = $ilDB->query($query);
56 $this->setting[$row[
"keyword"]] = $row[
"value"];
71 function get($a_keyword, $a_default_value =
false)
73 if ($a_keyword ==
"ilias_version")
78 if (isset($this->setting[$a_keyword]))
80 return $this->setting[$a_keyword];
84 return $a_default_value;
98 $query =
"DELETE FROM settings WHERE module = ".$ilDB->quote($this->module).
" ";
100 $this->settings = array();
110 function delete($a_keyword)
114 $query =
"DELETE FROM settings WHERE keyword = ".
115 $ilDB->quote($a_keyword) .
" AND module=" . $ilDB->quote($this->module);
116 $ilDB->query($query);
117 unset($this->setting[$a_keyword]);
141 function set($a_key, $a_val)
145 $sql =
"DELETE FROM settings WHERE keyword=".$ilDB->quote($a_key).
146 " AND module=" . $ilDB->quote($this->module);
149 $sql =
"INSERT INTO settings (module, keyword, value) VALUES (".
150 $ilDB->quote($this->module) .
",".$ilDB->quote($a_key).
",".$ilDB->quote($a_val).
")";
153 $this->setting[$a_key] = $a_val;