managing agresive decoding and ja_JP + utf-8.
[squirrelmail.git] / functions / addressbook.php
index 56010ca97b7df7f6443b7620b2d673a4f629def2..ccef55084c187927e1deae3af6c31f766a400301 100644 (file)
@@ -3,15 +3,16 @@
 /**
  * addressbook.php
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Functions and classes for the addressbook system.
  *
  * $Id$
+ * @package squirrelmail
  */
 
-/*
+/**
    This is the path to the global site-wide addressbook.
    It looks and feels just like a user's .abook file
    If this is in the data directory, use "$data_dir/global.abook"
    The global addressbook is unmodifiable by anyone.  You must actually
    use a shell script or whatnot to modify the contents.
 
-  global $data_dir;
+  global $data_dir, $address_book_global_filename;
   $address_book_global_filename = "$data_dir/global.abook";
 
-  Include backends here.
 */
 
-require_once(SM_PATH . 'functions/abook_local_file.php');
-require_once(SM_PATH . 'functions/abook_ldap_server.php');
-
 global $addrbook_dsn;
 
-/* Use this if you wanna have a global address book */
-if (isset($address_book_global_filename)) {
-    include_once(SM_PATH . 'functions/abook_global_file.php');
-}
-
-/* Only load database backend if database is configured */
-if(isset($addrbook_dsn) && !empty($addrbook_dsn)) {
-  include_once(SM_PATH . 'functions/abook_database.php');
-}
-
-/*
+/**
    Create and initialize an addressbook object.
    Returns the created object
 */
@@ -136,10 +123,10 @@ function addressbook_cmp($a,$b) {
 }
 
 
-/*
+/**
  * This is the main address book class that connect all the
  * backends and provide services to the functions above.
- *
+ * @package squirrelmail
  */
 
 class AddressBook {
@@ -475,8 +462,9 @@ class AddressBook {
     
 } /* End of class Addressbook */
 
-/*
+/**
  * Generic backend that all other backends extend
+ * @package squirrelmail
  */
 class addressbook_backend {
 
@@ -545,4 +533,24 @@ function alistcmp($a,$b) {
     return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
 }
 
+
+/*
+  PHP 5 requires that the class be made first, which seems rather
+  logical, and should have been the way it was generated the first time.
+*/
+
+require_once(SM_PATH . 'functions/abook_local_file.php');
+require_once(SM_PATH . 'functions/abook_ldap_server.php');
+
+/* Use this if you wanna have a global address book */
+if (isset($address_book_global_filename)) {
+    include_once(SM_PATH . 'functions/abook_global_file.php');
+}
+
+/* Only load database backend if database is configured */
+if(isset($addrbook_dsn) && !empty($addrbook_dsn)) {
+  include_once(SM_PATH . 'functions/abook_database.php');
+}
+
+
 ?>