[dw-free] Site Map needs better link to Shop
[commit: http://hg.dwscoalition.org/dw-free/rev/9bf1fef2ddb5]
http://bugs.dwscoalition.org/show_bug.cgi?id=2508
Only show the links to the shop if payments are enabled in this
installation. (Correct bug number)
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2508
Only show the links to the shop if payments are enabled in this
installation. (Correct bug number)
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/en.dat
- cgi-bin/DW/Logic/MenuNav.pm
- cgi-bin/LJ/User.pm
-------------------------------------------------------------------------------- diff -r ddbf13a0f9a5 -r 9bf1fef2ddb5 bin/upgrading/en.dat --- a/bin/upgrading/en.dat Fri Jun 04 13:50:43 2010 +0800 +++ b/bin/upgrading/en.dat Fri Jun 04 13:54:39 2010 +0800 @@ -2177,6 +2177,8 @@ menunav.organize.selectstyle=Select Styl menunav.read=Read +menunav.read.archive=Archive + menunav.read.inbox.nounread=Inbox menunav.read.inbox.unread2=Inbox [[num]] diff -r ddbf13a0f9a5 -r 9bf1fef2ddb5 cgi-bin/DW/Logic/MenuNav.pm --- a/cgi-bin/DW/Logic/MenuNav.pm Fri Jun 04 13:50:43 2010 +0800 +++ b/cgi-bin/DW/Logic/MenuNav.pm Fri Jun 04 13:54:39 2010 +0800 @@ -178,6 +178,11 @@ sub get_menu_navigation { display => $loggedin_hasnetwork, }, { + url => $u ? $u->archive_current_month : "", + text => "menunav.read.archive", + display => $loggedin_hasjournal, + }, + { url => "$LJ::SITEROOT/tools/recent_comments", text => "menunav.read.recentcomments", display => $loggedin, diff -r ddbf13a0f9a5 -r 9bf1fef2ddb5 cgi-bin/LJ/User.pm --- a/cgi-bin/LJ/User.pm Fri Jun 04 13:50:43 2010 +0800 +++ b/cgi-bin/LJ/User.pm Fri Jun 04 13:54:39 2010 +0800 @@ -1781,6 +1781,15 @@ sub allow_search_by { } +# returns a link to the current year and month in the user's archive +sub archive_current_month { + my ( $u ) = @_; + return '' if $u->is_identity; # no archive to read + my $t = $u->time_now; + return sprintf( "%s/%02d/%02d/", $u->journal_base, $t->year, $t->mon ); +} + + sub caps { my $u = shift; return $u->{caps}; --------------------------------------------------------------------------------