From 24f652cebb911f360f463ac8bb3d4dbf99a19bc8 Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Wed, 28 Dec 2005 15:23:33 +0000 Subject: clean up unsubscribe, getting closer --- index.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7a0a32c..466e619 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ assign( 'subInfo', BitMailer::lookupUrlCode( $_REQUEST["sub"] ) ); } $mid = 'bitpackage:newsletters/user_subscriptions.tpl'; -} elseif( isset( $_REQUEST["unsubscribe"] ) ) { +} elseif( isset( $_REQUEST["update"] ) ) { + /* List newsletters */ + $listHash = array(); + $newsletters = $gContent->getList( $listHash ); +vd( $newsletters ); +vd( $_REQUEST ); + $feedback['success'] = tra( "Your subscriptions were updated." ); if( $conf = $gContent->unsubscribe( $_REQUEST["unsubscribe"] ) ) { - $feedback['success'] = tra( "Your email address was removed from the list of subscriptors." ); - $gBitSmarty->assign('nl_info', $conf); } + $mid = 'bitpackage:newsletters/user_subscriptions.tpl'; } if( !$gBitUser->isRegistered() && !$gBitUser->hasPermission( 'bit_p_subscribe_newsletters' ) && empty( $_REQUEST["confirm_subscription"] ) ) { -- cgit v1.3