Merged changes from stable branch up to 2.3.12
[fa-stable.git] / includes / hooks.inc
index cd40491b31fa17998cf7efec7653392eec0b1254..521e48a6b862742b10daa40c66d3c72183705b8a 100644 (file)
@@ -279,9 +279,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;
@@ -301,9 +301,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;