http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73002
Revision: 73002
Author: kaldari
Date: 2010-09-14 18:30:19 +0000 (Tue, 14 Sep 2010)
Log Message:
-----------
fixing db query, removing unneeded is_array test, changing to single quotes
where appropriate
Modified Paths:
--------------
trunk/extensions/CentralNotice/SpecialBannerListLoader.php
trunk/extensions/CentralNotice/SpecialCentralNotice.php
Modified: trunk/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerListLoader.php 2010-09-14
17:56:06 UTC (rev 73001)
+++ trunk/extensions/CentralNotice/SpecialBannerListLoader.php 2010-09-14
18:30:19 UTC (rev 73002)
@@ -80,7 +80,7 @@
if ( !$templates && $this->project == 'wikipedia' ) {
$notices = $this->centralNoticeDB->getNotices(
'wikipedia', $this->language, '', '', 1 );
- if ( $notices && is_array( $notices ) ) {
+ if ( $notices ) ) {
foreach ( $notices as $notice => $val ) {
$templates =
$this->centralNoticeDB->selectTemplatesAssigned( $notice );
break;
Modified: trunk/extensions/CentralNotice/SpecialCentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-09-14
17:56:06 UTC (rev 73001)
+++ trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-09-14
18:30:19 UTC (rev 73002)
@@ -1026,11 +1026,12 @@
array (
"not_start <= $encTimestamp",
"not_end >= $encTimestamp",
- "not_enabled = 1",
+ 'not_enabled = 1',
+ 'nc_notice_id = cn_notices.not_id',
"(not_geo = 0) OR ((not_geo = 1) AND
(nc_country = '$location'))",
'nl_notice_id = cn_notices.not_id',
'nl_language' => $language,
- "not_project" => array( '', $project ),
+ 'not_project' => array( '', $project ),
'cn_notices.not_id=cn_assignments.not_id',
'cn_assignments.tmp_id=cn_templates.tmp_id'
),
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs