Fix phpcs

This commit is contained in:
Laurent Destailleur 2020-08-21 13:22:49 +02:00
parent b80ba1179f
commit 1b22de5652
3 changed files with 8 additions and 15 deletions

View File

@ -310,7 +310,6 @@ class modEmailCollector extends DolibarrModules
$tmpresql = $this->db->query($tmpsql);
if ($tmpresql) {
if ($this->db->num_rows($tmpresql) == 0) {
$descriptionA1 = 'This collector will scan your mailbox "Sent" directory to find emails that was sent as an answer of a Ticket (Module Ticket must be enabled) directly from your email browser instead of from Dolibarr. If such an email is found, the event of answer is recorded into Dolibarr.';
$sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)";

View File

@ -163,7 +163,7 @@ class doc_generic_stock_odt extends ModelePDFStock
//$texte.=$nbofiles?'</a>':'';
$texte .= '</b>';
}
if ($nbofiles)
{
$texte .= '<div id="div_'.get_class($this).'" class="hidden">';

View File

@ -1266,7 +1266,7 @@ class EmailCollector extends CommonObject
{
$arrayofreferences = preg_split('/\s+/', $headers['References']);
foreach($arrayofreferences as $reference) {
foreach ($arrayofreferences as $reference) {
//print "Process reference ".dol_escape_htmltag($reference)."<br>\n";
if (preg_match('/dolibarr-([a-z]+)([0-9]+)@'.preg_quote($host, '/').'/', $reference, $reg)) {
// This is a Dolibarr reference
@ -1943,20 +1943,14 @@ class EmailCollector extends CommonObject
{
$errorforactions++;
} else {
/*if (is_numeric($candidaturetocreate->ref) && $candidaturetocreate->ref <= 0)
// Create project
$result = $candidaturetocreate->create($user);
if ($result <= 0)
{
$errorforactions++;
$this->error = 'Failed to create cancidature: Can\'t get a valid value for the field ref with numbering template = '.$modele.', thirdparty id = '.$thirdpartystatic->id;
} else {*/
// Create project
$result = $candidaturetocreate->create($user);
if ($result <= 0)
{
$errorforactions++;
$this->error = 'Failed to create ticket: '.$langs->trans($candidaturetocreate->error);
$this->errors = $candidaturetocreate->errors;
}
//}
$this->error = 'Failed to create ticket: '.$langs->trans($candidaturetocreate->error);
$this->errors = $candidaturetocreate->errors;
}
}
}
// Create event specific on hook