/**
* abook_database.php
*
- * Copyright (c) 1999-2002 The Squirrelmail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Backend for personal addressbook stored in a database,
* "AddressBook" class instead.
*
* $Id$
+ * @package squirrelmail
*/
-
+
+/** Needs the DB functions */
require_once('DB.php');
-
+
+/**
+ * Undocumented class - stores the addressbook in a sql database
+ * @package squirrelmail
+ */
class abook_database extends addressbook_backend {
var $btype = 'local';
var $bname = 'database';
$this->writeable = $param['writeable'];
}
+ if (isset($param['listing'])) {
+ $this->listing = $param['listing'];
+ }
+
$this->open(true);
}
else {
if(!$this->open()) {
return false;
}
-
+
/* To be replaced by advanded search expression parsing */
if (is_array($expr)) {
return;
if (!$this->open()) {
return false;
}
+
+ if(isset($this->listing) && !$this->listing) {
+ return array();
+ }
+
$query = sprintf("SELECT * FROM %s WHERE owner='%s'",
$this->table, $this->owner);