r96542 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96541‎ | r96542 | r96543 >
Date:08:22, 8 September 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Deprecated showHeader and make it use the new methods. Only caller anymore is MetavidWiki - trying to find out what is going to be the fate of that extension.
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -74,13 +74,16 @@
7575 /**
7676 * Set page title and show header for this log type
7777 * @param $type Array
 78+ * @deprecated in 1.19
7879 */
7980 public function showHeader( $type ) {
 81+ wfDeprecated( __METHOD__ );
8082 // If only one log type is used, then show a special message...
8183 $headerType = (count($type) == 1) ? $type[0] : '';
8284 if( LogPage::isLogType( $headerType ) ) {
83 - $this->out->setPageTitle( LogPage::logName( $headerType ) );
84 - $this->out->addHTML( LogPage::logHeader( $headerType ) );
 85+ $page = new LogPage( $headerType );
 86+ $this->out->setPageTitle( $page->getName()->text() );
 87+ $this->out->addHTML( $page->getDescription()->parseAsBlock() );
8588 } else {
8689 $this->out->addHTML( wfMsgExt('alllogstext',array('parseinline')) );
8790 }

Status & tagging log