[dw-free] "Invite someone" link displayed even when we have invite codes turned off
[commit: http://hg.dwscoalition.org/dw-free/rev/8e130e1f49c2]
http://bugs.dwscoalition.org/show_bug.cgi?id=4125
Only show the link to invite someone if we actually need it.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=4125
Only show the link to invite someone if we actually need it.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/Template/Plugin/SiteScheme.pm
- schemes/common.tt
-------------------------------------------------------------------------------- diff -r 273457414b9e -r 8e130e1f49c2 cgi-bin/DW/Template/Plugin/SiteScheme.pm --- a/cgi-bin/DW/Template/Plugin/SiteScheme.pm Sat Dec 17 17:01:43 2011 +0000 +++ b/cgi-bin/DW/Template/Plugin/SiteScheme.pm Tue Dec 20 00:51:59 2011 +0800 @@ -86,6 +86,10 @@ return DW::Request->get->uri !~ m!^/logout!; } +sub show_invite_link { + return $LJ::USE_ACCT_CODES ? 1 : 0; +} + =head1 AUTHOR =over diff -r 273457414b9e -r 8e130e1f49c2 schemes/common.tt --- a/schemes/common.tt Sat Dec 17 17:01:43 2011 +0000 +++ b/schemes/common.tt Tue Dec 20 00:51:59 2011 +0800 @@ -88,7 +88,7 @@ [%- IF unread -%] <span id='Inbox_Unread_Count'>([% unread %])</span>[%- END -%] [%- -%]</a> • </li> [%- -%]<li><a href='[% site.root %]/manage/settings/'>[% 'sitescheme.accountlinks.account' | ml %]</a></li> <br /> - [%- IF ! identity -%]<li><a href='[% site.root %]/manage/circle/invite'>[% 'sitescheme.accountlinks.invitefriend' | ml %]</a> • </li>[%- END -%] + [%- IF ! identity AND dw_scheme.show_invite_link -%]<li><a href='[% site.root %]/manage/circle/invite'>[% 'sitescheme.accountlinks.invitefriend' | ml %]</a> • </li>[%- END -%] [%- -%]<li><a href='[% site.root %]/support/'>[% 'sitescheme.accountlinks.help' | ml %]</a></li> [%- -%]</div> [%- ELSE -%] --------------------------------------------------------------------------------