mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-03-30 11:00:23 +02:00
Fix minori
This commit is contained in:
parent
ebea9ea807
commit
cba7db802d
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Notifications\EmailNotification;
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
switch (post('op')) {
|
||||
@ -74,7 +76,7 @@ switch (post('op')) {
|
||||
break;
|
||||
|
||||
case 'test':
|
||||
$mail = new Mail($id_record);
|
||||
$mail = new EmailNotification($id_record);
|
||||
|
||||
echo json_encode([
|
||||
'test' => $mail->testSMTP(),
|
||||
|
@ -165,6 +165,22 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Testa la connessione al server SMTP.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function testSMTP()
|
||||
{
|
||||
if ($this->smtpConnect()) {
|
||||
$this->smtpClose();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restituisce gli allegati della notifica.
|
||||
*
|
||||
|
@ -326,11 +326,12 @@ ALTER TABLE `zz_emails` RENAME TO `em_templates`;
|
||||
ALTER TABLE `zz_smtps` RENAME TO `em_accounts`;
|
||||
ALTER TABLE `zz_email_print` RENAME TO `em_template_print`;
|
||||
|
||||
UPDATE zz_modules SET options = REPLACE(options, 'zz_emails', 'em_templates');
|
||||
UPDATE zz_modules SET options2 = REPLACE(options2, 'zz_emails', 'em_templates');
|
||||
UPDATE zz_modules SET options = REPLACE(options, 'zz_emails', 'em_templates'), options2 = REPLACE(options2, 'zz_emails', 'em_templates');
|
||||
UPDATE zz_modules SET options = REPLACE(options, 'zz_smtps', 'em_accounts'), options2 = REPLACE(options2, 'zz_smtps', 'em_accounts');
|
||||
UPDATE zz_views SET query = REPLACE(query, 'zz_emails', 'em_templates');
|
||||
UPDATE zz_views SET query = REPLACE(query, 'zz_smtps', 'em_accounts');
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `em_campaings` (
|
||||
CREATE TABLE IF NOT EXISTS `em_campaigns` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`id_account` int(11) NOT NULL,
|
||||
@ -359,14 +360,14 @@ CREATE TABLE IF NOT EXISTS `em_emails` (
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_account`) REFERENCES `em_accounts`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_template`) REFERENCES `em_templates`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_campaign`) REFERENCES `em_campaings`(`id`) ON DELETE CASCADE
|
||||
FOREIGN KEY (`id_campaign`) REFERENCES `em_campaigns`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `em_campaing_anagrafica` (
|
||||
CREATE TABLE IF NOT EXISTS `em_campaign_anagrafica` (
|
||||
`id_campaign` int(11) NOT NULL,
|
||||
`id_anagrafica` int(11) NOT NULL,
|
||||
`id_email` int(11),
|
||||
FOREIGN KEY (`id_campaign`) REFERENCES `em_campaings`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_campaign`) REFERENCES `em_campaigns`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_anagrafica`) REFERENCES `an_anagrafiche`(`idanagrafica`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_email`) REFERENCES `em_emails`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
@ -51,9 +51,9 @@ return [
|
||||
'em_template_print',
|
||||
'em_accounts',
|
||||
'em_templates',
|
||||
'em_campaings',
|
||||
'em_campaigns',
|
||||
'em_emails',
|
||||
'em_campaing_anagrafica',
|
||||
'em_campaign_anagrafica',
|
||||
'fe_causali_pagamento_ritenuta',
|
||||
'fe_modalita_pagamento',
|
||||
'fe_natura',
|
||||
|
Loading…
x
Reference in New Issue
Block a user