Follow up r80025.
[lhc/web/wiklou.git] / includes / parser / ParserOptions.php
index 52d96d4..99d680c 100644 (file)
@@ -21,7 +21,6 @@ class ParserOptions {
        var $mSkin = null;               # Reference to the preferred skin
        var $mDateFormat = null;         # Date format index
        var $mEditSection = true;        # Create "edit section" links
-       var $mEditSectionTokens = false; # Output replaceable tokens for editsections instead of markup
        var $mAllowSpecialInclusion;     # Allow inclusion of special pages
        var $mTidy = false;              # Ask for tidy cleanup
        var $mInterfaceMessage = false;  # Which lang to call for PLURAL and GRAMMAR
@@ -57,10 +56,7 @@ class ParserOptions {
        function getAllowExternalImages()           { return $this->mAllowExternalImages; }
        function getAllowExternalImagesFrom()       { return $this->mAllowExternalImagesFrom; }
        function getEnableImageWhitelist()          { return $this->mEnableImageWhitelist; }
-       function getEditSection()                   { $this->optionUsed('editsection');
-                                                                                                 return $this->mEditSection; }
-       function getEditSectionTokens()             { $this->optionUsed('editsectiontokens');
-                                                                                                 return $this->mEditSectionTokens; }
+       function getEditSection()                   { return $this->mEditSection; }
        function getNumberHeadings()                { $this->optionUsed('numberheadings');
                                                                                                  return $this->mNumberHeadings; }
        function getAllowSpecialInclusion()         { return $this->mAllowSpecialInclusion; }
@@ -126,7 +122,6 @@ class ParserOptions {
        function setEnableImageWhitelist( $x )      { return wfSetVar( $this->mEnableImageWhitelist, $x ); }
        function setDateFormat( $x )                { return wfSetVar( $this->mDateFormat, $x ); }
        function setEditSection( $x )               { return wfSetVar( $this->mEditSection, $x ); }
-       function setEditSectionTokens( $x )         { return wfSetVar( $this->mEditSectionTokens, $x ); }
        function setNumberHeadings( $x )            { return wfSetVar( $this->mNumberHeadings, $x ); }
        function setAllowSpecialInclusion( $x )     { return wfSetVar( $this->mAllowSpecialInclusion, $x ); }
        function setTidy( $x )                      { return wfSetVar( $this->mTidy, $x); }
@@ -175,7 +170,7 @@ class ParserOptions {
        function initialiseFromUser( $userInput ) {
                global $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages;
                global $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion, $wgMaxArticleSize;
-               global $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth, $wgCleanSignatures, $wgUseEditSectionTokens;
+               global $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth, $wgCleanSignatures;
                global $wgExternalLinkTarget, $wgLang;
 
                wfProfileIn( __METHOD__ );
@@ -205,7 +200,6 @@ class ParserOptions {
                $this->mMaxTemplateDepth = $wgMaxTemplateDepth;
                $this->mCleanSignatures = $wgCleanSignatures;
                $this->mExternalLinkTarget = $wgExternalLinkTarget;
-               $this->mEditSectionTokens = $wgUseEditSectionTokens;
 
                $this->mNumberHeadings = $user->getOption( 'numberheadings' );
                $this->mMath = $user->getOption( 'math' );
@@ -310,10 +304,12 @@ class ParserOptions {
 
                $confstr .= $wgRenderHashAppend;
 
-               if ( !$this->mEditSection && in_array( 'editsection', $forOptions ) )
+               if ( !in_array( 'editsection', $forOptions ) ) {
+                       $confstr .= '!*';
+               } elseif ( !$this->mEditSection ) {
                        $confstr .= '!edit=0';
-               if ( $this->mEditSectionTokens && in_array( 'editsectiontokens', $forOptions ) )
-                       $confstr .= '!estok=1';
+               }
+               
                if (  $this->mIsPrintable && in_array( 'printable', $forOptions ) )
                        $confstr .= '!printable=1';