From: Tomas K. <to...@us...> - 2005-04-18 15:09:52
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29481/functions Modified Files: Tag: SM-1_4-STABLE addressbook.php Log Message: porting address book hooks. Index: addressbook.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/addressbook.php,v retrieving revision 1.47.2.12 retrieving revision 1.47.2.13 diff -u -w -r1.47.2.12 -r1.47.2.13 --- addressbook.php 8 Mar 2005 16:53:28 -0000 1.47.2.12 +++ addressbook.php 18 Apr 2005 15:09:41 -0000 1.47.2.13 @@ -96,6 +96,17 @@ } } + + /* + * 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. + * @since 1.5.1 and 1.4.5 + */ + $hookReturn = do_hook('abook_init', $abook, $r); + $abook = $hookReturn[1]; + $r = $hookReturn[2]; + /* Load global addressbook from SQL if configured */ if (isset($addrbook_global_dsn) && !empty($addrbook_global_dsn)) { /* Database configured */ @@ -587,4 +598,12 @@ include_once(SM_PATH . 'functions/abook_database.php'); } +/* + * hook allows adding different address book classes. + * class must follow address book class coding standards. + * + * see addressbook_backend class and functions/abook_*.php files. + * @since 1.5.1 and 1.4.5 + */ +do_hook('abook_add_class'); ?> \ No newline at end of file |