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

Revision: 83788
Author:   bawolff
Date:     2011-03-12 22:40:03 +0000 (Sat, 12 Mar 2011)
Log Message:
-----------
Make this extension use $wgContLang, not $wgLang, since its a parser hook,
so the result gets stored in the parserCache, so it shouldn't vary by user 
language.

Change the wfMsg -> wfMsgForContent for same reason.

Modified Paths:
--------------
    trunk/extensions/intersection/DynamicPageList.php

Modified: trunk/extensions/intersection/DynamicPageList.php
===================================================================
--- trunk/extensions/intersection/DynamicPageList.php   2011-03-12 22:23:43 UTC 
(rev 83787)
+++ trunk/extensions/intersection/DynamicPageList.php   2011-03-12 22:40:03 UTC 
(rev 83788)
@@ -74,7 +74,7 @@
 
 // The callback function for converting the input text to HTML output
 function renderDynamicPageList( $input ) {
-       global $wgUser, $wgLang, $wgContLang;
+       global $wgUser, $wgContLang;
        global $wgDisableCounters; // to determine if to allow sorting by #hits.
        global $wgDLPmaxCategories, $wgDLPMaxResultCount;
        global $wgDLPAllowUnlimitedResults, $wgDLPAllowUnlimitedCategories;
@@ -393,7 +393,7 @@
 
        if ( $catCount < 1 && false == $namespaceFiltering ) {
                if ( $suppressErrors == false ) {
-                       return htmlspecialchars( wfMsg( 
'intersection_noincludecats' ) ); // "!!no included categories!!";
+                       return htmlspecialchars( wfMsgForContent( 
'intersection_noincludecats' ) ); // "!!no included categories!!";
                } else {
                        return '';
                }
@@ -401,7 +401,7 @@
 
        if ( $totalCatCount > $wgDLPmaxCategories && 
!$wgDLPAllowUnlimitedCategories ) {
                if ( $suppressErrors == false ) {
-                       return htmlspecialchars( wfMsg( 
'intersection_toomanycats' ) ); // "!!too many categories!!";
+                       return htmlspecialchars( wfMsgForContent( 
'intersection_toomanycats' ) ); // "!!too many categories!!";
                } else {
                        return '';
                }
@@ -554,7 +554,7 @@
 
        if ( $dbr->numRows( $res ) == 0 ) {
                if ( $suppressErrors == false ) {
-                       return htmlspecialchars( wfMsg( 
'intersection_noresults' ) );
+                       return htmlspecialchars( wfMsgForContent( 
'intersection_noresults' ) );
                } else {
                        return '';
                }
@@ -588,10 +588,10 @@
                                }
                                $categoryDate = $df->reformat( $dateFormat, 
$categoryDate, array( 'match-whole' ) );
                        } else {
-                               $categoryDate = $wgLang->date( wfTimestamp( 
TS_MW, $row->cl_timestamp ) );
+                               $categoryDate = $wgContLang->date( wfTimestamp( 
TS_MW, $row->cl_timestamp ) );
                        }
                        if ( !$useGallery ) {
-                               $categoryDate .= wfMsg( 'colon-separator' );
+                               $categoryDate .= wfMsgForContent( 
'colon-separator' );
                        } else {
                                $categoryDate .= ' ';
                        }


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to