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

Revision: 73851
Author:   tomasz
Date:     2010-09-28 00:48:17 +0000 (Tue, 28 Sep 2010)

Log Message:
-----------
Syncing to head of trunk at 73850

Modified Paths:
--------------
    branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
    branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php

Property Changed:
----------------
    branches/wmf/1.16wmf4/extensions/CentralNotice/


Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/wmf-deployment/extensions/CentralNotice:60970
/trunk/extensions/CentralNotice:62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847
/trunk/phase3/extensions/CentralNotice:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816
   + /branches/wmf-deployment/extensions/CentralNotice:60970
/trunk/extensions/CentralNotice:62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850
/trunk/phase3/extensions/CentralNotice:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816

Modified: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php    
2010-09-28 00:43:15 UTC (rev 73850)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php    
2010-09-28 00:48:17 UTC (rev 73851)
@@ -98,19 +98,20 @@
        
        $wgSpecialPages['BannerController'] = 'SpecialBannerController';
        $wgAutoloadClasses['SpecialBannerController'] = $dir . 
'SpecialBannerController.php';
+       
+       $wgAutoloadClasses['CentralNoticeDB'] = $dir . 'CentralNotice.db.php';
 
        if ( $wgNoticeInfrastructure ) {
                $wgSpecialPages['CentralNotice'] = 'CentralNotice';
                $wgSpecialPageGroups['CentralNotice'] = 'wiki'; // Wiki data 
and tools"
                $wgAutoloadClasses['CentralNotice'] = $dir . 
'SpecialCentralNotice.php';
-               
+
                $wgSpecialPages['NoticeTemplate'] = 'SpecialNoticeTemplate';
                $wgAutoloadClasses['SpecialNoticeTemplate'] = $dir . 
'SpecialNoticeTemplate.php';
-               
+
                $wgSpecialPages['BannerAllocation'] = 'SpecialBannerAllocation';
                $wgAutoloadClasses['SpecialBannerAllocation'] = $dir . 
'SpecialBannerAllocation.php';
-               
-               $wgAutoloadClasses['CentralNoticeDB'] = $dir . 
'CentralNotice.db.php';
+
                $wgAutoloadClasses['TemplatePager'] = $dir . 
'TemplatePager.php';
        }
 }

Modified: 
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php  
2010-09-28 00:43:15 UTC (rev 73850)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php  
2010-09-28 00:48:17 UTC (rev 73851)
@@ -7,7 +7,6 @@
        public $project; // Project name
        public $language; // Project language
        public $location; // User country
-       public $centralNoticeDB;
        protected $sharedMaxAge = 600; // Cache for 10 minutes on the server 
side
        protected $maxAge = 600; // Cache for 10 minutes on the client side
        
@@ -61,19 +60,7 @@
                // 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 );
 
@@ -84,12 +71,6 @@
                }
 
                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 );
                        
@@ -101,20 +82,9 @@
 
                // 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