From e6af7f9f8087bc668eb55f3bf5acead018d38ad8 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 23 Mar 2013 11:09:17 +0100 Subject: [PATCH] Cleanup. --- includes/hooks.inc | 25 ++++++++++++++----------- themes/aqua/renderer.php | 1 + 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/includes/hooks.inc b/includes/hooks.inc index cde3f34a..df906a91 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -265,17 +265,20 @@ function hook_invoke_all($method, &$data, $opts=null) global $Hooks; $return = array(); - foreach($Hooks as $ext => $hook) - if (method_exists($hook, $method)) { - set_ext_domain('modules/'.$ext); - $result = $hook->$method($data, $opts); - if (isset($result) && is_array($result)) { - $return = array_merge_recursive($return, $result); - } else if (isset($result)) { - $return[] = $result; - } - set_ext_domain(); - } + if (isset($Hooks[$ext]) + { + foreach($Hooks as $ext => $hook) + if (method_exists($hook, $method)) { + set_ext_domain('modules/'.$ext); + $result = $hook->$method($data, $opts); + if (isset($result) && is_array($result)) { + $return = array_merge_recursive($return, $result); + } else if (isset($result)) { + $return[] = $result; + } + set_ext_domain(); + } + { return $return; } /* diff --git a/themes/aqua/renderer.php b/themes/aqua/renderer.php index a1b6d852..1d03c5d9 100644 --- a/themes/aqua/renderer.php +++ b/themes/aqua/renderer.php @@ -147,6 +147,7 @@ global $path_to_root; $selected_app = $waapp->get_selected_application(); + if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) return; -- 2.30.2