r98697 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98696‎ | r98697 | r98698 >
Date:17:42, 2 October 2011
Author:dantman
Status:ok
Tags:
Comment:
More RequestContext -> IContextSource.
Modified paths:
  • /trunk/phase3/includes/Pager.php (modified) (history)
  • /trunk/phase3/includes/cache/HTMLFileCache.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialActiveusers.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialCategories.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListfiles.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewimages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/cache/HTMLFileCache.php
@@ -51,10 +51,10 @@
5252
5353 /**
5454 * Check if pages can be cached for this request/user
55 - * @param $context RequestContext
 55+ * @param $context IContextSource
5656 * @return bool
5757 */
58 - public static function useFileCache( RequestContext $context ) {
 58+ public static function useFileCache( IContextSource $context ) {
5959 global $wgUseFileCache, $wgShowIPinHeader, $wgContLang;
6060 if ( !$wgUseFileCache ) {
6161 return false;
@@ -86,10 +86,10 @@
8787
8888 /**
8989 * Read from cache to context output
90 - * @param $context RequestContext
 90+ * @param $context IContextSource
9191 * @return void
9292 */
93 - public function loadFromFileCache( RequestContext $context ) {
 93+ public function loadFromFileCache( IContextSource $context ) {
9494 global $wgMimeType, $wgLanguageCode;
9595
9696 wfDebug( __METHOD__ . "()\n");
Index: trunk/phase3/includes/specials/SpecialCategories.php
@@ -59,7 +59,7 @@
6060 * @ingroup SpecialPage Pager
6161 */
6262 class CategoryPager extends AlphabeticPager {
63 - function __construct( RequestContext $context, $from ) {
 63+ function __construct( IContextSource $context, $from ) {
6464 parent::__construct( $context );
6565 $from = str_replace( ' ', '_', $from );
6666 if( $from !== '' ) {
Index: trunk/phase3/includes/specials/SpecialListfiles.php
@@ -63,7 +63,7 @@
6464 var $mSearch = '';
6565 var $mIncluding = false;
6666
67 - function __construct( RequestContext $context, $userName = null, $search = '', $including = false ) {
 67+ function __construct( IContextSource $context, $userName = null, $search = '', $including = false ) {
6868 global $wgMiserMode;
6969
7070 $this->mIncluding = $including;
Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -34,7 +34,7 @@
3535 */
3636 class UsersPager extends AlphabeticPager {
3737
38 - function __construct( RequestContext $context = null, $par = null ) {
 38+ function __construct( IContextSource $context = null, $par = null ) {
3939 if ( $context ) {
4040 $this->setContext( $context );
4141 }
Index: trunk/phase3/includes/specials/SpecialActiveusers.php
@@ -42,7 +42,7 @@
4343 */
4444 protected $groups;
4545
46 - function __construct( RequestContext $context = null, $group = null ) {
 46+ function __construct( IContextSource $context = null, $group = null ) {
4747 global $wgActiveUserDays;
4848
4949 parent::__construct( $context );
Index: trunk/phase3/includes/specials/SpecialNewimages.php
@@ -50,7 +50,7 @@
5151 */
5252 class NewFilesPager extends ReverseChronologicalPager {
5353
54 - function __construct( RequestContext $context, $par = null ) {
 54+ function __construct( IContextSource $context, $par = null ) {
5555 $this->like = $context->getRequest()->getText( 'like' );
5656 $this->showbots = $context->getRequest()->getBool( 'showbots' , 0 );
5757
Index: trunk/phase3/includes/Pager.php
@@ -810,7 +810,7 @@
811811 var $mSort;
812812 var $mCurrentRow;
813813
814 - function __construct( RequestContext $context = null ) {
 814+ function __construct( IContextSource $context = null ) {
815815 if ( $context ) {
816816 $this->setContext( $context );
817817 }

Status & tagging log