Adamw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87573
Change subject: Reject messaged editor: bad correlationId regex
......................................................................
Reject messaged editor: bad correlationId regex
Allow [a-zA-Z0-9]. Missing anything else?
Change-Id: Ib498563064f0cacf2dbb1bb70fdc6f5d1508208c
---
M sites/all/modules/wmf_common/Queue.php
M sites/all/modules/wmf_common/wmf_common.module
2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/73/87573/1
diff --git a/sites/all/modules/wmf_common/Queue.php
b/sites/all/modules/wmf_common/Queue.php
index 79dff19..835a7dd 100644
--- a/sites/all/modules/wmf_common/Queue.php
+++ b/sites/all/modules/wmf_common/Queue.php
@@ -111,7 +111,7 @@
}
function isConnected() {
- return $this->connection !== null and $this->connection->isConnected();
+ return $this->connection and $this->connection->isConnected();
}
function getFreshConnection() {
diff --git a/sites/all/modules/wmf_common/wmf_common.module
b/sites/all/modules/wmf_common/wmf_common.module
index acf578a..037502f 100644
--- a/sites/all/modules/wmf_common/wmf_common.module
+++ b/sites/all/modules/wmf_common/wmf_common.module
@@ -176,12 +176,12 @@
$q = queue2civicrm_stomp();
$queue = preg_replace( '/[^-a-z]/', '', $queue );
- $correlationId = preg_replace( '/[^-a-z0-9]/', '', $correlationId );
+ $correlationId = preg_replace( '/[^-a-zA-Z0-9]/', '', $correlationId );
$msg = $q->getByCorrelationId( $queue, $correlationId );
if ( !$msg ) {
- drupal_set_message( t( 'Message not found.' ) );
+ drupal_set_message( t( 'Message %id not found.', array( '%id' =>
$correlationId ) ) );
return $form;
}
@@ -254,13 +254,13 @@
$msg = $q->getByCorrelationId( "{$queue}-damaged", $correlationId );
$q->ack( $msg );
- drupal_set_message( t( 'Message resent for processing.' ) );
+ drupal_set_message( t( 'Message %id resent for processing.', array( '%id'
=> $correlationId ) ) );
$form_state['redirect'] = "queue/{$queue}/{$correlationId}";
break;
case $form_state['values']['delete']:
$msg = $q->getByCorrelationId( "{$queue}-damaged", $correlationId );
$q->ack( $msg );
- drupal_set_message( t( 'Successfully removed message.' ) );
+ drupal_set_message( t( 'Successfully removed message %id.', array( '%id'
=> $correlationId ) ) );
$form_state['redirect'] = "queue/{$queue}-damaged/";
break;
}
--
To view, visit https://gerrit.wikimedia.org/r/87573
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib498563064f0cacf2dbb1bb70fdc6f5d1508208c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits