jenkins-bot has submitted this change and it was merged.
Change subject: Small fixups
......................................................................
Small fixups
Change-Id: I423f1cff99551fa8bb29356a41d3a11e535962f0
---
M includes/Banner.php
M includes/Campaign.php
2 files changed, 6 insertions(+), 4 deletions(-)
Approvals:
AndyRussG: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Banner.php b/includes/Banner.php
index 37405bb..7af0f72 100644
--- a/includes/Banner.php
+++ b/includes/Banner.php
@@ -1219,7 +1219,7 @@
/**
* Given one or more campaign ids, return all banners bound to them
*
- * @param array $campaigns list of campaign numeric IDs
+ * @param integer|array $campaigns list of campaign numeric IDs
*
* @return array a 2D array of banners with associated weights and
settings
*/
diff --git a/includes/Campaign.php b/includes/Campaign.php
index 7c65f1c..72f2145 100644
--- a/includes/Campaign.php
+++ b/includes/Campaign.php
@@ -180,11 +180,11 @@
* @return int
*/
public function getBuckets() {
- if ( $this->priority === null ) {
+ if ( $this->buckets === null ) {
$this->loadBasicSettings();
}
- return $this->priority;
+ return $this->buckets;
}
/**
@@ -224,6 +224,8 @@
__METHOD__
);
if ( $row ) {
+ $this->id = $row->not_id;
+ $this->name = $row->not_name;
$this->start = new MWTimestamp( $row->not_start );
$this->end = new MWTimestamp( $row->not_end );
$this->enabled = (bool)$row->not_enabled;
@@ -412,7 +414,7 @@
$campaign[ 'languages' ] = implode( ", ", $languages );
$campaign[ 'countries' ] = implode( ", ", $geo_countries );
- $bannersIn = Banner::getCampaignBanners( $row->not_id, true );
+ $bannersIn = Banner::getCampaignBanners( $row->not_id );
$bannersOut = array();
// All we want are the banner names, weights, and buckets
foreach ( $bannersIn as $key => $row ) {
--
To view, visit https://gerrit.wikimedia.org/r/177474
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I423f1cff99551fa8bb29356a41d3a11e535962f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits