--- squirrelmail.orig/functions/addressbook.php 2005-02-06 23:56:33.000000000 +0100 +++ squirrelmail/functions/addressbook.php 2005-04-01 13:51:28.000000000 +0200 @@ -95,6 +95,15 @@ 'table' => $addrbook_global_table)); } + /* + * hook allows to include different address book backends. + * plugins should extract $abook and $r from arguments + * and use same add_backend commands as above functions. + */ + $hookReturn=do_hook('abook_init', $abook, $r); + $abook = $hookReturn[1]; + $r = $hookReturn[2]; + if ($onlylocal) { return $abook; } @@ -547,6 +556,13 @@ return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1; } +/* + * hook allows adding different address book classes. + * class must follow address book class coding standards. + * + * see addressbook_backend class and functions/abook_*.php files. + */ +do_hook('abook_add_class'); /* PHP 5 requires that the class be made first, which seems rather