r103808 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103807‎ | r103808 | r103809 >
Date:14:09, 21 November 2011
Author:ialex
Status:ok
Tags:
Comment:
Use WikiPage instead of Article to call getUsedTemplates()
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -2204,8 +2204,8 @@
22052205 $this->addHTML( Html::element( 'textarea', $params, $source ) );
22062206
22072207 // Show templates used by this article
2208 - $article = new Article( $this->getTitle() );
2209 - $templates = Linker::formatTemplates( $article->getUsedTemplates() );
 2208+ $page = WikiPage::factory( $this->getTitle() );
 2209+ $templates = Linker::formatTemplates( $page->getUsedTemplates() );
22102210 $this->addHTML( "<div class='templatesUsed'>
22112211 $templates
22122212 </div>

Status & tagging log