]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/git.pm
finializing openid nickname support
[ikiwiki.git] / IkiWiki / Plugin / git.pm
index 3e289e0c3f630adb9f0284f81f7233338fb70e38..8d210cb5d9d2d916897a48eb281289be34f088ae 100644 (file)
@@ -606,12 +606,16 @@ sub rcs_recentchanges ($) {
                        push @messages, { line => $line };
                }
 
-               my $user=$ci->{'author_name'};
-               my $usershort=$ci->{'author_username'};
+               my $user=$ci->{'author_username'};
                my $web_commit = ($ci->{'author'} =~ /\@web>/);
-
-               if ($usershort =~ /:\/\//) {
-                       $usershort=undef; # url; not really short
+               my $nickname;
+
+               # Set nickname only if a non-url author_username is available,
+               # and author_name is an url.
+               if ($user !~ /:\/\// && defined $ci->{'author_name'} &&
+                   $ci->{'author_name'} =~ /:\/\//) {
+                       $nickname=$user;
+                       $user=$ci->{'author_name'};
                }
 
                # compatability code for old web commit messages
@@ -626,7 +630,7 @@ sub rcs_recentchanges ($) {
                push @rets, {
                        rev        => $sha1,
                        user       => $user,
-                       usershort  => $usershort,
+                       nickname   => $nickname,
                        committype => $web_commit ? "web" : "git",
                        when       => $when,
                        message    => [@messages],