From: Janusz Dobrowolski Date: Fri, 20 Apr 2012 09:33:29 +0000 (+0200) Subject: Fixed lang domain switching in hooks_invoke_first/hook_invoke_last X-Git-Tag: 2.3-final~458 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=3ef9e6f02a4460bf96c65987e0a7b0e17d376a45;p=fa-stable.git Fixed lang domain switching in hooks_invoke_first/hook_invoke_last --- diff --git a/includes/hooks.inc b/includes/hooks.inc index 90bf2071..515bcccf 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -278,9 +278,9 @@ function hook_invoke_first($method, &$data, $opts=null) if (method_exists($hook, $method)) { set_ext_domain('modules/'.$ext); $result = $hook->$method($data, $opts); + set_ext_domain(); if (isset($result)) break; - set_ext_domain(); } } return $result; @@ -300,9 +300,9 @@ function hook_invoke_last($method, &$data, $opts=null) if (method_exists($hook, $method)) { set_ext_domain('modules/'.$ext); $result = $hook->$method($data, $opts); + set_ext_domain(); if (isset($result)) break; - set_ext_domain(); } } return $result;