/functions/db_prefs.php

Description

db_prefs.php

This contains functions for manipulating user preferences stored in a database, accessed though the Pear DB layer or PDO, the latter taking precedence if available.

Database:

The preferences table should have three columns: user char \ primary prefkey char / key prefval blob

CREATE TABLE userprefs (user CHAR(128) NOT NULL DEFAULT '', prefkey CHAR(64) NOT NULL DEFAULT '', prefval BLOB NOT NULL DEFAULT '', primary key (user,prefkey));

Configuration of databasename, username and password is done by using conf.pl or the administrator plugin

Three settings that control PDO behavior can be specified in config/config_local.php if needed: boolean $disable_pdo SquirrelMail uses PDO by default to access the user preferences and address book databases, but setting this to TRUE will cause SquirrelMail to fall back to using Pear DB instead. boolean $pdo_show_sql_errors When database errors are encountered, setting this to TRUE causes the actual database error to be displayed, otherwise generic errors are displayed, preventing internal database information from being exposed. This should be enabled only for debugging purposes. string $pdo_identifier_quote_char By default, SquirrelMail will quote table and field names in database queries with what it thinks is the appropriate quote character for the database type being used (backtick for MySQL (and thus MariaDB), double quotes for all others), but you can override the character used by putting it here, or tell SquirrelMail NOT to quote identifiers by setting this to "none"

Classes
Class Description
dbPrefs Completely undocumented class - someone document it!
Includes
include_once ('DB.php') (line 71)
Constants
SMDB_MYSQL = 1 (line 61)

MySQL

SMDB_PGSQL = 2 (line 63)

PostgreSQL

SMDB_UNKNOWN = 0 (line 59)

Unknown database

Documentation generated on Mon, 13 Jan 2020 04:24:27 +0100 by phpDocumentor 1.4.3