summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2007-05-04 16:40:20 +0000
committerChristian Fowler <spider@viovio.com>2007-05-04 16:40:20 +0000
commit6f08113c0bd6d49d8417e214031c839aedfc2ca0 (patch)
treead6854aaf41040952b0a0fc3225c2bee872be786 /admin
parent6706642dae930d27f2efb7b99a20d9550a8f4c9d (diff)
downloadnewsletters-6f08113c0bd6d49d8417e214031c839aedfc2ca0.tar.gz
newsletters-6f08113c0bd6d49d8417e214031c839aedfc2ca0.tar.bz2
newsletters-6f08113c0bd6d49d8417e214031c839aedfc2ca0.zip
add test_mode to enable resending message, hide validated only option for now
Diffstat (limited to 'admin')
-rw-r--r--admin/send.php10
-rw-r--r--admin/tend_mail_queue.php12
2 files changed, 7 insertions, 15 deletions
diff --git a/admin/send.php b/admin/send.php
index f1a1232..8156b0f 100644
--- a/admin/send.php
+++ b/admin/send.php
@@ -1,6 +1,6 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/send.php,v 1.15 2007/04/25 20:59:12 spiderr Exp $
+// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/send.php,v 1.16 2007/05/04 16:40:20 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.
@@ -29,18 +29,18 @@ if( @BitBase::verifyId( $_REQUEST["edition_id"] ) ) {
$gBitSmarty->assign('preview', 'n');
$gBitSmarty->assign('presend', 'n');
$gBitSmarty->assign('emited', 'n');
-$validated = (isset($_REQUEST["validated"]) && !empty($_REQUEST["validated"])) ? TRUE : FALSE;
+$validated = !empty( $_REQUEST["validated"] ) ? TRUE : FALSE;
if( $gContent->isValid() && isset( $_REQUEST['preview'] ) && isset( $_REQUEST['send_group'] ) ) {
- $recipients = $gContent->getRecipients( $_REQUEST['send_group'], $validated );
+ $recipients = $gContent->getRecipients( $_REQUEST['send_group'], $validated, !empty( $_REQUEST['test_mode'] ) );
$gBitSmarty->assign_by_ref( 'recipientList', $recipients );
$gBitSmarty->assign( 'validated', $validated );
$gBitSmarty->assign( 'sending', TRUE );
} elseif( $gContent->isValid() && isset( $_REQUEST["send"] ) ) {
- if( $emails = $gContent->getRecipients( $_REQUEST['send_group'], $validated ) ) {
+ if( $emails = $gContent->getRecipients( $_REQUEST['send_group'], $validated, !empty( $_REQUEST['test_mode'] ) ) ) {
global $gBitMailer;
$gBitMailer = new BitMailer();
- $gBitMailer->queueRecipients( $gContent->mContentId, $gContent->mNewsletter->mContentId, $emails );
+ $gBitMailer->queueRecipients( $gContent->mContentId, $gContent->mNewsletter->mContentId, $emails, !empty( $_REQUEST['test_mode'] ) );
$feedback['success'] = count( $emails ).' '.tra( 'emails were queued to be sent:' ).' '.$gContent->getTitle();
$gContent->mEditionId = NULL;
} else {
diff --git a/admin/tend_mail_queue.php b/admin/tend_mail_queue.php
index 14f815b..61c7a0a 100644
--- a/admin/tend_mail_queue.php
+++ b/admin/tend_mail_queue.php
@@ -1,13 +1,6 @@
<?php
-
- global $gBitSystem, $_SERVER;
-
- $_SERVER['SCRIPT_URL'] = '';
- $_SERVER['HTTP_HOST'] = '';
- $_SERVER['HTTP_USER_AGENT'] = '';
- $_SERVER['SERVER_NAME'] = '';
- $_SERVER['SERVER_ADMIN'] = '';
- $_SERVER['SERVER_SOFTWARE'] = 'command line';
+ global $gShellScript;
+ $gShellScript = TRUE;
$_REQUEST['uri_mode'] = TRUE;
/**
@@ -24,7 +17,6 @@
require_once( NEWSLETTERS_PKG_PATH.'BitMailer.php' );
global $gBitMailer;
$gBitMailer = new BitMailer();
-
$gBitMailer->tendQueue();
}