r14230 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14229‎ | r14230 | r14231 >
Date:21:52, 14 May 2006
Author:robchurch
Status:old
Tags:
Comment:
Revert; not cache-safe
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -3054,13 +3054,11 @@
30553055 $doNumberHeadings = $this->mOptions->getNumberHeadings();
30563056 $doShowToc = true;
30573057 $forceTocHere = false;
3058 -
3059 - # Show section editing links if the user can edit the page and has
3060 - # the appropriate preference set
3061 - $user =& $this->mOptions->getUser();
3062 - $perm = $user->isAllowed( 'edit' ) && $this->mTitle->userCanEdit();
3063 - $pref = $this->mOptions->getEditSection();
3064 - $showEditLink = $perm && $pref;
 3058+ if( !$this->mTitle->userCanEdit() ) {
 3059+ $showEditLink = 0;
 3060+ } else {
 3061+ $showEditLink = $this->mOptions->getEditSection();
 3062+ }
30653063
30663064 # Inhibit editsection links if requested in the page
30673065 $esw =& MagicWord::get( MAG_NOEDITSECTION );
@@ -4221,7 +4219,6 @@
42224220 var $mAllowSpecialInclusion; # Allow inclusion of special pages
42234221 var $mTidy; # Ask for tidy cleanup
42244222 var $mInterfaceMessage; # Which lang to call for PLURAL and GRAMMAR
4225 - var $mUser; # User being parsed for
42264223
42274224 function getUseTeX() { return $this->mUseTeX; }
42284225 function getUseDynamicDates() { return $this->mUseDynamicDates; }
@@ -4235,7 +4232,6 @@
42364233 function getAllowSpecialInclusion() { return $this->mAllowSpecialInclusion; }
42374234 function getTidy() { return $this->mTidy; }
42384235 function getInterfaceMessage() { return $this->mInterfaceMessage; }
4239 - function getUser() { return $this->mUser; }
42404236
42414237 function setUseTeX( $x ) { return wfSetVar( $this->mUseTeX, $x ); }
42424238 function setUseDynamicDates( $x ) { return wfSetVar( $this->mUseDynamicDates, $x ); }
@@ -4278,7 +4274,6 @@
42794275 $user =& $userInput;
42804276 }
42814277
4282 - $this->mUser =& $user;
42834278 $this->mUseTeX = $wgUseTeX;
42844279 $this->mUseDynamicDates = $wgUseDynamicDates;
42854280 $this->mInterwikiMagic = $wgInterwikiMagic;
@@ -4288,7 +4283,7 @@
42894284 $this->mSkin =& $user->getSkin();
42904285 wfProfileOut( $fname.'-skin' );
42914286 $this->mDateFormat = $user->getOption( 'date' );
4292 - $this->mEditSection = $user->getOption( 'editsection' );
 4287+ $this->mEditSection = true;
42934288 $this->mNumberHeadings = $user->getOption( 'numberheadings' );
42944289 $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
42954290 $this->mTidy = false;
Index: trunk/phase3/RELEASE-NOTES
@@ -266,7 +266,6 @@
267267 Special:Statistics
268268 * (bug 5949) Update to Indonesian localisation (id)
269269 * (bug 5862) Update of Belarusian translation (be)
270 -* (bug 5651) Disable section editing links for users who can't edit
271270 * (bug 5950) Improvements to French localisation
272271 * (bug 5805) {{plural:}} support for counters in some special pages
273272 * (bug 5952) Improvement to German localisation (de)

Status & tagging log