enum au lieu de varchar
This commit is contained in:
parent
bbfa9f3434
commit
85d4bc5723
|
@ -275,7 +275,7 @@ class m_mail {
|
||||||
$err->raise("mail",_("The email %s is special, it can't be deleted"),$mail);
|
$err->raise("mail",_("The email %s is special, it can't be deleted"),$mail);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($db->f("mailbox_action")!="" || $db->f("mail_action")!="") { // will be deleted soon ...
|
if ($db->f("mailbox_action")!="OK" || $db->f("mail_action")!="OK") { // will be deleted soon ...
|
||||||
$err->raise("mail",_("The email %s is already marked for deletion, it can't be deleted"),$mail);
|
$err->raise("mail",_("The email %s is already marked for deletion, it can't be deleted"),$mail);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -338,8 +338,8 @@ class m_mail {
|
||||||
|
|
||||||
if ($db->f("islocal")) {
|
if ($db->f("islocal")) {
|
||||||
// If it's a pop/imap mailbox, mark it for deletion
|
// If it's a pop/imap mailbox, mark it for deletion
|
||||||
$db->query("UPDATE address SET mail_action='', `enabled`=1 WHERE id='$mail_id';");
|
$db->query("UPDATE address SET mail_action='OK', `enabled`=1 WHERE id='$mail_id';");
|
||||||
$db->query("UPDATE mailbox SET mail_action='' WHERE address_id='$mail_id';");
|
$db->query("UPDATE mailbox SET mail_action='OK' WHERE address_id='$mail_id';");
|
||||||
$err->raise("mail",_("The email %s has been undeleted"),$mail);
|
$err->raise("mail",_("The email %s has been undeleted"),$mail);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -246,7 +246,7 @@ CREATE TABLE IF NOT EXISTS `address` (
|
||||||
`enabled` int(1) unsigned NOT NULL DEFAULT '1', -- Enabled flag.
|
`enabled` int(1) unsigned NOT NULL DEFAULT '1', -- Enabled flag.
|
||||||
`expire_date` datetime DEFAULT NULL, -- Expiration date, used for temporary addresses.
|
`expire_date` datetime DEFAULT NULL, -- Expiration date, used for temporary addresses.
|
||||||
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
||||||
`mail_action` varchar(8) NOT NULL, -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
`mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`)
|
UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`)
|
||||||
) COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
) COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
||||||
|
@ -266,7 +266,7 @@ CREATE TABLE IF NOT EXISTS `mailbox` (
|
||||||
`bytes` bigint(20) NOT NULL DEFAULT '0', -- number of bytes in the mailbox, filled by dovecot
|
`bytes` bigint(20) NOT NULL DEFAULT '0', -- number of bytes in the mailbox, filled by dovecot
|
||||||
`messages` int(11) NOT NULL DEFAULT '0', -- number of messages in the mailbox, filled by dovecot
|
`messages` int(11) NOT NULL DEFAULT '0', -- number of messages in the mailbox, filled by dovecot
|
||||||
`lastlogin` datetime NOT NULL, -- Last login, filled by dovecot
|
`lastlogin` datetime NOT NULL, -- Last login, filled by dovecot
|
||||||
`mail_action` varchar(8) NOT NULL, -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
`mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `address_id` (`address_id`)
|
UNIQUE KEY `address_id` (`address_id`)
|
||||||
) COMMENT = 'Table containing local deliverd mailboxes.';
|
) COMMENT = 'Table containing local deliverd mailboxes.';
|
||||||
|
|
|
@ -91,7 +91,7 @@ CREATE TABLE IF NOT EXISTS `address` (
|
||||||
`enabled` int(1) unsigned NOT NULL DEFAULT '1', -- Enabled flag.
|
`enabled` int(1) unsigned NOT NULL DEFAULT '1', -- Enabled flag.
|
||||||
`expire_date` datetime DEFAULT NULL, -- Expiration date, used for temporary addresses.
|
`expire_date` datetime DEFAULT NULL, -- Expiration date, used for temporary addresses.
|
||||||
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
||||||
`mail_action` varchar(8) NOT NULL, -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
`mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`)
|
UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`)
|
||||||
) COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
) COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
||||||
|
@ -111,7 +111,7 @@ CREATE TABLE IF NOT EXISTS `mailbox` (
|
||||||
`bytes` bigint(20) NOT NULL DEFAULT '0', -- number of bytes in the mailbox, filled by dovecot
|
`bytes` bigint(20) NOT NULL DEFAULT '0', -- number of bytes in the mailbox, filled by dovecot
|
||||||
`messages` int(11) NOT NULL DEFAULT '0', -- number of messages in the mailbox, filled by dovecot
|
`messages` int(11) NOT NULL DEFAULT '0', -- number of messages in the mailbox, filled by dovecot
|
||||||
`lastlogin` datetime NOT NULL, -- Last login, filled by dovecot
|
`lastlogin` datetime NOT NULL, -- Last login, filled by dovecot
|
||||||
`mail_action` varchar(8) NOT NULL, -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
`mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `address_id` (`address_id`)
|
UNIQUE KEY `address_id` (`address_id`)
|
||||||
) COMMENT = 'Table containing local deliverd mailboxes.';
|
) COMMENT = 'Table containing local deliverd mailboxes.';
|
||||||
|
|
Loading…
Reference in New Issue