Fix test filter rule
This commit is contained in:
parent
887408926d
commit
7f33d66d5c
@ -146,6 +146,7 @@ if (GETPOST('addfilter', 'alpha')) {
|
||||
$emailcollectorfilter->rulevalue = GETPOST('rulevalue', 'alpha');
|
||||
$emailcollectorfilter->fk_emailcollector = $object->id;
|
||||
$emailcollectorfilter->status = 1;
|
||||
|
||||
$result = $emailcollectorfilter->create($user);
|
||||
|
||||
if ($result > 0) {
|
||||
|
||||
@ -158,6 +158,7 @@ class EmailCollectorFilter extends CommonObject
|
||||
public function create(User $user, $notrigger = false)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (empty($this->type)) {
|
||||
$langs->load("errors");
|
||||
$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type"));
|
||||
@ -169,6 +170,12 @@ class EmailCollectorFilter extends CommonObject
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (in_array($this->type, array('to')) && strpos($this->rulevalue, '+') != false) {
|
||||
$langs->load("errors");
|
||||
$this->errors[] = $langs->trans("ErrorCharPlusNotSupportedByImapForSearch");
|
||||
return -3;
|
||||
}
|
||||
|
||||
return $this->createCommon($user, $notrigger);
|
||||
}
|
||||
|
||||
|
||||
@ -294,6 +294,7 @@ ErrorQuantityIsLimitedTo=Quantity is limited to %s
|
||||
ErrorFailedToLoadThirdParty=Failed to find/load thirdparty from id=%s, email=%s, name=%s
|
||||
ErrorThisPaymentModeIsNotSepa=This payment mode is not a bank account
|
||||
ErrorStripeCustomerNotFoundCreateFirst=Stripe customer is not set for this thirdparty (or set to a value deleted on Stripe side). Create (or re-attach) it first.
|
||||
ErrorCharPlusNotSupportedByImapForSearch=IMAP search is not able to search into sender or recipient for a string containing the character +
|
||||
|
||||
# Warnings
|
||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user