jenkins-bot has submitted this change and it was merged.

Change subject: Move field stuff to getFieldNames method
......................................................................


Move field stuff to getFieldNames method

Change-Id: Id586348e3b40f8143f6aba2d3add4c6fd00df975
---
M includes/NewsletterManageTablePager.php
M includes/NewsletterTablePager.php
M includes/specials/SpecialNewsletterManage.php
M includes/specials/SpecialNewsletters.php
4 files changed, 14 insertions(+), 26 deletions(-)

Approvals:
  01tonythomas: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/NewsletterManageTablePager.php 
b/includes/NewsletterManageTablePager.php
index a48a62b..6b5c953 100644
--- a/includes/NewsletterManageTablePager.php
+++ b/includes/NewsletterManageTablePager.php
@@ -5,17 +5,18 @@
        private $newsletterOwners = array();
 
        /**
-        * @see TablePager::getFieldnames
-        * @var array|null
+        * @var null|string[]
         */
        private $fieldNames = null;
 
        public function getFieldNames() {
                if ( $this->fieldNames === null ) {
-                       $this->fieldNames = array();
-                       foreach ( SpecialNewsletterManage::$fields as $key => 
$value ) {
-                               $this->fieldNames[$key] = $this->msg( 
"newsletter-manage-header-$value" )->text();
-                       }
+                       $this->fieldNames = array(
+                               'newsletter_id' => $this->msg( 
'newsletter-manage-header-name' )->text(),
+                               'publisher_id' => $this->msg( 
'newsletter-manage-header-publisher' )->text(),
+                               'permissions' => $this->msg( 
'newsletter-manage-header-permissions' )->text(),
+                               'action' => $this->msg( 
'newsletter-manage-header-action' )->text(),
+                       );
                }
                return $this->fieldNames;
        }
diff --git a/includes/NewsletterTablePager.php 
b/includes/NewsletterTablePager.php
index d4d2fad..8e0bb67 100644
--- a/includes/NewsletterTablePager.php
+++ b/includes/NewsletterTablePager.php
@@ -3,17 +3,18 @@
 class NewsletterTablePager extends TablePager {
 
        /**
-        * @see TablePager::getFieldnames
-        * @var array|null
+        * @var null|string[]
         */
        private $fieldNames = null;
 
        public function getFieldNames() {
                if ( $this->fieldNames === null ) {
-                       $this->fieldNames = array();
-                       foreach ( SpecialNewsletters::$fields as $field => 
$property ) {
-                               $this->fieldNames[$field] = $this->msg( 
"newsletter-header-$property" )->text();
-                       }
+                       $this->fieldNames = array(
+                               'nl_name' => $this->msg( 
'newsletter-header-name' )->text(),
+                               'nl_desc' => $this->msg( 
'newsletter-header-description' )->text(),
+                               'subscriber_count' => $this->msg( 
'newsletter-header-subscriber_count' )->text(),
+                               'action' => $this->msg( 
'newsletter-header-action' )->text(),
+                       );
                }
                return $this->fieldNames;
        }
diff --git a/includes/specials/SpecialNewsletterManage.php 
b/includes/specials/SpecialNewsletterManage.php
index e9b7945..dfeba7e 100644
--- a/includes/specials/SpecialNewsletterManage.php
+++ b/includes/specials/SpecialNewsletterManage.php
@@ -5,13 +5,6 @@
  */
 class SpecialNewsletterManage extends SpecialPage {
 
-       public static $fields = array(
-               'newsletter_id' => 'name',
-               'publisher_id' => 'publisher',
-               'permissions' => 'permissions',
-               'action' => 'action',
-       );
-
        public function __construct() {
                parent::__construct( 'NewsletterManage' );
        }
diff --git a/includes/specials/SpecialNewsletters.php 
b/includes/specials/SpecialNewsletters.php
index 365ba65..533f4cc 100644
--- a/includes/specials/SpecialNewsletters.php
+++ b/includes/specials/SpecialNewsletters.php
@@ -5,13 +5,6 @@
  */
 class SpecialNewsletters extends SpecialPage {
 
-       public static $fields = array(
-               'nl_name' => 'name',
-               'nl_desc' => 'description',
-               'subscriber_count' => 'subscriber_count',
-               'action' => 'action',
-       );
-
        # Array containing all newsletter ids in nl_subscriptions table
        public static $allSubscribedNewsletterId = array();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id586348e3b40f8143f6aba2d3add4c6fd00df975
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: 01tonythomas <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to