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

Revision: 73829
Author:   kaldari
Date:     2010-09-27 22:27:02 +0000 (Mon, 27 Sep 2010)

Log Message:
-----------
fixing issues from r73095, additional not_project condition is redundant so 
removing rather than fixing

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

Modified: trunk/extensions/CentralNotice/CentralNotice.db.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.db.php 2010-09-27 22:06:07 UTC 
(rev 73828)
+++ trunk/extensions/CentralNotice/CentralNotice.db.php 2010-09-27 22:27:02 UTC 
(rev 73829)
@@ -27,9 +27,9 @@
                $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname );
                
                if ( !$date ) {
-                       $encTimestamp = $dbr->addQuotes( $dbr->timestamp() );
+                       $encTimestamp = $dbr->timestamp();
                } else {
-                       $encTimestamp = $dbr->addQuotes( $date );
+                       $encTimestamp = $dbr->timestamp( $date );
                }
                
                $tables[] = "cn_notices";
@@ -48,7 +48,7 @@
                if ( $preferred ) {
                        $conds[] = "not_preferred = 1";
                }
-               $conds[] = "not_project IN ( '', " . $dbr->addQuotes($project ) 
. " )";
+               $conds[] = "not_project IN ( '', " . $dbr->addQuotes( $project 
) . " )";
                $conds[] = "not_geo = 0";
                $conds[] = "not_start <= " . $encTimestamp;
                $conds[] = "not_end >= " . $encTimestamp;
@@ -79,9 +79,6 @@
        
                        // Use whatever conditional arguments got passed in
                        $conds = array();
-                       if ( $project ) {
-                               $conds[] = "not_project =" . $dbr->addQuotes( 
$project );
-                       }
                        if ( $language ) {
                                $conds[] = "nl_notice_id = cn_notices.not_id";
                                $conds[] = "nl_language =" . $dbr->addQuotes( 
$language );

Modified: trunk/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerListLoader.php  2010-09-27 
22:06:07 UTC (rev 73828)
+++ trunk/extensions/CentralNotice/SpecialBannerListLoader.php  2010-09-27 
22:27:02 UTC (rev 73829)
@@ -73,7 +73,7 @@
 
                if ( !$templates && $this->project == 'wikipedia' ) {
                        // See if we have any preferred notices for this 
language wikipedia
-                       $notices = CentralNoticeDB::getNotices( 'wikipedia', 
$this->language, null, 1, 1, $this->location );
+                       $notices = CentralNoticeDB::getNotices( 'wikipedia', 
$this->language, false, 1, 1, $this->location );
                        
                        if ( $notices ) {
                                // Pull banners



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

Reply via email to