Permalink
Browse files

Add hook to fix a problem of :community 2.5c (see comments)

  • Loading branch information...
1 parent cf0ab3f commit d4ba2802056311b741631f17e22d76f2488da6c0 @icy committed Oct 5, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 main.inc.php
View
@@ -37,10 +37,19 @@
if (icy_plugin_enabled("community")) {
remove_event_handler('loc_end_index', 'community_index');
add_event_handler('community_ws_categories_getList', 'icy_picture_modify_fix_community_acl', EVENT_HANDLER_PRIORITY_NEUTRAL - 10);
+ add_event_handler('sendResponse', 'icy_picture_modify_fix_community_25c', EVENT_HANDLER_PRIORITY_NEUTRAL - 10);
}
# Hooks definitions ####################################################
+/*
+ Community 2.5.c (community_sendResponse) hook calls to the function
+ (invalidate_user_cache) which is only available from `admin`
+*/
+function icy_picture_modify_fix_community_25c() {
+ include_once(PHPWG_ROOT_PATH . 'admin/include/functions.php');
+}
+
function icy_picture_modify_fix_community_acl()
{
if (is_admin()) return TRUE;

0 comments on commit d4ba280

Please sign in to comment.