* PRIMARY KEY (owner,nickname)
* </pre>
*
- * @copyright 1999-2016 The SquirrelMail Project Team
+ * @copyright 1999-2020 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
/* ========================== Private ======================= */
/**
- * Constructor
+ * Constructor (PHP5 style, required in some future version of PHP)
* @param array $param address book backend options
*/
- function abook_database($param) {
+ function __construct($param) {
$this->sname = _("Personal Address Book");
/* test if PDO or Pear DB classes are available and freak out if necessary */
}
}
+ /**
+ * Constructor (PHP4 style, kept for compatibility reasons)
+ * @param array $param address book backend options
+ */
+ function abook_database($param) {
+ return self::__construct($param);
+ }
/**
* Open the database.
$sepstr = '';
$where_clause = '';
$where_clause_args = array();
- while (list($undef, $nickname) = each($alias)) {
+ foreach ($alias as $nickname) {
$where_clause .= $sepstr . $this->identifier_quote_char . 'nickname' . $this->identifier_quote_char . ' = ?';
$where_clause_args[] = $nickname;
$sepstr = ' OR ';
$this->table, $this->owner);
$sepstr = '';
- while (list($undef, $nickname) = each($alias)) {
+ foreach ($alias as $nickname) {
$query .= sprintf("%s nickname='%s' ", $sepstr,
$this->dbh->quoteString($nickname));
$sepstr = 'OR';