r73002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73001‎ | r73002 | r73003 >
Date:18:30, 14 September 2010
Author:kaldari
Status:ok
Tags:
Comment:
fixing db query, removing unneeded is_array test, changing to single quotes where appropriate
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialBannerListLoader.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialBannerListLoader.php
@@ -80,7 +80,7 @@
8181
8282 if ( !$templates && $this->project == 'wikipedia' ) {
8383 $notices = $this->centralNoticeDB->getNotices( 'wikipedia', $this->language, '', '', 1 );
84 - if ( $notices && is_array( $notices ) ) {
 84+ if ( $notices ) ) {
8585 foreach ( $notices as $notice => $val ) {
8686 $templates = $this->centralNoticeDB->selectTemplatesAssigned( $notice );
8787 break;
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -1026,11 +1026,12 @@
10271027 array (
10281028 "not_start <= $encTimestamp",
10291029 "not_end >= $encTimestamp",
1030 - "not_enabled = 1",
 1030+ 'not_enabled = 1',
 1031+ 'nc_notice_id = cn_notices.not_id',
10311032 "(not_geo = 0) OR ((not_geo = 1) AND (nc_country = '$location'))",
10321033 'nl_notice_id = cn_notices.not_id',
10331034 'nl_language' => $language,
1034 - "not_project" => array( '', $project ),
 1035+ 'not_project' => array( '', $project ),
10351036 'cn_notices.not_id=cn_assignments.not_id',
10361037 'cn_assignments.tmp_id=cn_templates.tmp_id'
10371038 ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r73029fixing typo from r73002kaldari23:33, 14 September 2010

Status & tagging log