Tinaj1234 has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/58/220758/1

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: newchange
Gerrit-Change-Id: I5f305a59363a88e813e9880f06b3b31527a3d767
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Tinaj1234 <tinajohnson.1...@gmail.com>

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

Reply via email to