|
@@ -1308,6 +1308,20 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|
if (isset($_data['tagged_mail_handler']) && $_data['tagged_mail_handler'] == "subject") {
|
|
if (isset($_data['tagged_mail_handler']) && $_data['tagged_mail_handler'] == "subject") {
|
|
try {
|
|
try {
|
|
$redis->hSet('RCPT_WANTS_SUBJECT_TAG', $username, 1);
|
|
$redis->hSet('RCPT_WANTS_SUBJECT_TAG', $username, 1);
|
|
|
|
+ $redis->hDel('RCPT_WANTS_SUBFOLDER_TAG', $username);
|
|
|
|
+ }
|
|
|
|
+ catch (RedisException $e) {
|
|
|
|
+ $_SESSION['return'] = array(
|
|
|
|
+ 'type' => 'danger',
|
|
|
|
+ 'msg' => 'Redis: '.$e
|
|
|
|
+ );
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else if (isset($_data['tagged_mail_handler']) && $_data['tagged_mail_handler'] == "subfolder") {
|
|
|
|
+ try {
|
|
|
|
+ $redis->hSet('RCPT_WANTS_SUBFOLDER_TAG', $username, 1);
|
|
|
|
+ $redis->hDel('RCPT_WANTS_SUBJECT_TAG', $username);
|
|
}
|
|
}
|
|
catch (RedisException $e) {
|
|
catch (RedisException $e) {
|
|
$_SESSION['return'] = array(
|
|
$_SESSION['return'] = array(
|
|
@@ -1320,6 +1334,7 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|
else {
|
|
else {
|
|
try {
|
|
try {
|
|
$redis->hDel('RCPT_WANTS_SUBJECT_TAG', $username);
|
|
$redis->hDel('RCPT_WANTS_SUBJECT_TAG', $username);
|
|
|
|
+ $redis->hDel('RCPT_WANTS_SUBFOLDER_TAG', $username);
|
|
}
|
|
}
|
|
catch (RedisException $e) {
|
|
catch (RedisException $e) {
|
|
$_SESSION['return'] = array(
|
|
$_SESSION['return'] = array(
|
|
@@ -2632,9 +2647,12 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|
if ($redis->hGet('RCPT_WANTS_SUBJECT_TAG', $_data)) {
|
|
if ($redis->hGet('RCPT_WANTS_SUBJECT_TAG', $_data)) {
|
|
return "subject";
|
|
return "subject";
|
|
}
|
|
}
|
|
- else {
|
|
|
|
|
|
+ elseif ($redis->hGet('RCPT_WANTS_SUBFOLDER_TAG', $_data)) {
|
|
return "subfolder";
|
|
return "subfolder";
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ return "none";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
catch (RedisException $e) {
|
|
catch (RedisException $e) {
|
|
$_SESSION['return'] = array(
|
|
$_SESSION['return'] = array(
|
|
@@ -3729,4 +3747,4 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|