diff options
-rw-r--r-- | inc/template.php | 9 | ||||
-rw-r--r-- | lib/tpl/default/main.php | 3 |
2 files changed, 11 insertions, 1 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 { diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index bb5391f8c..7ce920b56 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -115,7 +115,8 @@ if (!defined('DOKU_INC')) die(); <?php tpl_button('history')?> </div> <div class="bar-right" id="bar__bottomright"> - <?php tpl_button('subscription')?> + <?php tpl_button('subscribe')?> + <?php tpl_button('subscribens')?> <?php tpl_button('admin')?> <?php tpl_button('profile')?> <?php tpl_button('login')?> |