summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-06-08 13:11:17 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-06-08 13:11:17 +0200
commit582c5bfe90443211cbd7f8f7d23932822a5783dd (patch)
tree02fa7213d73305a72a2e0ecf46d1ebd3fa4ad4c8 /inc
parent34aeb4af497a734c76369e97747f45b938cc527e (diff)
downloadrpg-582c5bfe90443211cbd7f8f7d23932822a5783dd.tar.gz
rpg-582c5bfe90443211cbd7f8f7d23932822a5783dd.tar.bz2
single button functions for subribe and subscribens FS#1408
darcs-hash:20080608111117-7ad00-a1989e6284df2d722c5a2eea80b0d19d6d1ef7dd.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/template.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php
index efd921f7d..6d057463f 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -510,6 +510,7 @@ function tpl_button($type){
return true;
}
return false;
+ case 'subscribe':
case 'subscription':
if($conf['useacl'] && $auth && $ACT == 'show' && $conf['subscribers'] == 1){
if($_SERVER['REMOTE_USER']){
@@ -518,6 +519,14 @@ function tpl_button($type){
} else {
print html_btn('subscribe',$ID,'',array('do' => 'subscribe',));
}
+ if($type == 'subscribe') return true;
+ }
+ }
+ if($type == 'subscribe') return false;
+ // fall through for backward compatibility
+ case 'subscribens':
+ if($conf['useacl'] && $auth && $ACT == 'show' && $conf['subscribers'] == 1){
+ if($_SERVER['REMOTE_USER']){
if($INFO['subscribedns']){
print html_btn('unsubscribens',$ID,'',array('do' => 'unsubscribens',));
} else {