Revert; not cache-safe
authorRob Church <robchurch@users.mediawiki.org>
Sun, 14 May 2006 21:52:28 +0000 (21:52 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 14 May 2006 21:52:28 +0000 (21:52 +0000)
RELEASE-NOTES
includes/Parser.php

index 0114d67..e153091 100644 (file)
@@ -266,7 +266,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Special:Statistics
 * (bug 5949) Update to Indonesian localisation (id)
 * (bug 5862) Update of Belarusian translation (be)
-* (bug 5651) Disable section editing links for users who can't edit
 * (bug 5950) Improvements to French localisation
 * (bug 5805) {{plural:}} support for counters in some special pages
 * (bug 5952) Improvement to German localisation (de)
index b8633a7..d2700c9 100644 (file)
@@ -3054,13 +3054,11 @@ class Parser
                $doNumberHeadings = $this->mOptions->getNumberHeadings();
                $doShowToc = true;
                $forceTocHere = false;
-               
-               # Show section editing links if the user can edit the page and has
-               # the appropriate preference set
-               $user =& $this->mOptions->getUser();
-               $perm = $user->isAllowed( 'edit' ) && $this->mTitle->userCanEdit();
-               $pref = $this->mOptions->getEditSection();
-               $showEditLink = $perm && $pref;
+               if( !$this->mTitle->userCanEdit() ) {
+                       $showEditLink = 0;
+               } else {
+                       $showEditLink = $this->mOptions->getEditSection();
+               }
 
                # Inhibit editsection links if requested in the page
                $esw =& MagicWord::get( MAG_NOEDITSECTION );
@@ -4221,7 +4219,6 @@ class ParserOptions
        var $mAllowSpecialInclusion;     # Allow inclusion of special pages
        var $mTidy;                      # Ask for tidy cleanup
        var $mInterfaceMessage;          # Which lang to call for PLURAL and GRAMMAR
-       var $mUser;                                              # User being parsed for
 
        function getUseTeX()                        { return $this->mUseTeX; }
        function getUseDynamicDates()               { return $this->mUseDynamicDates; }
@@ -4235,7 +4232,6 @@ class ParserOptions
        function getAllowSpecialInclusion()         { return $this->mAllowSpecialInclusion; }
        function getTidy()                          { return $this->mTidy; }
        function getInterfaceMessage()              { return $this->mInterfaceMessage; }
-       function getUser()                                                      { return $this->mUser; }
 
        function setUseTeX( $x )                    { return wfSetVar( $this->mUseTeX, $x ); }
        function setUseDynamicDates( $x )           { return wfSetVar( $this->mUseDynamicDates, $x ); }
@@ -4278,7 +4274,6 @@ class ParserOptions
                        $user =& $userInput;
                }
 
-               $this->mUser =& $user;
                $this->mUseTeX = $wgUseTeX;
                $this->mUseDynamicDates = $wgUseDynamicDates;
                $this->mInterwikiMagic = $wgInterwikiMagic;
@@ -4288,7 +4283,7 @@ class ParserOptions
                $this->mSkin =& $user->getSkin();
                wfProfileOut( $fname.'-skin' );
                $this->mDateFormat = $user->getOption( 'date' );
-               $this->mEditSection = $user->getOption( 'editsection' );
+               $this->mEditSection = true;
                $this->mNumberHeadings = $user->getOption( 'numberheadings' );
                $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
                $this->mTidy = false;