<?php
- /**
- ** db_prefs.php
- **
- ** Copyright (c) 1999-2001 The Squirrelmail Development Team
- ** Licensed under the GNU GPL. For full terms see the file COPYING.
- **
- ** 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:
- ** ---------
- **
- ** The preferences table should have tree columns:
- ** username char \ primary
- ** prefkey char / key
- ** prefval blob
- **
- ** CREATE TABLE userprefs (user CHAR(32) 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 changing $DSN below.
- **
- ** $Id$
- **/
-
- require_once('DB.php');
-
- class dbPrefs {
+
+/**
+ * db_prefs.php
+ *
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * 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:
+ * ---------
+ *
+ * The preferences table should have tree columns:
+ * username char \ primary
+ * prefkey char / key
+ * prefval blob
+ *
+ * CREATE TABLE userprefs (user CHAR(32) 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 changing $DSN below.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
+/*** + Base level indent should begin at left margin, as ***/
+/*** the require_once below. ***/
+/*** + All identation should consist of four space blocks ***/
+/*** + Tab characters are evil. ***/
+/*** + all comments should use "slash-star ... star-slash" ***/
+/*** style -- no pound characters, no slash-slash style ***/
+/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
+/*** ALWAYS USE { AND } CHARACTERS!!! ***/
+/*** + Please use ' instead of ", when possible. Note " ***/
+/*** should always be used in _( ) function calls. ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('DB.php');
+
+class dbPrefs {
var $DSN = 'mysql://user@host/database';
var $table = 'userprefs';