https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113745

Revision: 113745
Author:   ialex
Date:     2012-03-13 18:41:13 +0000 (Tue, 13 Mar 2012)
Log Message:
-----------
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
    trunk/phase3/includes/SpecialPage.php

Modified: trunk/phase3/includes/Message.php
===================================================================
--- trunk/phase3/includes/Message.php   2012-03-13 18:31:31 UTC (rev 113744)
+++ trunk/phase3/includes/Message.php   2012-03-13 18:41:13 UTC (rev 113745)
@@ -294,6 +294,7 @@
        public function setContext( IContextSource $context ) {
                $this->inLanguage( $context->getLanguage() );
                $this->title( $context->getTitle() );
+               $this->interface = true;
 
                return $this;
        }

Modified: trunk/phase3/includes/SpecialPage.php
===================================================================
--- trunk/phase3/includes/SpecialPage.php       2012-03-13 18:31:31 UTC (rev 
113744)
+++ trunk/phase3/includes/SpecialPage.php       2012-03-13 18:41:13 UTC (rev 
113745)
@@ -773,8 +773,8 @@
                // the context, but setting the language for Message class 
removes the
                // interface message status, which breaks for example 
usernameless gender
                // invokations. Restore the flag when not including special 
page in content.
-               if ( !$this->including() ) {
-                       $message->setInterfaceMessageFlag( true );
+               if ( $this->including() ) {
+                       $message->setInterfaceMessageFlag( false );
                }
                return $message;
        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to