]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix group regexes that got missed in Nickname::DISPLAY_FMT update: fixes bug where...
authorBrion Vibber <brion@pobox.com>
Mon, 7 Feb 2011 20:18:41 +0000 (12:18 -0800)
committerBrion Vibber <brion@pobox.com>
Mon, 7 Feb 2011 20:18:41 +0000 (12:18 -0800)
classes/Notice.php
plugins/GroupPrivateMessage/GroupPrivateMessagePlugin.php

index 2d13828f1ff5d1e1a5c9a4e416ba2fe998011794..4522d1fc3889b4648afb6e8434afddfd0fbe8bd8 100644 (file)
@@ -964,7 +964,7 @@ class Notice extends Memcached_DataObject
         $groups = array();
 
         /* extract all !group */
-        $count = preg_match_all('/(?:^|\s)!([A-Za-z0-9]{1,64})/',
+        $count = preg_match_all('/(?:^|\s)!(' . Nickname::DISPLAY_FMT . ')/',
                                 strtolower($this->content),
                                 $match);
         if (!$count) {
index 7598b3f2b70aae76b0230fb850933d338de15a17..9468423bed55498f34d3d42f138e49774bc3c49e 100644 (file)
@@ -391,8 +391,10 @@ class GroupPrivateMessagePlugin extends Plugin
 
         // Look for group tags
         // FIXME: won't work for remote groups
+        // @fixme if Notice::saveNew is refactored so we can just pull its list
+        // of groups between processing and saving, make use of it
 
-        $count = preg_match_all('/(?:^|\s)!([A-Za-z0-9]{1,64})/',
+        $count = preg_match_all('/(?:^|\s)!(' . Nickname::DISPLAY_FMT . ')/',
                                 strtolower($notice->content),
                                 $match);