From ebb629ce702709b6806fca4a47f8f087f6982b45 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 15 Aug 2007 22:43:59 +0000 Subject: [PATCH] Document hooks in release notes, too, please. Also tweak some odd whitespace usage. --- RELEASE-NOTES | 2 ++ includes/Article.php | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 84e6064f9b..59a7fe91b5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -175,6 +175,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Show edit count in user preferences * Improved support for audio/video extensions * (bug 10937) Distinguish overwritten files in upload log +* Introduce 'ArticleUpdateBeforeRedirect' hook; see docs/hooks.txt for more + information == Bugfixes since 1.10 == diff --git a/includes/Article.php b/includes/Article.php index 10a714b868..078d3ba74a 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -269,13 +269,16 @@ class Article { 'page_random', 'page_touched', 'page_latest', - 'page_len' ) ; - wfRunHooks( 'ArticlePageDataBefore', array( &$this , &$fields ) ) ; - $row = $dbr->selectRow( 'page', + 'page_len', + ); + wfRunHooks( 'ArticlePageDataBefore', array( &$this, &$fields ) ); + $row = $dbr->selectRow( + 'page', $fields, $conditions, - 'Article::pageData' ); - wfRunHooks( 'ArticlePageDataAfter', array( &$this , &$row ) ) ; + __METHOD__ + ); + wfRunHooks( 'ArticlePageDataAfter', array( &$this, &$row ) ); return $row ; } @@ -1251,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, &$extraq ) ); $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraq ); } -- 2.20.1