summaryrefslogtreecommitdiff
path: root/inc/actions.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/actions.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/actions.php')
-rw-r--r--inc/actions.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/inc/actions.php b/inc/actions.php
index 8a3a61cb9..3322a81aa 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -282,25 +282,26 @@ function act_export($act){
function act_subscription($act){
global $ID;
global $INFO;
-
+ global $lang;
+
$file=metaFN($ID,'.mlist');
if ($act=='subscribe' && !$INFO['subscribed']){
if ($INFO['userinfo']['mail']){
if (io_saveFile($file,$_SERVER['REMOTE_USER']."\n",true)) {
$INFO['subscribed'] = true;
- msg('Added '.$INFO['userinfo']['name'].' to subscription list for '.$ID,1);
+ msg(sprintf($lang[$act.'_success'], $INFO['userinfo']['name'], $ID),1);
} else {
- msg('Error adding '.$INFO['userinfo']['name'].' to subscription list for '.$ID,-1);
+ msg(sprintf($lang[$act.'_error'], $INFO['userinfo']['name'], $ID),1);
}
} else {
- msg('There is no address associated with your login, you cannot be added to the subscription list',-1);
+ msg($lang['subscribe_noaddress']);
}
} elseif ($act=='unsubscribe' && $INFO['subscribed']){
if (io_deleteFromFile($file,$_SERVER['REMOTE_USER']."\n")) {
$INFO['subscribed'] = false;
- msg('Removed '.$INFO['userinfo']['name'].' from subscription list for '.$ID,1);
+ msg(sprintf($lang[$act.'_success'], $INFO['userinfo']['name'], $ID),1);
} else {
- msg('Error removing '.$INFO['userinfo']['name'].' from subscription list for '.$ID,-1);
+ msg(sprintf($lang[$act.'_error'], $INFO['userinfo']['name'], $ID),1);
}
}