projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typo
[squirrelmail.git]
/
functions
/
db_prefs.php
diff --git
a/functions/db_prefs.php
b/functions/db_prefs.php
index 40c0b7c5c3a27f63c3ff9f30b0e9268ae67a04ab..2742d90cc395a8c0571b978c86e4454b39d4a64f 100644
(file)
--- a/
functions/db_prefs.php
+++ b/
functions/db_prefs.php
@@
-9,10
+9,6
@@
* This contains functions for manipulating user preferences
* stored in a database, accessed though the Pear DB layer.
*
* This contains functions for manipulating user preferences
* stored in a database, accessed though the Pear DB layer.
*
- * To use this instead of the regular prefs.php, create a
- * database as described below, and replace prefs.php
- * with this file.
- *
* Database:
* ---------
*
* Database:
* ---------
*
@@
-81,7
+77,7
@@
class dbPrefs {
var $error = NULL;
var $db_type = SMDB_UNKNOWN;
var $error = NULL;
var $db_type = SMDB_UNKNOWN;
- var $default = Array('
chosen_theme' => '../themes/default_theme.php'
,
+ var $default = Array('
theme_default' => 0
,
'show_html_default' => '0');
function open() {
'show_html_default' => '0');
function open() {
@@
-397,33
+393,23
@@
function checkForPrefs($data_dir, $username) {
/* Writes the Signature */
function setSig($data_dir, $username, $number, $string) {
/* Writes the Signature */
function setSig($data_dir, $username, $number, $string) {
- $db = new dbPrefs;
- if(isset($db->error)) {
- $db->failQuery();
- }
-
if ($number == "g") {
$key = '___signature___';
} else {
$key = sprintf('___sig%s___', $number);
}
if ($number == "g") {
$key = '___signature___';
} else {
$key = sprintf('___sig%s___', $number);
}
-
$db->setKey(
$username, $key, $string);
+
setPref($data_dir,
$username, $key, $string);
return;
}
/* Gets the signature */
function getSig($data_dir, $username, $number) {
return;
}
/* Gets the signature */
function getSig($data_dir, $username, $number) {
- $db = new dbPrefs;
- if(isset($db->error)) {
- $db->failQuery();
- }
-
if ($number == "g") {
$key = '___signature___';
} else {
$key = sprintf('___sig%d___', $number);
}
if ($number == "g") {
$key = '___signature___';
} else {
$key = sprintf('___sig%d___', $number);
}
- return
$db->getKey(
$username, $key);
+ return
getPref($data_dir,
$username, $key);
}
?>
}
?>