r88988 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88987‎ | r88988 | r88989 >
Date:18:51, 27 May 2011
Author:vyznev
Status:reverted (Comments)
Tags:
Comment:
bug 29123: record use of the "editsection" option so that users who can't edit (or have section edit links disabled) get a different cache key; also simplify freaky code layout (briefly tested, seem to work)
Modified paths:
  • /trunk/phase3/includes/parser/ParserOptions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserOptions.php
@@ -60,9 +60,8 @@
6161 function getAllowExternalImages() { return $this->mAllowExternalImages; }
6262 function getAllowExternalImagesFrom() { return $this->mAllowExternalImagesFrom; }
6363 function getEnableImageWhitelist() { return $this->mEnableImageWhitelist; }
64 - function getEditSection() { return $this->mEditSection; }
65 - function getNumberHeadings() { $this->optionUsed('numberheadings');
66 - return $this->mNumberHeadings; }
 64+ function getEditSection() { $this->optionUsed('editsection'); return $this->mEditSection; }
 65+ function getNumberHeadings() { $this->optionUsed('numberheadings'); return $this->mNumberHeadings; }
6766 function getAllowSpecialInclusion() { return $this->mAllowSpecialInclusion; }
6867 function getTidy() { return $this->mTidy; }
6968 function getInterfaceMessage() { return $this->mInterfaceMessage; }
@@ -76,17 +75,13 @@
7776 function getEnableLimitReport() { return $this->mEnableLimitReport; }
7877 function getCleanSignatures() { return $this->mCleanSignatures; }
7978 function getExternalLinkTarget() { return $this->mExternalLinkTarget; }
80 - function getMath() { $this->optionUsed('math');
81 - return $this->mMath; }
82 - function getThumbSize() { $this->optionUsed('thumbsize');
83 - return $this->mThumbSize; }
84 - function getStubThreshold() { $this->optionUsed('stubthreshold');
85 - return $this->mStubThreshold; }
 79+ function getMath() { $this->optionUsed('math'); return $this->mMath; }
 80+ function getThumbSize() { $this->optionUsed('thumbsize'); return $this->mThumbSize; }
 81+ function getStubThreshold() { $this->optionUsed('stubthreshold'); return $this->mStubThreshold; }
8682
8783 function getIsPreview() { return $this->mIsPreview; }
8884 function getIsSectionPreview() { return $this->mIsSectionPreview; }
89 - function getIsPrintable() { $this->optionUsed('printable');
90 - return $this->mIsPrintable; }
 85+ function getIsPrintable() { $this->optionUsed('printable'); return $this->mIsPrintable; }
9186 function getUser() { return $this->mUser; }
9287 function getPreSaveTransform() { return $this->mPreSaveTransform; }
9388

Follow-up revisions

RevisionCommit summaryAuthorDate
r90214Revert r88988platonides16:54, 16 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79568Partial revert of r79520, follow up to r79558. Unconditionally use the new fo...platonides11:31, 4 January 2011

Comments

#Comment by Hashar (talk | contribs)   13:22, 2 June 2011

Please do not mix code style and actual code change. Makes things harder to review / merge ..

The removal of $this->optionUsed('editsection') was made on purpose by r79568 which was not merged in 1.17 nor in 1.17wmf1. This mean the live site still use the optionUsed('editsection') call (verified on live cluster. So this is probably not the cause of bug 29123.

1.18 (branched from r87519) does not have the optionUsed('editsection').

Summary as of current head (r 89328 ):

 $ fgrep getEditSection mw1.{16,17,17wmf1,18}/includes/parser/ParserOptions.php
 mw1.16/includes/parser/ParserOptions.php:	function getEditSection()                   { return $this->mEditSection; }
 mw1.17/includes/parser/ParserOptions.php:	function getEditSection()                   { $this->optionUsed('editsection');
 mw1.17wmf1/includes/parser/ParserOptions.php:	function getEditSection()                   { $this->optionUsed('editsection');
 mw1.18/includes/parser/ParserOptions.php:	function getEditSection()                   { return $this->mEditSection; }
$

I am reopening bug 29123

#Comment by Platonides (talk | contribs)   19:13, 2 June 2011

This is (again) refragmenting the cache. I don't see / can't reproduce the stated problem in trunk before this change.

Status & tagging log