-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collector : can now specify where the requester's email is found #4554
Collector : can now specify where the requester's email is found #4554
Conversation
'from' : current behavior 'reply-to' : use the email found in the 'reply-to' header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As seen together, the field is poorly named
Suggestion: requester_field
Same for the label. |
install/mysql/glpi-empty.sql
Outdated
@@ -4292,6 +4292,7 @@ CREATE TABLE `glpi_mailcollectors` ( | |||
`errors` int(11) NOT NULL DEFAULT '0', | |||
`use_mail_date` tinyint(1) NOT NULL DEFAULT '0', | |||
`date_creation` datetime DEFAULT NULL, | |||
`caller_location` enum('from', 'reply-to') NOT NULL DEFAULT 'from', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use enum, two possibility:
- integer with const in MailCollector class for values (prefered method)
- direct varchar
BTW, functional tests : OK |
install/update_93_94.php
Outdated
@@ -61,6 +61,12 @@ function update93to94() { | |||
} | |||
/** /Add default group for a user */ | |||
|
|||
/** Add caller location on glpi_mailcollectors */ | |||
if (!$DB->fieldExists('glpi_mailcollectors', 'requester_field')) { | |||
$migration->addField("glpi_mailcollectors", "requester_field", "int(11) NOT NULL DEFAULT '0'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use "integer" automatic type instead of full declaration
'from' : current behavior
'reply-to' : use the email found in the 'reply-to' header