Gettext domain was not properly restored after invoking hook provided by extension.
[fa-stable.git] / includes / hooks.inc
index fedbc4c22cf8d4b59eefd209c1d2ffe605aff432..90bf2071b231bd2f2b059ccd717e38f939624f0e 100644 (file)
@@ -261,8 +261,8 @@ function hook_invoke_all($method, &$data, $opts=null)
                        } else if (isset($result)) {
                                $return[] = $result;
                                }
+                       set_ext_domain();
                }
-       set_ext_domain();
        return $return;
 }
 /*
@@ -280,9 +280,9 @@ function hook_invoke_first($method, &$data, $opts=null)
                        $result = $hook->$method($data, $opts);
                        if (isset($result))
                                break;
+                       set_ext_domain();
                }
        }
-       set_ext_domain();
        return $result;
 }
 /*
@@ -302,9 +302,9 @@ function hook_invoke_last($method, &$data, $opts=null)
                        $result = $hook->$method($data, $opts);
                        if (isset($result))
                                break;
+                       set_ext_domain();
                }
        }
-       set_ext_domain();
        return $result;
 }
 //------------------------------------------------------------------------------------------