summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorsteven-danz <steven-danz@kc.rr.com>2005-08-08 06:50:34 +0200
committersteven-danz <steven-danz@kc.rr.com>2005-08-08 06:50:34 +0200
commitf9eb5648430624cb0f4e143aee3358ccc8146f4e (patch)
tree502d01b44db758049da4f21d55ef139d975f44b0 /inc/template.php
parent6de3759a1b7a74492845c76e1f0bd1078e2220c7 (diff)
downloadrpg-f9eb5648430624cb0f4e143aee3358ccc8146f4e.tar.gz
rpg-f9eb5648430624cb0f4e143aee3358ccc8146f4e.tar.bz2
subscribe_changes.patch
Updates to the subscription patch to add a configuration option to enable/disable the feature, move the messages to the language files, and general cleanup darcs-hash:20050808045034-4c315-88a72dc8d2b22fdd9af8caa0505ef5c737965c86.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/inc/template.php b/inc/template.php
index 9f39b6b79..3937d99d2 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -118,12 +118,6 @@ function tpl_content(){
case 'admin':
tpl_admin();
break;
- case 'track':
- html_track();
- break;
- case 'ignore':
- html_ignore();
- break;
default:
msg("Failed to handle command: ".hsc($ACT),-1);
}
@@ -342,7 +336,7 @@ function tpl_button($type){
print html_backtomedia_button(array('ns' => $NS),'b');
break;
case 'subscription':
- if($conf['useacl'] && $ACT == 'show'){
+ if($conf['useacl'] && $ACT == 'show' && $conf['subscribers'] == 1){
if($_SERVER['REMOTE_USER']){
if($INFO['subscribed']){
print html_btn('unsubscribe',$ID,'',array('do' => 'unsubscribe',));
@@ -438,13 +432,13 @@ function tpl_actionlink($type,$pre='',$suf=''){
if($INFO['perm'] == AUTH_ADMIN)
tpl_link(wl($ID,'do=admin'),$pre.$lang['btn_admin'].$suf,'class="action"');
break;
- case 'track':
- if($conf['useacl'] && $ACT == 'show'){
+ case 'subscribe':
+ if($conf['useacl'] && $ACT == 'show' && $conf['subscribers'] == 1){
if($_SERVER['REMOTE_USER']){
- if(tracking($ID,$_SERVER['REMOTE_USER'])){
- tpl_link(wl($ID,'do=ignore'),$pre.$lang['btn_ignore'].$suf,'class="action"');
+ if($info['subscribed']) {
+ tpl_link(wl($ID,'do=unsubscribe'),$pre.$lang['btn_unsubscribe'].$suf,'class="action"');
} else {
- tpl_link(wl($ID,'do=track'),$pre.$lang['btn_track'].$suf,'class="action"');
+ tpl_link(wl($ID,'do=subscribe'),$pre.$lang['btn_subscribe'].$suf,'class="action"');
}
}
}