diff --git a/ecrire/inc_utils.php b/ecrire/inc_utils.php index 08a7f2b18d46e7834d02bb07b21746e0078923fb..7cfc2df4d8e78d54af8e9b8a1df6b2e3b391abf2 100644 --- a/ecrire/inc_utils.php +++ b/ecrire/inc_utils.php @@ -86,28 +86,25 @@ function pipeline($action, $val) { if (!isset($pipe[$action])) $pipe[$action] = array_filter(explode('|',$spip_pipeline[$action])); - $args= func_get_args(); - array_shift($args); - // Eclater le pipeline en filtres et appliquer chaque filtre foreach ($pipe[$action] as $fonc) { // fonction if (function_exists($fonc)) - $val = call_user_func_array($fonc, $args); + $val = call_user_func($fonc, $val); // Class::Methode else if (preg_match("/^(\w*)::(\w*)$/", $fonc, $regs) AND $methode = array($regs[1], $regs[2]) AND is_callable($methode)) - $val = call_user_func_array($methode, $args); + $val = call_user_func($methode, $val); // Charger un fichier else if ($f = $spip_matrice[$fonc]) { require_once($f); // fonction (2eme chance) if (function_exists($fonc)) - $val = $fonc($val); + $val = call_user_func($fonc, $val); // Class::Methode (2eme chance) else if (preg_match("/^(\w*)::(\w*)$/", $fonc, $regs) AND $methode = array($regs[1], $regs[2])