r98660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98659‎ | r98660 | r98661 >
Date:07:15, 2 October 2011
Author:dantman
Status:deferred
Tags:
Comment:
Switch to DerivativeContext. (I had this code before but didn't commit since I haven't merged DerivativeContext in yet)
Modified paths:
  • /branches/pageoutput/includes/specials/SpecialHistory.php (modified) (history)

Diff [purge]

Index: branches/pageoutput/includes/specials/SpecialHistory.php
@@ -35,12 +35,8 @@
3636 function execute( $par ) {
3737 $title = Title::newFromText( $par );
3838 if ( $title ) {
39 - // @fixme Instead of this create a method to create a RequestContext based on another
40 - $context = new RequestContext;
 39+ $context = new DerivativeContext( $this->getContext() );
4140 $context->setTitle( $title );
42 - $context->setUser( $this->getUser() );
43 - $context->setRequest( new FauxRequest( array() ) );
44 - $context->setOutput( $this->getOutput() );
4541 $history = new HistoryPage( $context );
4642 $history->history();
4743 }

Status & tagging log