abook_carddav_squirrelmail/patch/addressbook.php.diff

33 lines
1,016 B
Diff
Raw Normal View History

2021-05-28 15:49:42 +00:00
diff -urN squirrelmail.orig/functions/addressbook.php squirrelmail/functions/addressbook.php
--- squirrelmail.orig/functions/addressbook.php 2004-03-14 09:29:23.000000000 +0200
+++ squirrelmail/functions/addressbook.php 2004-03-21 12:38:19.000000000 +0200
@@ -97,6 +97,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;
}
@@ -570,5 +579,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.
+ */
+do_hook('abook_add_class');
?>