fsf changes, meant to be rebased on upstream
[squirrelmail.git] / templates / util_addressbook.php
index 330476069960c2fc3f1c80d42f8436e4c55ca796..bf07c477ec29576e579351a52c0ff09e874c219f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Functions to make working with address books easier
  * 
- * @copyright 1999-2015 The SquirrelMail Project Team
+ * @copyright 1999-2022 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -39,7 +39,7 @@ function formatAddressList ($addresses) {
         return array();
         
     $contacts = array();
-    while(list($undef,$row) = each($addresses)) {
+    foreach($addresses as $row) {
         $contact = array (
                             'FirstName'      => sm_encode_html_special_chars($row['firstname']),
                             'LastName'       => sm_encode_html_special_chars($row['lastname']),
@@ -150,7 +150,7 @@ function getBackends () {
     $backends = array();
     $backends['-1'] = _("All address books");
     $ret = $abook->get_backend_list();
-    while (list($undef,$v) = each($ret)) {
+    foreach ($ret as $v) {
         if ($v->btype == 'local' && !$v->listing) {
             continue;
         }