diff options
| author | Christian Fowler <spider@viovio.com> | 2005-12-09 19:15:50 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2005-12-09 19:15:50 +0000 |
| commit | 77fd3245140b4c1e4a1c5f440e0a3d67470d6562 (patch) | |
| tree | 48580c9d6e34d0eb5164802e4a64d6cd1e31a5a2 /admin/index.php | |
| parent | c8d7e3f652165e9a44d455954218a4546a880f1f (diff) | |
| download | newsletters-77fd3245140b4c1e4a1c5f440e0a3d67470d6562.tar.gz newsletters-77fd3245140b4c1e4a1c5f440e0a3d67470d6562.tar.bz2 newsletters-77fd3245140b4c1e4a1c5f440e0a3d67470d6562.zip | |
get expunge working for BitNewsletter, even with confirmDialog\! small tweak to admin_newsletter.tpl remove GET params
Diffstat (limited to 'admin/index.php')
| -rw-r--r-- | admin/index.php | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/admin/index.php b/admin/index.php index 45508fa..b4369ab 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/Attic/index.php,v 1.4 2005/12/09 18:51:22 spiderr Exp $ +// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/Attic/index.php,v 1.5 2005/12/09 19:15:50 spiderr Exp $ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -14,29 +14,30 @@ $gBitSystem->verifyPermission( 'tiki_p_admin_newsletters' ); require_once( NEWSLETTERS_PKG_PATH.'lookup_newsletter_inc.php' ); -if (isset($_REQUEST["remove"])) { - $nllib->remove_newsletter($_REQUEST["remove"]); +if( isset( $_REQUEST["remove"] ) && $gContent->isValid() ) { + if( !empty( $_REQUEST['cancel'] ) ) { + // user cancelled - just continue on, doing nothing + } elseif( empty( $_REQUEST['confirm'] ) ) { + $formHash['remove'] = TRUE; + $formHash['nl_id'] = $gContent->mNlId; + $gBitSystem->confirmDialog( $formHash, array( 'warning' => 'Are you sure you want to delete the newsletter '.$gContent->getTitle().'?' ) ); + } else { + if( $gContent->expunge() ) { + header( "Location: ".NEWSLETTERS_PKG_URL.'admin/' ); + die; + } + } +} elseif (isset($_REQUEST["save"])) { + $sid = $gContent->store( $_REQUEST ); + header( "Location: ".$_SERVER['PHP_SELF'] ); + die; } -if (isset($_REQUEST["save"])) { - $sid = $gContent->store( $_REQUEST ); - /* - $cat_type='newsletter'; - $cat_objid = $sid; - $cat_desc = substr($_REQUEST["description"],0,200); - $cat_name = $_REQUEST["name"]; - $cat_href= NEWSLETTERS_PKG_URL."newsletters.php?nl_id=".$cat_objid; - include_once( CATEGORIES_PKG_PATH.'categorize_inc.php' ); - */ - $info["name"] = ''; - $info["description"] = ''; - $info["allow_user_sub"] = 'y'; - $info["allow_any_sub"] = 'n'; - $info["unsub_msg"] = 'y'; - $info["validate_addr"] = 'y'; - //$info["frequency"] = 7 * 24 * 60 * 60; - $gBitSmarty->assign('nl_id', 0); - $gBitSmarty->assign('info', $info); +$gContent->invokeServices( 'content_edit_function' ); + +// Configure quicktags list +if ($gBitSystem->isPackageActive( 'quicktags' ) ) { + include_once( QUICKTAGS_PKG_PATH.'quicktags_inc.php' ); } $newsletters = $gContent->getList( $listHash ); |
