[MediaWiki-commits] [Gerrit] Make ParserOptions fields private - change (mediawiki/core)

2015-08-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make ParserOptions fields private
..


Make ParserOptions fields private

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
---
M RELEASE-NOTES-1.26
M includes/parser/ParserOptions.php
2 files changed, 36 insertions(+), 35 deletions(-)

Approvals:
  Tim Starling: Looks good to me, approved
  MaxSem: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26
index fd21c4c..14d6c58 100644
--- a/RELEASE-NOTES-1.26
+++ b/RELEASE-NOTES-1.26
@@ -26,6 +26,7 @@
   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.
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index ed0d74a..e4c867a 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -34,145 +34,145 @@
/**
 * 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}} 

[MediaWiki-commits] [Gerrit] Make ParserOptions fields private - change (mediawiki/core)

2015-08-27 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/234270

Change subject: Make ParserOptions fields private
..

Make ParserOptions fields private

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
---
M RELEASE-NOTES-1.26
M includes/parser/ParserOptions.php
2 files changed, 36 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/234270/1

diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26
index fd21c4c..14d6c58 100644
--- a/RELEASE-NOTES-1.26
+++ b/RELEASE-NOTES-1.26
@@ -26,6 +26,7 @@
   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.
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index ed0d74a..e4c867a 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -34,145 +34,145 @@
/**
 * 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.
 */
-