Legoktm has submitted this change and it was merged.

Change subject: Check that a value for global messaging is set before using 
it's value
......................................................................


Check that a value for global messaging is set before using it's value

If the user doesn't have the massmessage-global userright, they won't get the
checkbox, so a value is never set for $data['global']. Now it checks that
the value is set and is true.

Change-Id: I88daf6faaab9af32685d6ca9b1cd1f261fd03bb1
---
M SpecialMassMessage.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Legoktm: Verified; Looks good to me, approved



diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 09cd7c7..3365ae2 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -135,7 +135,7 @@
        function submit( $data ) {
                // Check that the spamlist exists.
                $spamlist = Title::newFromText( $data['spamlist'] );
-               $global = $data['global']; // If the message delivery is global
+               $global = isset( $data['global'] ) && $data['global']; // If 
the message delivery is global
                $status = new Status();
                $errors = array();
                if ( $spamlist->getArticleID() == 0 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88daf6faaab9af32685d6ca9b1cd1f261fd03bb1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>

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

Reply via email to