Use the username, not the user object, as the memcache value.
Patch by kareila.
diffs (43 lines):
diff -r f9951ef2194a -r 9c1ecf129339 cgi-bin/DW/User/Edges/WatchTrust.pm
--- a/cgi-bin/DW/User/Edges/WatchTrust.pm Fri Jun 12 21:42:21 2009 +0000
+++ b/cgi-bin/DW/User/Edges/WatchTrust.pm Fri Jun 12 21:45:13 2009 +0000
@@ -336,7 +336,7 @@ sub trustmask {
# name: LJ::User::get_birthdays
# des: get the upcoming birthdays for friends of a user. shows birthdays 3
months away by default
# pass in full => 1 to get all friends' birthdays.
-# returns: arrayref of [ month, day, user ] arrayrefs
+# returns: arrayref of [ month, day, username ] arrayrefs
sub get_birthdays {
my $u = LJ::want_user( shift )
@@ -394,7 +394,7 @@ sub get_birthdays {
next if ($month == $mnow && $day < $dnow);
}
- $timedata{"$date.$id"} = [$month, $day, $u];
+ $timedata{"$date.$id"} = [$month, $day, $u->user];
}
# hash slice for array sorted by date
diff -r f9951ef2194a -r 9c1ecf129339 htdocs/birthdays.bml
--- a/htdocs/birthdays.bml Fri Jun 12 21:42:21 2009 +0000
+++ b/htdocs/birthdays.bml Fri Jun 12 21:45:13 2009 +0000
@@ -41,7 +41,8 @@ body<=
my $lastmon = 0;
foreach my $bday (@bdays) {
- my ($mymon, $myday, $u) = @$bday;
+ my ($mymon, $myday, $user) = @$bday;
+ my $u = LJ::load_user( $user );
my $name = $u->name_html;
if ( $mymon != $lastmon ) {
@@ -51,7 +52,7 @@ body<=
}
$body .= sprintf( "<b><tt>%02d</tt></b>: ", $myday );
- $body .= LJ::ljuser( $u ) . " - $name<br />\n";
+ $body .= $u->ljuser_display . " - $name<br />\n";
}
if (@bdays) {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog