Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/172509

Change subject: Alias table names to support prefixed schemas
......................................................................

Alias table names to support prefixed schemas

Change-Id: Ida27133b44f3b026cd372143bf3613102c559930
---
M includes/CNCampaignPager.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/09/172509/1

diff --git a/includes/CNCampaignPager.php b/includes/CNCampaignPager.php
index 76084b3..218ed89 100644
--- a/includes/CNCampaignPager.php
+++ b/includes/CNCampaignPager.php
@@ -62,10 +62,11 @@
                        // Query for only campaigns associated with a specific 
banner id
                        return array(
                                'tables' => array(
-                                       'cn_notices', 'cn_assignments'
+                                       'notices' => 'cn_notices',
+                                       'assignments' => 'cn_assignments'
                                ),
                                'fields' => array(
-                                               'cn_notices.not_id',
+                                               'notices.not_id',
                                                'not_name',
                                                'not_start',
                                                'not_end',
@@ -76,8 +77,8 @@
                                                'not_archived'
                                ),
                                'conds' => array(
-                                       'cn_notices.not_id = 
cn_assignments.not_id',
-                                       'cn_assignments.tmp_id = ' . 
(int)$this->assignedBannerId
+                                       'notices.not_id = assignments.not_id',
+                                       'assignments.tmp_id = ' . 
(int)$this->assignedBannerId
                                )
                        );
 
@@ -363,7 +364,7 @@
         */
        public function getDefaultSort() {
                return $this->assignedBannerId === null ?
-                       'not_id' : 'cn_notices.not_id';
+                       'not_id' : 'notices.not_id';
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/172509
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida27133b44f3b026cd372143bf3613102c559930
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

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

Reply via email to