From 582c5bfe90443211cbd7f8f7d23932822a5783dd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 8 Jun 2008 13:11:17 +0200 Subject: single button functions for subribe and subscribens FS#1408 darcs-hash:20080608111117-7ad00-a1989e6284df2d722c5a2eea80b0d19d6d1ef7dd.gz --- inc/template.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'inc') 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 { -- cgit v1.2.3