Make ParserOptions fields private
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 27 Aug 2015 13:38:53 +0000 (09:38 -0400)
committerTim Starling <tstarling@wikimedia.org>
Thu, 27 Aug 2015 23:20:45 +0000 (23:20 +0000)
Now that Ib58e8020 and Ie644854 are merged, there are no direct accesses
to these fields left in core or extensions in Gerrit. So let's make them
private to make sure no more get added before we decide whether we're
going to eliminate them entirely.

Bug: T110269
Change-Id: I82041b88dd0f194716f54d3207649388328805ca

RELEASE-NOTES-1.26
includes/parser/ParserOptions.php

index fd21c4c..14d6c58 100644 (file)
@@ -26,6 +26,7 @@ production.
   This experimental feature was never enabled by default and is obsolete as of
   MediaWiki 1.26, in where ResourceLoader became fully asynchronous.
 * $wgMasterWaitTimeout was removed (deprecated in 1.24).
+* Fields in ParserOptions are now private. Use the accessors instead.
 
 === New features in 1.26 ===
 * (T51506) Now action=info gives estimates of actual watchers for a page.
index ed0d74a..e4c867a 100644 (file)
@@ -34,145 +34,145 @@ class ParserOptions {
        /**
         * Interlanguage links are removed and returned in an array
         */
-       public $mInterwikiMagic;
+       private $mInterwikiMagic;
 
        /**
         * Allow external images inline?
         */
-       public $mAllowExternalImages;
+       private $mAllowExternalImages;
 
        /**
         * If not, any exception?
         */
-       public $mAllowExternalImagesFrom;
+       private $mAllowExternalImagesFrom;
 
        /**
         * If not or it doesn't match, should we check an on-wiki whitelist?
         */
-       public $mEnableImageWhitelist;
+       private $mEnableImageWhitelist;
 
        /**
         * Date format index
         */
-       public $mDateFormat = null;
+       private $mDateFormat = null;
 
        /**
         * Create "edit section" links?
         */
-       public $mEditSection = true;
+       private $mEditSection = true;
 
        /**
         * Allow inclusion of special pages?
         */
-       public $mAllowSpecialInclusion;
+       private $mAllowSpecialInclusion;
 
        /**
         * Use tidy to cleanup output HTML?
         */
-       public $mTidy = false;
+       private $mTidy = false;
 
        /**
         * Which lang to call for PLURAL and GRAMMAR
         */
-       public $mInterfaceMessage = false;
+       private $mInterfaceMessage = false;
 
        /**
         * Overrides $mInterfaceMessage with arbitrary language
         */
-       public $mTargetLanguage = null;
+       private $mTargetLanguage = null;
 
        /**
         * Maximum size of template expansions, in bytes
         */
-       public $mMaxIncludeSize;
+       private $mMaxIncludeSize;
 
        /**
         * Maximum number of nodes touched by PPFrame::expand()
         */
-       public $mMaxPPNodeCount;
+       private $mMaxPPNodeCount;
 
        /**
         * Maximum number of nodes generated by Preprocessor::preprocessToObj()
         */
-       public $mMaxGeneratedPPNodeCount;
+       private $mMaxGeneratedPPNodeCount;
 
        /**
         * Maximum recursion depth in PPFrame::expand()
         */
-       public $mMaxPPExpandDepth;
+       private $mMaxPPExpandDepth;
 
        /**
         * Maximum recursion depth for templates within templates
         */
-       public $mMaxTemplateDepth;
+       private $mMaxTemplateDepth;
 
        /**
         * Maximum number of calls per parse to expensive parser functions
         */
-       public $mExpensiveParserFunctionLimit;
+       private $mExpensiveParserFunctionLimit;
 
        /**
         * Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
         */
-       public $mRemoveComments = true;
+       private $mRemoveComments = true;
 
        /**
         * Callback for current revision fetching. Used as first argument to call_user_func().
         */
-       public $mCurrentRevisionCallback =
+       private $mCurrentRevisionCallback =
                array( 'Parser', 'statelessFetchRevision' );
 
        /**
         * Callback for template fetching. Used as first argument to call_user_func().
         */
-       public $mTemplateCallback =
+       private $mTemplateCallback =
                array( 'Parser', 'statelessFetchTemplate' );
 
        /**
         * Enable limit report in an HTML comment on output
         */
-       public $mEnableLimitReport = false;
+       private $mEnableLimitReport = false;
 
        /**
         * Timestamp used for {{CURRENTDAY}} etc.
         */
-       public $mTimestamp;
+       private $mTimestamp;
 
        /**
         * Target attribute for external links
         */
-       public $mExternalLinkTarget;
+       private $mExternalLinkTarget;
 
        /**
         * Clean up signature texts?
         * @see Parser::cleanSig
         */
-       public $mCleanSignatures;
+       private $mCleanSignatures;
 
        /**
         * Transform wiki markup when saving the page?
         */
-       public $mPreSaveTransform = true;
+       private $mPreSaveTransform = true;
 
        /**
         * Whether content conversion should be disabled
         */
-       public $mDisableContentConversion;
+       private $mDisableContentConversion;
 
        /**
         * Whether title conversion should be disabled
         */
-       public $mDisableTitleConversion;
+       private $mDisableTitleConversion;
 
        /**
         * Automatically number headings?
         */
-       public $mNumberHeadings;
+       private $mNumberHeadings;
 
        /**
         * Thumb size preferred by the user.
         */
-       public $mThumbSize;
+       private $mThumbSize;
 
        /**
         * Maximum article size of an article to be marked as "stub"
@@ -182,38 +182,38 @@ class ParserOptions {
        /**
         * Language object of the User language.
         */
-       public $mUserLang;
+       private $mUserLang;
 
        /**
         * @var User
         * Stored user object
         */
-       public $mUser;
+       private $mUser;
 
        /**
         * Parsing the page for a "preview" operation?
         */
-       public $mIsPreview = false;
+       private $mIsPreview = false;
 
        /**
         * Parsing the page for a "preview" operation on a single section?
         */
-       public $mIsSectionPreview = false;
+       private $mIsSectionPreview = false;
 
        /**
         * Parsing the printable version of the page?
         */
-       public $mIsPrintable = false;
+       private $mIsPrintable = false;
 
        /**
         * Extra key that should be present in the caching key.
         */
-       public $mExtraKey = '';
+       private $mExtraKey = '';
 
        /**
         * Function to be called when an option is accessed.
         */
-       protected $onAccessCallback = null;
+       private $onAccessCallback = null;
 
        /**
         * If the page being parsed is a redirect, this should hold the redirect