aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/git.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-23 20:12:26 -0400
committerJoey Hess <joey@kitenet.net>2010-06-23 20:16:01 -0400
commit9a32451986c710d1f1ce71217c1f7ab3b84f72bf (patch)
treec3bf789d7d0e247327d94e5ff696ba50aba81526 /IkiWiki/Plugin/git.pm
parenta4f381ace837a032bc202cc6b2a98e922d4b7cfc (diff)
downloadikiwiki-9a32451986c710d1f1ce71217c1f7ab3b84f72bf.tar
ikiwiki-9a32451986c710d1f1ce71217c1f7ab3b84f72bf.tar.gz
finializing openid nickname support
Renamed usershort => nickname. Note that this means existing user login sessions will not have the nickname recorded, and so it won't be used for those.
Diffstat (limited to 'IkiWiki/Plugin/git.pm')
-rw-r--r--IkiWiki/Plugin/git.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 3e289e0c3..8d210cb5d 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -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],