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

Change subject: Remove deprecated $wgOut from Special:NewsletterCreate and 
Special:NewsletterManage
......................................................................


Remove deprecated $wgOut from Special:NewsletterCreate and 
Special:NewsletterManage

Removed $wgOut to avoid use of depecated globals.

Change-Id: I5f305a59363a88e813e9880f06b3b31527a3d767
---
M includes/SpecialNewsletterCreate.php
M includes/SpecialNewsletterManage.php
2 files changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/includes/SpecialNewsletterCreate.php 
b/includes/SpecialNewsletterCreate.php
index 931070d..00e9784 100644
--- a/includes/SpecialNewsletterCreate.php
+++ b/includes/SpecialNewsletterCreate.php
@@ -75,8 +75,6 @@
         * @return bool
         */
        static function onSubmitNewsletter( array $formData ) {
-               global $wgOut;
-
                if ( isset( $formData['mainpage'] ) ) {
                        $page = Title::newFromText( $formData['mainpage'] );
                        $pageId = $page->getArticleId();
@@ -99,7 +97,7 @@
                        } catch ( DBQueryError $e ) {
                                return 'A newsletter with the same name already 
exists. Try again with another name';
                        }
-                       $wgOut->addWikiMsg( 'newsletter-create-confirmation' );
+                       RequestContext::getMain()->getOutput()->addWikiMsg( 
'newsletter-create-confirmation' );
 
                        return true;
                }
diff --git a/includes/SpecialNewsletterManage.php 
b/includes/SpecialNewsletterManage.php
index 0853076..7f92955 100644
--- a/includes/SpecialNewsletterManage.php
+++ b/includes/SpecialNewsletterManage.php
@@ -70,8 +70,6 @@
         * @return bool
         */
        static function onSubmitIssue( $formData ) {
-               global $wgOut;
-
                if ( isset( $formData['issue-page'] ) && isset( 
$formData['issue-newsletter'] ) ) {
                        $issuePage = Title::newFromText( 
$formData['issue-page'] );
                        $pageId = $issuePage->getArticleId();
@@ -99,7 +97,7 @@
                                'issue_publisher_id' => $formData['publisher']
                        );
                        $dbw->insert( 'nl_issues', $rowData, __METHOD__ );
-                       $wgOut->addWikiMsg( 'issue-announce-confirmation' );
+                       RequestContext::getMain()->getOutput()->addWikiMsg( 
'issue-announce-confirmation' );
 
                        return true;
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f305a59363a88e813e9880f06b3b31527a3d767
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Tinaj1234 <tinajohnson.1...@gmail.com>
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to