From 461c37c4a8dc70cc6e3a9cb82fb670e2da270b20 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Aug 2020 01:28:40 +0200 Subject: [PATCH] Clean code --- htdocs/admin/emailcollector_card.php | 2 +- htdocs/admin/emailcollector_list.php | 8 +------- htdocs/core/modules/modEmailCollector.class.php | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index c3b71a90afe..a5e557ddfeb 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -313,7 +313,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $object->fetchActions(); $head = emailcollectorPrepareHead($object); - dol_fiche_head($head, 'card', $langs->trans("EmailCollector"), -1, 'emailcollector'); + dol_fiche_head($head, 'card', $langs->trans("EmailCollector"), -1, 'email'); $formconfirm = ''; diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 451b92c599f..a9db23a062a 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -324,7 +324,7 @@ $newcardbutton = ''; $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF'])); //} -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton.' '.$linkback, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'email', 0, $newcardbutton.' '.$linkback, '', $limit); // Add code for pre mass action (confirmation or email presend form) /*$topicmail=""; @@ -333,12 +333,6 @@ $objecttmp=new EmailCollector($db); $trackid='xxxx'.$object->id;*/ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); - print '
'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
'; -} - $moreforfilter = ''; /*$moreforfilter.='
'; $moreforfilter.= $langs->trans('MyFilter') . ': '; diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index 846adc38b57..59320a959f9 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -334,7 +334,7 @@ class modEmailCollector extends DolibarrModules $descriptionB1 = 'This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.'; $sqlforexampleB1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleB1 .= " VALUES (".$conf->entity.", 'Collect_Responses_In', 'Example to collect any email responses', '".$this->db->escape($descriptionB1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleB1 .= " VALUES (".$conf->entity.", 'Collect_Responses_In', 'Example to collect any input email responses', '".$this->db->escape($descriptionB1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleB2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleB2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Responses_In' and entity = ".$conf->entity."), 'isanswer', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleB3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectoraction (fk_emailcollector, type, date_creation, fk_user_creat, status)";