Index: trunk/phase3/includes/parser/ParserOptions.php |
— | — | @@ -18,32 +18,34 @@ |
19 | 19 | var $mAllowExternalImages; # Allow external images inline |
20 | 20 | var $mAllowExternalImagesFrom; # If not, any exception? |
21 | 21 | 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 |
26 | 25 | 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 |
30 | 29 | var $mMaxIncludeSize; # Maximum size of template expansions, in bytes |
31 | 30 | var $mMaxPPNodeCount; # Maximum number of nodes touched by PPFrame::expand() |
32 | 31 | var $mMaxPPExpandDepth; # Maximum recursion depth in PPFrame::expand() |
33 | 32 | 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 |
37 | 37 | var $mTimestamp; # Timestamp used for {{CURRENTDAY}} etc. |
38 | 38 | var $mExternalLinkTarget; # Target attribute for external links |
| 39 | + var $mCleanSignatures; # |
| 40 | + |
| 41 | + var $mNumberHeadings; # Automatically number headings |
39 | 42 | var $mMath; # User math preference (as integer) |
40 | | - var $mUserLang; # Language code of the User language. |
41 | 43 | var $mThumbSize; # Thumb size preferred by the user. |
42 | | - var $mCleanSignatures; # |
| 44 | + var $mUserLang; # Language code of the User language. |
43 | 45 | |
44 | 46 | 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 |
48 | 50 | |
49 | 51 | var $mExtraKey = ''; # Extra key that should be present in the caching key. |
50 | 52 | |
— | — | @@ -192,31 +194,19 @@ |
193 | 195 | $this->mAllowExternalImages = $wgAllowExternalImages; |
194 | 196 | $this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom; |
195 | 197 | $this->mEnableImageWhitelist = $wgEnableImageWhitelist; |
196 | | - $this->mSkin = null; # Deferred |
197 | | - $this->mDateFormat = null; # Deferred |
198 | | - $this->mEditSection = true; |
199 | | - $this->mNumberHeadings = $user->getOption( 'numberheadings' ); |
200 | 198 | $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion; |
201 | | - $this->mTidy = false; |
202 | | - $this->mInterfaceMessage = false; |
203 | | - $this->mTargetLanguage = null; // default depends on InterfaceMessage setting |
204 | 199 | $this->mMaxIncludeSize = $wgMaxArticleSize * 1024; |
205 | 200 | $this->mMaxPPNodeCount = $wgMaxPPNodeCount; |
206 | 201 | $this->mMaxPPExpandDepth = $wgMaxPPExpandDepth; |
207 | 202 | $this->mMaxTemplateDepth = $wgMaxTemplateDepth; |
208 | | - $this->mRemoveComments = true; |
209 | | - $this->mTemplateCallback = array( 'Parser', 'statelessFetchTemplate' ); |
210 | | - $this->mEnableLimitReport = false; |
211 | 203 | $this->mCleanSignatures = $wgCleanSignatures; |
212 | 204 | $this->mExternalLinkTarget = $wgExternalLinkTarget; |
| 205 | + |
| 206 | + $this->mNumberHeadings = $user->getOption( 'numberheadings' ); |
213 | 207 | $this->mMath = $user->getOption( 'math' ); |
214 | | - $this->mUserLang = $wgLang->getCode(); |
215 | 208 | $this->mThumbSize = $user->getOption( 'thumbsize' ); |
| 209 | + $this->mUserLang = $wgLang->getCode(); |
216 | 210 | |
217 | | - $this->mIsPreview = false; |
218 | | - $this->mIsSectionPreview = false; |
219 | | - $this->mIsPrintable = false; |
220 | | - |
221 | 211 | wfProfileOut( __METHOD__ ); |
222 | 212 | } |
223 | 213 | |