http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89572

Revision: 89572
Author:   reedy
Date:     2011-06-06 15:34:14 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Followup r89564

showsizediff is disabled in miser mode, make the api check and die as 
appropriate

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiFeedContributions.php

Modified: trunk/phase3/includes/api/ApiFeedContributions.php
===================================================================
--- trunk/phase3/includes/api/ApiFeedContributions.php  2011-06-06 15:32:20 UTC 
(rev 89571)
+++ trunk/phase3/includes/api/ApiFeedContributions.php  2011-06-06 15:34:14 UTC 
(rev 89572)
@@ -54,6 +54,11 @@
                        $this->dieUsage( 'Invalid subscription feed type', 
'feed-invalid' );
                }
 
+               global $wgMiserMode;
+               if ( $params['showsizediff'] && $wgMiserMode ) {
+                       $this->dieUsage( 'Size difference is disabled in Miser 
Mode', 'sizediffdisabled' );
+               }
+
                $msg = wfMsgForContent( 'Contributions' );
                $feedTitle = $wgSitename . ' - ' . $msg . ' [' . 
$wgLanguageCode . ']';
                $feedUrl = SpecialPage::getTitleFor( 'Contributions', 
$params['user'] )->getFullURL();
@@ -174,7 +179,7 @@
                        'tagfilter' => 'Filter contributions that have these 
tags',
                        'deletedonly' => 'Show only deleted contributions',
                        'toponly' => 'Only show edits that are latest 
revisions',
-                       'showsizediff' => '',
+                       'showsizediff' => 'Show the size difference between 
revisions. Disabled in Miser Mode',
                );
        }
 
@@ -186,6 +191,7 @@
                return array_merge( parent::getPossibleErrors(), array(
                        array( 'code' => 'feed-unavailable', 'info' => 
'Syndication feeds are not available' ),
                        array( 'code' => 'feed-invalid', 'info' => 'Invalid 
subscription feed type' ),
+                       array( 'code' => 'sizediffdisabled', 'info' => 'Size 
difference is disabled in Miser Mode' ),
                ) );
        }
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to