diff --git a/core/userclass.class.php b/core/userclass.class.php index 934d14e2..011c387f 100644 --- a/core/userclass.class.php +++ b/core/userclass.class.php @@ -30,14 +30,13 @@ class UserClass { } $_user_class_base = new UserClass("base", null, array( - "change_setting" => False, # web-level settings, eg the config table - "override_config" => False, # sys-level config, eg config.php - "big_search" => False, # more than 3 tags (speed mode only) - "lock_image" => False, + "change_setting" => False, # modify web-level settings, eg the config table + "override_config" => False, # modify sys-level settings, eg config.php + "big_search" => False, # search for more than 3 tags at once (speed mode only) "view_ip" => False, # view IP addresses associated with things "ban_ip" => False, "change_password" => False, - "change_user_info" => False, + "change_user_info" => False, # email address, etc "delete_user" => False, "delete_image" => False, "delete_comment" => False, @@ -47,10 +46,11 @@ $_user_class_base = new UserClass("base", null, array( "edit_image_tag" => False, "edit_image_source" => False, "edit_image_owner" => False, + "lock_image" => False, "mass_tag_edit" => False, "report_image" => False, - "view_image_report" => False, - "protected" => False, + "view_image_report" => False, # deal with reported images + "protected" => False, # only admins can modify protected users (stops a moderator changing an admin's password) )); $_user_classes["anonymous"] = new UserClass("anonymous", $_user_class_base, array( "edit_image_tag" => "tag_edit_anon", diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index 1c0e76e1..f4157bab 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -38,7 +38,7 @@ class BBCode extends FormatterExtension { $text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text); $text = preg_replace("/\[u\](.*?)\[\/u\]/s", "\\1", $text); $text = preg_replace("/\[s\](.*?)\[\/s\]/s", "\\1", $text); - $text = preg_replace("/>>(\d+)(#c?(\d+))?/s", ">>\\1\\2", $text); + $text = preg_replace("/>>(\d+)(#c?(\d+))?/s", ">>\\1\\2", $text); $text = preg_replace("/(^|\s)#(\d+)/s", "\\1#\\2", $text); $text = preg_replace("/>>([^\d].+)/", "
\\1
", $text); $text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "\\2", $text); diff --git a/lib/shimmie.js b/lib/shimmie.js index 35c55fb4..727e1b26 100644 --- a/lib/shimmie.js +++ b/lib/shimmie.js @@ -56,7 +56,10 @@ $(document).ready(function() { var target_id = $(elm).text().match(/#c?(\d+)/); if(target_id && $("#c"+target_id[1])) { var target_name = $("#c"+target_id[1]+" .username").html(); - $(elm).html("@"+target_name); + if(target_name) { + $(elm).attr("href", "#c"+target_id[1]); + $(elm).html("@"+target_name); + } } }); });