]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/parser/ParserOptions.php
MediaWiki 1.16.0
[autoinstallsdev/mediawiki.git] / includes / parser / ParserOptions.php
index e6a9f3a7eae91cd0c52cebfb6d015f01388582fe..985bba28ec1b2e77564938325a3eab28bb647966 100644 (file)
@@ -5,10 +5,8 @@
  * @todo document
  * @ingroup Parser
  */
-class ParserOptions
-{
+class ParserOptions {
        # All variables are supposed to be private in theory, although in practise this is not the case.
-       var $mUseTeX;                    # Use texvc to expand <math> tags
        var $mUseDynamicDates;           # Use DateFormatter to format dates
        var $mInterwikiMagic;            # Interlanguage links are removed and returned in an array
        var $mAllowExternalImages;       # Allow external images inline
@@ -35,9 +33,8 @@ class ParserOptions
        var $mUser;                      # Stored user object, just used to initialise the skin
        var $mIsPreview;                 # Parsing the page for a "preview" operation
        var $mIsSectionPreview;          # Parsing the page for a "preview" operation on a single section
-       var $mIsPrintable;                     # Parsing the printable version of the page
+       var $mIsPrintable;               # Parsing the printable version of the page
        
-       function getUseTeX()                        { return $this->mUseTeX; }
        function getUseDynamicDates()               { return $this->mUseDynamicDates; }
        function getInterwikiMagic()                { return $this->mInterwikiMagic; }
        function getAllowExternalImages()           { return $this->mAllowExternalImages; }
@@ -59,8 +56,8 @@ class ParserOptions
        function getExternalLinkTarget()            { return $this->mExternalLinkTarget; }
        function getIsPreview()                     { return $this->mIsPreview; }
        function getIsSectionPreview()              { return $this->mIsSectionPreview; }
-  function getIsPrintable()            { return $this->mIsPrintable; }
-  
+       function getIsPrintable()                   { return $this->mIsPrintable; }
+
        function getSkin() {
                if ( !isset( $this->mSkin ) ) {
                        $this->mSkin = $this->mUser->getSkin();
@@ -82,7 +79,6 @@ class ParserOptions
                return $this->mTimestamp;
        }
 
-       function setUseTeX( $x )                    { return wfSetVar( $this->mUseTeX, $x ); }
        function setUseDynamicDates( $x )           { return wfSetVar( $this->mUseDynamicDates, $x ); }
        function setInterwikiMagic( $x )            { return wfSetVar( $this->mInterwikiMagic, $x ); }
        function setAllowExternalImages( $x )       { return wfSetVar( $this->mAllowExternalImages, $x ); }
@@ -107,8 +103,8 @@ class ParserOptions
        function setExternalLinkTarget( $x )        { return wfSetVar( $this->mExternalLinkTarget, $x ); }
        function setIsPreview( $x )                 { return wfSetVar( $this->mIsPreview, $x ); }
        function setIsSectionPreview( $x )          { return wfSetVar( $this->mIsSectionPreview, $x ); }
-  function setIsPrintable( $x )        { return wfSetVar( $this->mIsPrintable, $x ); }
-  
+       function setIsPrintable( $x )               { return wfSetVar( $this->mIsPrintable, $x ); }
+
        function __construct( $user = null ) {
                $this->initialiseFromUser( $user );
        }
@@ -123,12 +119,13 @@ class ParserOptions
 
        /** Get user options */
        function initialiseFromUser( $userInput ) {
-               global $wgUseTeX, $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages;
+               global $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages;
                global $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion, $wgMaxArticleSize;
                global $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth, $wgCleanSignatures;
                global $wgExternalLinkTarget;
-               $fname = 'ParserOptions::initialiseFromUser';
-               wfProfileIn( $fname );
+
+               wfProfileIn( __METHOD__ );
+
                if ( !$userInput ) {
                        global $wgUser;
                        if ( isset( $wgUser ) ) {
@@ -142,7 +139,6 @@ class ParserOptions
 
                $this->mUser = $user;
 
-               $this->mUseTeX = $wgUseTeX;
                $this->mUseDynamicDates = $wgUseDynamicDates;
                $this->mInterwikiMagic = $wgInterwikiMagic;
                $this->mAllowExternalImages = $wgAllowExternalImages;
@@ -167,6 +163,7 @@ class ParserOptions
                $this->mExternalLinkTarget = $wgExternalLinkTarget;
                $this->mIsPreview = false;
                $this->mIsSectionPreview = false;
-               wfProfileOut( $fname );
+
+               wfProfileOut( __METHOD__ );
        }
 }