[dw-free] Add "last updated" time back onto profiles
[commit: http://hg.dwscoalition.org/dw-free/rev/ae45b130dfcc]
http://bugs.dwscoalition.org/show_bug.cgi?id=570
Add last updated to the profile page.
Patch by
phoenix.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=570
Add last updated to the profile page.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/userinfo.bml
- htdocs/userinfo.bml.text
-------------------------------------------------------------------------------- diff -r a8144dd3fb33 -r ae45b130dfcc htdocs/userinfo.bml --- a/htdocs/userinfo.bml Mon Apr 06 23:34:57 2009 +0000 +++ b/htdocs/userinfo.bml Mon Apr 06 23:56:45 2009 +0000 @@ -372,10 +372,22 @@ body<= my $acctype = LJ::name_caps( $u->caps); $ret .= "<p>$acctype</p>" if $acctype; - # journal creation date + # journal creation date, journal update time unless ( $u->is_identity ) { - my $jcdate = BML::ml( '.details.createdon2', { createdate => LJ::mysql_time( $u->timecreate ) } ); - $ret .= "<p>$jcdate (#" . $u->id . ')</p>'; + my $jcdate = BML::ml( '.details.createdon2', + { createdate => LJ::mysql_time( $u->timecreate ) } ); + $ret .= "<p>$jcdate (#" . $u->id . ')'; + + my $lastupdated = substr( LJ::mysql_time( $u->timeupdate ), 0, 10 ); + my $secondsold = time() - $u->timeupdate; + my $ago_text = LJ::ago_text( $secondsold ); + if ( $u->timeupdate ) { + $ret .= ", " . BML::ml( '.details.lastupdated3', + { timestamp => $lastupdated, agotext => $ago_text }); + } else { + $ret .= ", $ML{ '.details.lastupdated.never2' }"; + } + $ret .= "</p>"; } # comment and support stats diff -r a8144dd3fb33 -r ae45b130dfcc htdocs/userinfo.bml.text --- a/htdocs/userinfo.bml.text Mon Apr 06 23:34:57 2009 +0000 +++ b/htdocs/userinfo.bml.text Mon Apr 06 23:56:45 2009 +0000 @@ -99,6 +99,8 @@ .details.lastupdated=Last updated [[timestamp]] .details.lastupdated2=last updated [[timestamp]] + +.details.lastupdated3=last updated [[timestamp]] ([[agotext]]) .details.lastupdated.never=Never updated --------------------------------------------------------------------------------