From cc90ed1f84174a89039feb6906775778e0c4eb18 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 16 Jun 2011 08:20:19 -0400
Subject: [PATCH] - Add addressbook name in contact info frame (#1487958)

---
 program/include/rcube_addressbook.php |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php
index c580c40..cefe461 100644
--- a/program/include/rcube_addressbook.php
+++ b/program/include/rcube_addressbook.php
@@ -33,7 +33,7 @@
     const ERROR_INCOMPLETE = 3;
     const ERROR_SAVING = 4;
     const ERROR_SEARCH = 5;
-    
+
     /** public properties (mandatory) */
     public $primary_key;
     public $groups = false;
@@ -43,8 +43,13 @@
     public $list_page = 1;
     public $page_size = 10;
     public $coltypes = array('name' => array('limit'=>1), 'firstname' => array('limit'=>1), 'surname' => array('limit'=>1), 'email' => array('limit'=>1));
-    
+
     protected $error;
+
+    /**
+     * Returns addressbook name (e.g. for addressbooks listing)
+     */
+    abstract function get_name();
 
     /**
      * Save a search string for future listings
@@ -129,7 +134,7 @@
     {
       return $this->error;
     }
-    
+
     /**
      * Setter for errors for internal use
      *
@@ -378,7 +383,7 @@
                 }
             }
         }
-      
+
         return $out;
     }
 
@@ -397,7 +402,7 @@
             array('/[\s;\+\-\/]+/i', '/(\d)[-.\s]+(\d)/', '/\s\w{1,3}\s/'),
             array(' ', '\\1\\2', ' '),
             $str));
-        
+
         foreach ($arr as $i => $part) {
             if (utf8_encode(utf8_decode($part)) == $part) {  // is latin-1 ?
                 $arr[$i] = utf8_encode(strtr(strtolower(strtr(utf8_decode($part),
@@ -408,7 +413,7 @@
             else
                 $arr[$i] = mb_strtolower($part);
         }
-        
+
         return join(" ", $arr);
     }
 

--
Gitblit v1.9.1