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

Revision: 73005
Author:   kaldari
Date:     2010-09-14 18:54:57 +0000 (Tue, 14 Sep 2010)

Log Message:
-----------
moving from NoticeText to BannerLoader, fixing sloppy code in r73003, updating 
comment

Modified Paths:
--------------
    trunk/extensions/CentralNotice/CentralNotice.db.php
    trunk/extensions/CentralNotice/SpecialCentralNotice.php

Modified: trunk/extensions/CentralNotice/CentralNotice.db.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.db.php 2010-09-14 18:42:49 UTC 
(rev 73004)
+++ trunk/extensions/CentralNotice/CentralNotice.db.php 2010-09-14 18:54:57 UTC 
(rev 73005)
@@ -42,8 +42,8 @@
                        $conds[] = "not_preferred = 1";
                }
                if ( $location ) {
-                       $conds[] = 'nc_notice_id = cn_notices.not_id',
-                       $conds[] = "(not_geo = 0) OR ((not_geo = 1) AND 
(nc_country = '$location'))",
+                       $conds[] = 'nc_notice_id = cn_notices.not_id';
+                       $conds[] = "(not_geo = 0) OR ((not_geo = 1) AND 
(nc_country = '$location'))";
                }
                if ( !$date ) {
                        $date = $dbr->timestamp();

Modified: trunk/extensions/CentralNotice/SpecialCentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialCentralNotice.php     2010-09-14 
18:42:49 UTC (rev 73004)
+++ trunk/extensions/CentralNotice/SpecialCentralNotice.php     2010-09-14 
18:54:57 UTC (rev 73005)
@@ -938,7 +938,7 @@
                        );
 
                        $viewPage = $this->getTitleFor( 'NoticeTemplate', 
'view' );
-                       $render = new SpecialNoticeText();
+                       $render = new SpecialBannerLoader();
                        $render->project = 'wikipedia';
                        global $wgRequest;
                        $render->language = $wgRequest->getVal( 
'wpUserLanguage' );
@@ -1000,8 +1000,8 @@
        }
 
        /**
-        * Lookup function for active banners under a given language and 
project. This function is 
-        * called by SpecialNoticeText::getOutput() in order to build the 
static Javascript files for
+        * Lookup function for active banners under a given 
language/project/location. This function is 
+        * called by SpecialBannerListLoader::getJsonList() in order to build 
the banner list JSON for
         * each project.
         * @return A 2D array of running banners with associated weights and 
settings
         */
@@ -1856,7 +1856,7 @@
                
                // Link and Preview
                $viewPage = SpecialPage::getTitleFor( 'NoticeTemplate', 'view' 
);
-               $render = new SpecialNoticeText();
+               $render = new SpecialBannerLoader();
                $render->project = 'wikipedia';
                $render->language = $this->mRequest->getVal( 'wpUserLanguage' );
                $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),



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

Reply via email to