]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
* Fix --locale to control LC_ALL now.
[ikiwiki.git] / IkiWiki / CGI.pm
index 83ed959c02a9d1d7d90fdc1ec8195f76f1608703..85fc1a38614b17ce38984a597319306140eba2ea 100644 (file)
@@ -46,6 +46,8 @@ sub page_locked ($$;$) { #{{{
                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)));
@@ -666,9 +668,9 @@ sub userlink ($) { #{{{
                if ($display !~ /\[/) {
                        $display=~s/^(.*?)\.([^.]+\.[a-z]+)$/$1 [$2]/;
                }
-               # Convert "somehost.com/user" to "user [somehost.com]".
+               # Convert "http://somehost.com/user" to "user [somehost.com]".
                if ($display !~ /\[/) {
-                       $display=~s/^(.+)\/[^\/](.+)$/$2 [$1]/;
+                       $display=~s/^https?:\/\/(.+)\/([^\/]+)$/$2 [$1]/;
                }
                $display=~s!^https?://!!; # make sure this is removed
                return "<a href=\"$user\">".escapeHTML($display)."</a>";