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

Revision: 73847
Author:   kaldari
Date:     2010-09-28 00:31:27 +0000 (Tue, 28 Sep 2010)

Log Message:
-----------
debug output for bannerlistloader

Modified Paths:
--------------
    trunk/extensions/CentralNotice/SpecialBannerListLoader.php

Modified: trunk/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerListLoader.php  2010-09-28 
00:28:36 UTC (rev 73846)
+++ trunk/extensions/CentralNotice/SpecialBannerListLoader.php  2010-09-28 
00:31:27 UTC (rev 73847)
@@ -61,7 +61,19 @@
                // Quick short circuit to be able to show preferred notices
                $templates = array();
 
+               $templates[] = array(
+                       'name' => 'debug_begin',
+                       'weight' => 0,
+                       'display_anon' => 0,
+                       'display_account' => 0
+               );
                if ( $this->language == 'en' && $this->project != null ) {
+                       $templates[] = array(
+                               'name' => 'debug_en_preferred',
+                               'weight' => 0,
+                               'display_anon' => 0,
+                               'display_account' => 0
+                       );
                        // See if we have any preferred notices for all of en
                        $notices = CentralNoticeDB::getNotices( null, 'en', 
null, 1, 1, $this->location );
 
@@ -72,6 +84,12 @@
                }
 
                if ( !$templates && $this->project == 'wikipedia' ) {
+                       $templates[] = array(
+                               'name' => 'debug_wikipedia_preferred',
+                               'weight' => 0,
+                               'display_anon' => 0,
+                               'display_account' => 0
+                       );
                        // See if we have any preferred notices for this 
language wikipedia
                        $notices = CentralNoticeDB::getNotices( 'wikipedia', 
$this->language, false, 1, 1, $this->location );
                        
@@ -83,9 +101,20 @@
 
                // Didn't find any preferred matches so do an old style lookup
                if ( !$templates )  {
+                       $templates[] = array(
+                               'name' => 'debug_old_style_lookup',
+                               'weight' => 0,
+                               'display_anon' => 0,
+                               'display_account' => 0
+                       );
                        $templates = CentralNotice::selectNoticeTemplates( 
$this->project, $this->language, $this->location );
                }
-               
+               $templates[] = array(
+                               'name' => 'debug_finished',
+                               'weight' => 0,
+                               'display_anon' => 0,
+                               'display_account' => 0
+                       );
                return FormatJson::encode( $templates );
        }
        



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

Reply via email to