From: Aaron Schulz Date: Wed, 15 Aug 2007 22:52:55 +0000 (+0000) Subject: Tweak ArticleUpdateBeforeRedirect hook a tad X-Git-Tag: 1.31.0-rc.0~51748 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=a3223695ecd52f00ebaf9edf861b99d7a2095256;p=lhc%2Fweb%2Fwiklou.git Tweak ArticleUpdateBeforeRedirect hook a tad --- diff --git a/docs/hooks.txt b/docs/hooks.txt index a22867ed36..b46541ec70 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -334,6 +334,7 @@ $create: Whether or not the restoration caused the page to be created 'ArticleUpdateBeforeRedirect': After a page is updated (usually on save), before the user is redirected back to the page &$article: the article +&$sectionanchor: The section anchor link (e.g. "#overview" ) &$extraq: Extra query parameters which can be added via hooked functions 'AuthPluginSetup': update or replace authentication plugin object ($wgAuth) diff --git a/includes/Article.php b/includes/Article.php index 078d3ba74a..c2163ec7c0 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1254,7 +1254,7 @@ class Article { } $extraq = ''; // Give extensions a chance to modify URL query on update - wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$extraq ) ); + wfRunHooks( 'ArticleUpdateBeforeRedirect', array($this,&$sectionanchor,&$extraq) ); $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraq ); }