From 6c30366e477e3a6a1ebf047bc08ed5b3f9ade8dc Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 23 May 2011 00:06:40 +0200 Subject: Correct the subscription user regex FS#2250 This fixes the subscription user regex to really only not to match the author of the change but to still match users who have that username as substring in their username. --- inc/subscription.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index 8e3a99a8f..669d6137d 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -278,8 +278,8 @@ function subscription_addresslist(&$data){ } $pres = array('style' => 'every', 'escaped' => true); if (!$self && isset($_SERVER['REMOTE_USER'])) { - $pres['user'] = '((?:(?!' . preg_quote_cb($_SERVER['REMOTE_USER']) . - ')\S?)+)'; + $pres['user'] = '((?!' . preg_quote_cb($_SERVER['REMOTE_USER']) . + '\b)\S+)'; } $subs = subscription_find($id, $pres); $emails = array(); -- cgit v1.2.3 From ded89ef6a31e8cfcc56aa96b75be8ae6ab58dd7c Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 23 May 2011 10:32:00 +0200 Subject: Hopefully finally fixed the subscription user regex Users with names like foo.bar still didn't receive the mail when user foo edited the page. Now the two possibilities (space and end of line) are tested instead of just a word boundary. --- inc/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/subscription.php') diff --git a/inc/subscription.php b/inc/subscription.php index 669d6137d..c94f17ad0 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -279,7 +279,7 @@ function subscription_addresslist(&$data){ $pres = array('style' => 'every', 'escaped' => true); if (!$self && isset($_SERVER['REMOTE_USER'])) { $pres['user'] = '((?!' . preg_quote_cb($_SERVER['REMOTE_USER']) . - '\b)\S+)'; + '(?: |$))\S+)'; } $subs = subscription_find($id, $pres); $emails = array(); -- cgit v1.2.3