From: Jonathan A. <jan...@us...> - 2003-08-26 02:44:47
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1:/tmp/cvs-serv5728/functions Modified Files: Tag: SM-1_4-STABLE addressbook.php Log Message: PHP 5 fix for undeclared extension of a class. Logical fix, should have probably been written this way to start. Index: addressbook.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/addressbook.php,v retrieving revision 1.47.2.1 retrieving revision 1.47.2.2 diff -u -w -r1.47.2.1 -r1.47.2.2 --- addressbook.php 7 Jul 2003 22:10:40 -0000 1.47.2.1 +++ addressbook.php 25 Aug 2003 05:30:59 -0000 1.47.2.2 @@ -27,24 +27,10 @@ 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 @@ -544,5 +530,25 @@ } 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'); +} + ?> |