summaryrefslogtreecommitdiff
path: root/edition_edit.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-12-10 22:39:53 +0000
committerChristian Fowler <spider@viovio.com>2005-12-10 22:39:53 +0000
commit33f69c13d225e4e689c73076c118604005a9498a (patch)
tree50e06129b067d2a9a9a9f7d151905e4a04a3fea5 /edition_edit.php
parent34a8fac038f903976d5696a1e2cdaad2100232ca (diff)
downloadnewsletters-33f69c13d225e4e689c73076c118604005a9498a.tar.gz
newsletters-33f69c13d225e4e689c73076c118604005a9498a.tar.bz2
newsletters-33f69c13d225e4e689c73076c118604005a9498a.zip
edition store now working
Diffstat (limited to 'edition_edit.php')
-rw-r--r--edition_edit.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/edition_edit.php b/edition_edit.php
index b7360ca..aa8ea17 100644
--- a/edition_edit.php
+++ b/edition_edit.php
@@ -33,15 +33,12 @@ if (isset($_REQUEST["preview"])) {
$info["subject"] = $_REQUEST['title'];
$gBitSmarty->assign('info', $info);
} elseif (isset($_REQUEST["save"])) {
- // Now send the newsletter to all the email addresses and save it in sent_newsletters
- $gBitSmarty->assign('presend', 'y');
-
- $subscribers = $nllib->get_subscribers($_REQUEST["nl_id"]);
- $gBitSmarty->assign('nl_id', $_REQUEST["nl_id"]);
- $gBitSmarty->assign('edit', $_REQUEST['edit']);
- $gBitSmarty->assign('subject', $_REQUEST['title']);
- $cant = count($subscribers);
- $gBitSmarty->assign('subscribers', $cant);
+ if( $gContent->store( $_REQUEST ) ) {
+vd( $gContent->mErrors );
+ $gBitSmarty->assign( 'success', tra( 'Newsletter edition saved' ) );
+ } else {
+ $gBitSmarty->assign( 'errors', $gContent->mErrors );
+ }
}
// Display the template