r78570 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78569‎ | r78570 | r78571 >
Date:17:56, 18 December 2010
Author:ialex
Status:resolved
Tags:
Comment:
Moved constant values from initialiseFromUser() to class definition
Modified paths:
  • /trunk/phase3/includes/parser/ParserOptions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserOptions.php
@@ -18,32 +18,34 @@
1919 var $mAllowExternalImages; # Allow external images inline
2020 var $mAllowExternalImagesFrom; # If not, any exception?
2121 var $mEnableImageWhitelist; # If not or it doesn't match, should we check an on-wiki whitelist?
22 - var $mSkin; # Reference to the preferred skin
23 - var $mDateFormat; # Date format index
24 - var $mEditSection; # Create "edit section" links
25 - var $mNumberHeadings; # Automatically number headings
 22+ var $mSkin = null; # Reference to the preferred skin
 23+ var $mDateFormat = null; # Date format index
 24+ var $mEditSection = false; # Create "edit section" links
2625 var $mAllowSpecialInclusion; # Allow inclusion of special pages
27 - var $mTidy; # Ask for tidy cleanup
28 - var $mInterfaceMessage; # Which lang to call for PLURAL and GRAMMAR
29 - var $mTargetLanguage; # Overrides above setting with arbitrary language
 26+ var $mTidy = false; # Ask for tidy cleanup
 27+ var $mInterfaceMessage = false; # Which lang to call for PLURAL and GRAMMAR
 28+ var $mTargetLanguage = null; # Overrides above setting with arbitrary language
3029 var $mMaxIncludeSize; # Maximum size of template expansions, in bytes
3130 var $mMaxPPNodeCount; # Maximum number of nodes touched by PPFrame::expand()
3231 var $mMaxPPExpandDepth; # Maximum recursion depth in PPFrame::expand()
3332 var $mMaxTemplateDepth; # Maximum recursion depth for templates within templates
34 - var $mRemoveComments; # Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
35 - var $mTemplateCallback; # Callback for template fetching
36 - var $mEnableLimitReport; # Enable limit report in an HTML comment on output
 33+ var $mRemoveComments = true; # Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
 34+ var $mTemplateCallback = # Callback for template fetching
 35+ array( 'Parser', 'statelessFetchTemplate' );
 36+ var $mEnableLimitReport = false; # Enable limit report in an HTML comment on output
3737 var $mTimestamp; # Timestamp used for {{CURRENTDAY}} etc.
3838 var $mExternalLinkTarget; # Target attribute for external links
 39+ var $mCleanSignatures; #
 40+
 41+ var $mNumberHeadings; # Automatically number headings
3942 var $mMath; # User math preference (as integer)
40 - var $mUserLang; # Language code of the User language.
4143 var $mThumbSize; # Thumb size preferred by the user.
42 - var $mCleanSignatures; #
 44+ var $mUserLang; # Language code of the User language.
4345
4446 var $mUser; # Stored user object
45 - var $mIsPreview; # Parsing the page for a "preview" operation
46 - var $mIsSectionPreview; # Parsing the page for a "preview" operation on a single section
47 - var $mIsPrintable; # Parsing the printable version of the page
 47+ var $mIsPreview = false; # Parsing the page for a "preview" operation
 48+ var $mIsSectionPreview = false; # Parsing the page for a "preview" operation on a single section
 49+ var $mIsPrintable = false; # Parsing the printable version of the page
4850
4951 var $mExtraKey = ''; # Extra key that should be present in the caching key.
5052
@@ -192,31 +194,19 @@
193195 $this->mAllowExternalImages = $wgAllowExternalImages;
194196 $this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom;
195197 $this->mEnableImageWhitelist = $wgEnableImageWhitelist;
196 - $this->mSkin = null; # Deferred
197 - $this->mDateFormat = null; # Deferred
198 - $this->mEditSection = true;
199 - $this->mNumberHeadings = $user->getOption( 'numberheadings' );
200198 $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
201 - $this->mTidy = false;
202 - $this->mInterfaceMessage = false;
203 - $this->mTargetLanguage = null; // default depends on InterfaceMessage setting
204199 $this->mMaxIncludeSize = $wgMaxArticleSize * 1024;
205200 $this->mMaxPPNodeCount = $wgMaxPPNodeCount;
206201 $this->mMaxPPExpandDepth = $wgMaxPPExpandDepth;
207202 $this->mMaxTemplateDepth = $wgMaxTemplateDepth;
208 - $this->mRemoveComments = true;
209 - $this->mTemplateCallback = array( 'Parser', 'statelessFetchTemplate' );
210 - $this->mEnableLimitReport = false;
211203 $this->mCleanSignatures = $wgCleanSignatures;
212204 $this->mExternalLinkTarget = $wgExternalLinkTarget;
 205+
 206+ $this->mNumberHeadings = $user->getOption( 'numberheadings' );
213207 $this->mMath = $user->getOption( 'math' );
214 - $this->mUserLang = $wgLang->getCode();
215208 $this->mThumbSize = $user->getOption( 'thumbsize' );
 209+ $this->mUserLang = $wgLang->getCode();
216210
217 - $this->mIsPreview = false;
218 - $this->mIsSectionPreview = false;
219 - $this->mIsPrintable = false;
220 -
221211 wfProfileOut( __METHOD__ );
222212 }
223213

Follow-up revisions

RevisionCommit summaryAuthorDate
r78581Fix for r78570: correct default valueialex22:02, 18 December 2010

Status & tagging log