http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73563

Revision: 73563
Author:   demon
Date:     2010-09-22 19:19:47 +0000 (Wed, 22 Sep 2010)

Log Message:
-----------
Skip new object construction if it's going to be the same

Modified Paths:
--------------
    trunk/phase3/includes/Message.php

Modified: trunk/phase3/includes/Message.php
===================================================================
--- trunk/phase3/includes/Message.php   2010-09-22 19:15:53 UTC (rev 73562)
+++ trunk/phase3/includes/Message.php   2010-09-22 19:19:47 UTC (rev 73563)
@@ -158,7 +158,9 @@
                if( $lang instanceof Language ){
                        $this->language = $lang;
                } elseif ( is_string( $lang ) ) {
-                       $this->language = Language::factory( $lang );
+                       if( $this->language->getCode() != $lang ) {
+                               $this->language = Language::factory( $lang );
+                       }
                } else {
                        $type = gettype( $lang );
                        throw new MWException( __METHOD__ . " must be "



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

Reply via email to