if (pagespec_match($page, userinfo_get($admin, "locked_pages"))) {
return 1 if $nonfatal;
+ #translators: The first parameter is a page name,
+ #translators: second is the user who locked it.
error(sprintf(gettext("%s is locked by %s and cannot be edited"),
htmllink("", "", $page, 1),
userlink($admin)));
}
# Convert "http://somehost.com/user" to "user [somehost.com]".
if ($display !~ /\[/) {
- $display=~s/^https?:\/\/(.+)\/[^\/](.+)$/$2 [$1]/;
+ $display=~s/^https?:\/\/(.+)\/([^\/]+)$/$2 [$1]/;
}
$display=~s!^https?://!!; # make sure this is removed
return "<a href=\"$user\">".escapeHTML($display)."</a>";