r113745 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113744‎ | r113745 | r113746 >
Date:18:41, 13 March 2012
Author:ialex
Status:ok
Tags:tstarling 
Comment:
Follow-up r113223: set the "interface" flag in Message to true by default and set it to false when the page is included.
The point is to have the fix applied to all usages of IContextSource::msg() calls instead of only SpecialPage.
Modified paths:
  • /trunk/phase3/includes/Message.php (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Message.php
@@ -294,6 +294,7 @@
295295 public function setContext( IContextSource $context ) {
296296 $this->inLanguage( $context->getLanguage() );
297297 $this->title( $context->getTitle() );
 298+ $this->interface = true;
298299
299300 return $this;
300301 }
Index: trunk/phase3/includes/SpecialPage.php
@@ -773,8 +773,8 @@
774774 // the context, but setting the language for Message class removes the
775775 // interface message status, which breaks for example usernameless gender
776776 // invokations. Restore the flag when not including special page in content.
777 - if ( !$this->including() ) {
778 - $message->setInterfaceMessageFlag( true );
 777+ if ( $this->including() ) {
 778+ $message->setInterfaceMessageFlag( false );
779779 }
780780 return $message;
781781 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113223My proposed fix to bug 34987: gender not working in many special pages....nikerabbit10:13, 7 March 2012

Status & tagging log