mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-04-23 01:29 am

[dw-free] public key icon doesn't work on userinfo

[commit: http://hg.dwscoalition.org/dw-free/rev/eec75d6d72ef]

http://bugs.dwscoalition.org/show_bug.cgi?id=2546

This broke at some point or never worked? Fix it so we have a public_key
accessor on the user object.

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/LJ/User.pm
  • htdocs/userinfo.bml
--------------------------------------------------------------------------------
diff -r 893bdfa73f75 -r eec75d6d72ef cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Apr 22 10:00:40 2010 -0500
+++ b/cgi-bin/LJ/User.pm	Fri Apr 23 01:29:23 2010 +0000
@@ -2561,6 +2561,12 @@ sub prop {
 }
 
 
+# returns the user's public key
+sub public_key {
+    $_[0]->prop( 'public_key' );
+}
+
+
 sub raw_prop {
     my ($u, $prop) = @_;
     $u->preload_props($prop) unless exists $u->{$prop};
diff -r 893bdfa73f75 -r eec75d6d72ef htdocs/userinfo.bml
--- a/htdocs/userinfo.bml	Thu Apr 22 10:00:40 2010 -0500
+++ b/htdocs/userinfo.bml	Fri Apr 23 01:29:23 2010 +0000
@@ -311,7 +311,7 @@ body<=
     my $ret = q{ <div id='profile_page'><div id='profile_top'> };
 
     $ret .= q{ <div class='username'> } . $u->ljuser_display;
-    if ( $u->{public_key} ) {
+    if ( $u->public_key ) {
         $ret .= qq( 
             <a href='$LJ::SITEROOT/pubkey?user=$user'>
                 <img src='$LJ::IMGPREFIX/key.gif' width='16' height='16' border='0'
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org