Improved local backend handling.
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 30 Mar 2000 21:39:33 +0000 (21:39 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 30 Mar 2000 21:39:33 +0000 (21:39 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@361 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/addressbook.php

index 738be3ffa7d0d11ecd209a5fd39d65569fc7c9e7..1bac6c0c9c61ff54ccb9b7f0307afde6c36e5c26 100644 (file)
@@ -62,6 +62,7 @@
       var $backends    = array();
       var $numbackends = 0;
       var $error       = "";
+      var $localbackend = 0;
 
       // Constructor function.
       function AddressBook() {
        
         $newback->bnum = $this->numbackends;
         $this->backends[$this->numbackends] = $newback;
+
+        // Store ID of first local backend added
+        if($this->localbackend == 0 && $newback->btype == "local")
+           $this->localbackend = $this->numbackends;
+
         return $this->numbackends;
       }