Fix for r36587:
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 25 Jun 2008 12:09:32 +0000 (12:09 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 25 Jun 2008 12:09:32 +0000 (12:09 +0000)
* Do not overwrite the previous found $tz when $wgLocaltimezone is set
* Rename message name to a more specific one
* Add message to the message files

includes/parser/Parser.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 43e3b22..a3b5d32 100644 (file)
@@ -3697,7 +3697,7 @@ class Parser
                 * (see also bug 12815)
                 */
                $ts = $this->mOptions->getTimestamp();
-               $tz = 'UTC';
+               $tz = wfMsgForContent( 'timezone-utc' );
                if ( isset( $wgLocaltimezone ) ) {
                        $unixts = wfTimestamp( TS_UNIX, $ts );
                        $oldtz = getenv( 'TZ' );
@@ -3706,12 +3706,7 @@ class Parser
                        $tz = date( 'T', $unixts );  # might vary on DST changeover!
                        putenv( 'TZ='.$oldtz );
                }
-               
-               $ctz = wfMsgForContent('timezone');
-               if (!wfEmptyMsg('timezone', $ctz)) {
-                       $tz = $ctz;
-               }       
-                                       
+
                $d = $wgContLang->timeanddate( $ts, false, false ) . " ($tz)";
 
                # Variable replacement
index 9bcc004..1ff30b7 100644 (file)
@@ -3375,6 +3375,7 @@ You can also [[Special:Watchlist/edit|use the standard editor]].',
 # Signatures
 'signature'      => '[[{{ns:user}}:$1|$2]]', # do not translate or duplicate this message to other languages
 'signature-anon' => '[[{{#special:Contributions}}/$1|$2]]', # do not translate or duplicate this message to other languages
+'timezone-utc'   => 'UTC', # only translate this message to other languages if you have to change it
 
 # Core parser functions
 'unknown_extension_tag' => 'Unknown extension tag "$1"',
index da23f94..a3cfe46 100644 (file)
@@ -310,6 +310,7 @@ $wgOptionalMessages = array(
        'colon-separator',
        'autocomment-prefix',
        'listgrouprights-right-display',
+       'timezone-utc',
 );
 
 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
index 882f0c0..251ccad 100644 (file)
@@ -2548,6 +2548,7 @@ $wgMessageStructure = array(
        'signatures' => array(
                'signature',
                'signature-anon',
+               'timezone-utc',
        ),
        'CoreParserFunctions' => array(
                'unknown_extension_tag',