Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

@@ -177,10 +177,13 @@ class _bulkmail extends \IPS\Dispatcher\Controller
{
\IPS\Output::i()->error( 'couldnt_find_bulkmail', '2C125/7', 404, '' );
}
/* Unclaim attachments */
\IPS\File::unclaimAttachments( 'core_Admin', $mail->id, NULL, 'bulkmail' );
/* Delete the bulk mail */
$mail->delete();
/* Log and redirect */
\IPS\Session::i()->log( 'acplog__bulkmail_deleted', array( $mail->subject => FALSE ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=bulkmail&controller=bulkmail' ), 'deleted' );
@@ -459,13 +462,14 @@ class _bulkmail extends \IPS\Dispatcher\Controller
/* Get tags */
$tags = \IPS\core\BulkMail\Bulkmailer::getTags();
$autoSaveKey = 'bulkmail' . ( $mail->id ? '-' . $mail->id : '' );
/* Start the form */
$form = new \IPS\Helpers\Form;
$form->class = '';
$form->addTab( 'bulkmail__main', NULL, NULL, 'ipsForm_vertical' );
$form->add( new \IPS\Helpers\Form\Text( 'mail_subject', $mail->subject, TRUE ) );
$form->add( new \IPS\Helpers\Form\Editor( 'mail_body', $mail->content ?: '', TRUE, array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'bulkmail' . ( $mail->id ? '-' . $mail->id : '' ), 'tags' => $tags, 'attachIds' => array( $mail->id, NULL, 'bulkmail' ) ) ) );
$form->add( new \IPS\Helpers\Form\Editor( 'mail_body', $mail->content ?: '', TRUE, array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => $autoSaveKey, 'tags' => $tags, 'attachIds' => $mail->id ? array( $mail->id, NULL, 'bulkmail' ) : NULL ) ) );
/* Add the filters tab and the "generic filters" header */
$form->addTab( 'bulkmail__filters', NULL, NULL, 'ipsForm_horizontal' );
@@ -538,6 +542,9 @@ class _bulkmail extends \IPS\Dispatcher\Controller
\IPS\Session::i()->log( 'acplogs__bulkmail_added', array( $mail->subject => FALSE ) );
}
/* Claim attachments */
\IPS\File::claimAttachments( $autoSaveKey, $mail->id, NULL, 'bulkmail' );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=bulkmail&controller=bulkmail&do=preview&id=' . $mail->id ), 'saved' );
}