jenkins-bot has submitted this change and it was merged.
Change subject: Remove the checkbox for global deliveries, simply use the
spamlist.
......................................................................
Remove the checkbox for global deliveries, simply use the spamlist.
This eliminates the massmessage-global user right
Change-Id: Ic194f19c047bc920bf9186b6902c42451838b43b
---
M MassMessage.body.php
M MassMessage.i18n.php
M MassMessage.php
M SpecialMassMessage.php
4 files changed, 3 insertions(+), 31 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MassMessage.body.php b/MassMessage.body.php
index e52d484..34a4d0c 100644
--- a/MassMessage.body.php
+++ b/MassMessage.body.php
@@ -119,7 +119,6 @@
* @fixme Follow redirects on other sites
*/
public static function normalizeSpamList( $pages, $isLocal ) {
- global $wgDBname;
$data = array();
foreach ( $pages as $page ) {
if ( $isLocal ) {
@@ -137,11 +136,9 @@
}
$page['dbname'] = $dbname;
}
+
// Use an assoc array to clear dupes
- if ( $page['dbname'] == $wgDBname || !$isLocal ) {
- // If the delivery is local, only allow
requests on the same site.
- $data[$page['title'] . $page['site']] = $page;
- }
+ $data[$page['title'] . $page['site']] = $page;
}
return $data;
diff --git a/MassMessage.i18n.php b/MassMessage.i18n.php
index 52d85ed..d1e4a8b 100644
--- a/MassMessage.i18n.php
+++ b/MassMessage.i18n.php
@@ -34,7 +34,6 @@
'massmessage-queued-count' => 'Queued [[Special:MassMessage|mass
messages]]',
'right-massmessage' => 'Send a message to multiple users at once',
'action-massmessage' => 'send a message to multiple users at once',
- 'right-massmessage-global' => 'Send a message to multiple users on
different wikis at once',
'log-name-massmessage' => 'Mass message log',
'log-description-massmessage' => 'These events track users sending
messages through [[Special:MassMessage]].',
'logentry-massmessage-send' => '$1 {{GENDER:$2|sent a message}} to $3',
diff --git a/MassMessage.php b/MassMessage.php
index 32e144b..39a6c1b 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -70,5 +70,4 @@
$wgLogTypes[] = 'massmessage';
$wgLogActionsHandlers['massmessage/*'] = 'LogFormatter';
$wgAvailableRights[] = 'massmessage'; // Local messaging
-$wgAvailableRights[] = 'massmessage-global'; // Cross-wiki messaging
$wgGroupPermissions['sysop']['massmessage'] = true;
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index cc55c3c..cb34c1c 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -23,11 +23,6 @@
*/
protected $state;
- /**
- * @var bool
- */
- protected $isGlobal;
-
function __construct() {
parent::__construct( 'MassMessage', 'massmessage' );
}
@@ -106,15 +101,6 @@
'label-message' => 'massmessage-form-message',
'default' => $request->getText( 'message' )
);
-
- if ( $this->getUser()->isAllowed( 'massmessage-global' ) ) {
- $m['global'] = array(
- 'id' => 'form-global',
- 'type' => 'check',
- 'label-message' => 'massmessage-form-global',
- 'default' => $request->getText( 'global' ) ==
'yes' ? true : false
- );
- }
$m['preview-button'] = array(
'id' => 'form-preview-button',
@@ -209,18 +195,9 @@
*/
function verifyData( $data ) {
- $this->isGlobal = isset( $data['global'] ) && $data['global'];
// If the message delivery is global
-
$spamlist = $this->getSpamlist( $data['spamlist'] );
if ( !( $spamlist instanceof Title ) ) {
$this->status->fatal( $spamlist );
- }
-
- // Check that our account hasn't been blocked.
- $user = MassMessage::getMessengerUser();
- if ( !$this->isGlobal && $user->isBlocked() ) {
- // If our delivery is global, it doesn't matter if our
local account is blocked
- $this->status->fatal( 'massmessage-account-blocked' );
}
if ( trim( $data['subject'] ) === '' ) {
@@ -290,7 +267,7 @@
// Insert it into the job queue.
$pages = MassMessage::getParserFunctionTargets( $spamlist,
$this->getContext() );
- $pages = MassMessage::normalizeSpamList( $pages,
!$this->isGlobal );
+ $pages = MassMessage::normalizeSpamList( $pages );
foreach ( $pages as $page ) {
$title = Title::newFromText( $page['title'] );
$job = new MassMessageJob( $title, $data );
--
To view, visit https://gerrit.wikimedia.org/r/78047
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic194f19c047bc920bf9186b6902c42451838b43b
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MZMcBride <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits