X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fabook_database.php;h=db7e1a008a1cb823f83d40e388f2b587c91b44fb;hb=202bcbcc2b67c7c153db1b09b608b62beeba0496;hp=bae187bce3d7ec43c25a46487d959b45f4cd37b9;hpb=4b4abf93a9624311afef0c385023724ee46a2b60;p=squirrelmail.git diff --git a/functions/abook_database.php b/functions/abook_database.php index bae187bc..db7e1a00 100644 --- a/functions/abook_database.php +++ b/functions/abook_database.php @@ -3,7 +3,7 @@ /** * abook_database.php * - * @copyright © 1999-2005 The SquirrelMail Project Team + * @copyright © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -13,7 +13,6 @@ /** Needs the DB functions */ if (!include_once('DB.php')) { // same error also in db_prefs.php - require_once(SM_PATH . 'functions/display_messages.php'); $error = _("Could not include PEAR database functions required for the database backend.") . "
\n"; $error .= sprintf(_("Is PEAR installed, and is the include path set correctly to find %s?"), 'DB.php') . "
\n"; @@ -327,9 +326,9 @@ class abook_database extends addressbook_backend { $this->table, $this->owner, $this->dbh->quoteString($userdata['nickname']), $this->dbh->quoteString($userdata['firstname']), - $this->dbh->quoteString($userdata['lastname']), + $this->dbh->quoteString((!empty($userdata['lastname'])?$userdata['lastname']:'')), $this->dbh->quoteString($userdata['email']), - $this->dbh->quoteString($userdata['label']) ); + $this->dbh->quoteString((!empty($userdata['label'])?$userdata['label']:'')) ); /* Do the insert */ $r = $this->dbh->simpleQuery($query); @@ -407,9 +406,9 @@ class abook_database extends addressbook_backend { $this->table, $this->dbh->quoteString($userdata['nickname']), $this->dbh->quoteString($userdata['firstname']), - $this->dbh->quoteString($userdata['lastname']), + $this->dbh->quoteString((!empty($userdata['lastname'])?$userdata['lastname']:'')), $this->dbh->quoteString($userdata['email']), - $this->dbh->quoteString($userdata['label']), + $this->dbh->quoteString((!empty($userdata['label'])?$userdata['label']:'')), $this->owner, $this->dbh->quoteString($alias) ); @@ -426,4 +425,4 @@ class abook_database extends addressbook_backend { } /* End of class abook_database */ // vim: et ts=4 -?> \ No newline at end of file +?>