r69235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:< r69234‎ | r69235 | r69236 >
Date:11:30, 10 July 2010
Author:btongminh
Status:ok (Comments)
Tags:
Comment:
(bug 14685) Double underscore magic word usage is now tracked in the page_props table, as well as the behavioral magic words {{DEFAULTSORT}} and {{DISPLAYTITLE}}.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserOutput.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
——@@ -3634,7 +3634,6 @@
36353635 $this->mShowToc = false;
36363636 }
36373637 if ( isset( $this->mDoubleUnderscores['hiddencat'] ) && $this->mTitle->getNamespace() == NS_CATEGORY ) {
3638 - $this->mOutput->setProperty( 'hiddencat', 'y' );
36393638 $this->addTrackingCategory( 'hidden-category-category' );
36403639 }
36413640 # (bug 8068) Allow control over whether robots index a page.
——@@ -3649,6 +3648,11 @@
36503649 $this->mOutput->setIndexPolicy( 'index' );
36513650 $this->addTrackingCategory( 'index-category' );
36523651 }
 3652+
 3653+ # Cache all double underscores in the database
 3654+ foreach ( $this->mDoubleUnderscores as $key => $val ) {
 3655+ $this->mOutput->setProperty( $key, '' );
 3656+ }
36533657
36543658 wfProfileOut( __METHOD__ );
36553659 return $text;
——@@ -5137,6 +5141,7 @@
51385142 */
51395143 public function setDefaultSort( $sort ) {
51405144 $this->mDefaultSort = $sort;
 5145+ $this->mOutput->setPropert( 'defaultsort', $sort );
51415146 }
51425147
51435148 /**
Index: trunk/phase3/includes/parser/ParserOutput.php
——@@ -259,6 +259,7 @@
260260 */
261261 public function setDisplayTitle( $text ) {
262262 $this->setTitleText( $text );
 263+ $this->setProperty( 'displaytitle', $text );
263264 }
264265
265266 /**
Index: trunk/phase3/RELEASE-NOTES
——@@ -106,6 +106,9 @@
107107 * ForeignApiRepo uses scriptDirUrl if apiBase not set
108108 * (bug 24212) Added MediaWiki:Filepage.css which is also included on foreign
109109 client wikis.
 110+* (bug 14685) Double underscore magic word usage is now tracked in the
 111+ page_props table, as well as the behavioral magic words {{DEFAULTSORT}} and
 112+ {{DISPLAYTITLE}}
110113
111114 === Bug fixes in 1.17 ===
112115 * (bug 17560) Half-broken deletion moved image files to deletion archive

Follow-up revisions

RevisionCommit summaryAuthorDate
r69236Followup r69235...reedy11:46, 10 July 2010

Comments

#Comment by Reedy (talk | contribs)   11:47, 10 July 2010

Fixed method typo of setPropert in r69236

#Comment by Krinkle (talk | contribs)   19:43, 16 March 2011

If I understand correctly this changed the field value from 'y' to (empty string) for 'hiddencat'.

Database users may find breakages because of this, shouldn't this be included as a major and/or potentially breaking change ?

#Comment by Bryan (talk | contribs)   10:42, 17 March 2011

True. Perhaps we should change it to "y" for all properties? Would make it also easier to do boolean comparisons.

Status & tagging log