From 9a9fd802b61c6648f508fe6cd96616c9b7075d7d Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Wed, 7 Dec 2005 10:37:48 +0000 Subject: [PATCH] some new hooks, preparing for new extension --- includes/Article.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 729763c66f..832f1dad42 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -300,8 +300,7 @@ class Article { * @access private */ function pageData( &$dbr, $conditions ) { - return $dbr->selectRow( 'page', - array( + $fields = array( 'page_id', 'page_namespace', 'page_title', @@ -312,9 +311,14 @@ class Article { 'page_random', 'page_touched', 'page_latest', - 'page_len' ), + 'page_len' ) ; + wfRunHooks( 'ArticlePageDataBefore', array( &$this , &$fields ) ) ; + $row = $dbr->selectRow( 'page', + $fields, $conditions, 'Article::pageData' ); + wfRunHooks( 'ArticlePageDataAfter', array( &$this , &$row ) ) ; + return $row ; } function pageDataFromTitle( &$dbr, $title ) { @@ -782,6 +786,7 @@ class Article { } } if( !$outputDone ) { + wfRunHooks( 'ArticleViewHeader', array( &$this ) ) ; # wrap user css and user js in pre and don't parse # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found if ( -- 2.20.1