]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
fix mercurial commit with session but without nickname
authorJoey Hess <joey@kitenet.net>
Sat, 30 Jul 2011 08:46:26 +0000 (10:46 +0200)
committerJoey Hess <joey@kitenet.net>
Sat, 30 Jul 2011 08:46:26 +0000 (10:46 +0200)
IkiWiki/Plugin/mercurial.pm

index 102b4692b805024ec02dc78a7db09896436e3d2b..c7f920ab9bfd023e45184e700c8b15e782d7e234 100644 (file)
@@ -180,7 +180,6 @@ sub rcs_commit_helper (@) {
        $ENV{HGENCODING} = 'utf-8';
 
        my $user="Anonymous";
-       my $nickname;
        if (defined $params{session}) {
                if (defined $params{session}->param("name")) {
                        $user = $params{session}->param("name");
@@ -189,6 +188,7 @@ sub rcs_commit_helper (@) {
                        $user = $params{session}->remote_addr();
                }
 
+               my $nickname=$user;
                if (defined $params{session}->param("nickname")) {
                        $nickname=encode_utf8($params{session}->param("nickname"));
                        $nickname=~s/\s+/_/g;