Tweak ArticleUpdateBeforeRedirect hook a tad
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 15 Aug 2007 22:52:55 +0000 (22:52 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 15 Aug 2007 22:52:55 +0000 (22:52 +0000)
docs/hooks.txt
includes/Article.php

index a22867e..b46541e 100644 (file)
@@ -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)
index 078d3ba..c2163ec 100644 (file)
@@ -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 );
                }