function deleteKey($user, $key) {
global $prefs_cache;
- $this->open();
+ if (!$this->open()) {
+ return false;
+ }
$query = sprintf("DELETE FROM %s WHERE user='%s' AND prefkey='%s'",
$this->table,
$this->dbh->quoteString($user),
}
function setKey($user, $key, $value) {
- $this->open();
+ if (!$this->open()) {
+ return false;
+ }
$query = sprintf("REPLACE INTO %s (user,prefkey,prefval) ".
"VALUES('%s','%s','%s')",
$this->table,
function fillPrefsCache($user) {
global $prefs_cache;
- $this->open();
+ if (!$this->open()) {
+ return;
+ }
$prefs_cache = array();
$query = sprintf("SELECT prefkey, prefval FROM %s ".
* but it is not, so....
*/
function renumberHighlightList($user) {
- $this->open();
+ if (!$this->open()) {
+ return;
+ }
$query = sprintf("SELECT * FROM %s WHERE user='%s' ".
"AND prefkey LIKE 'highlight%%' ORDER BY prefkey",
$this->table,