diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index f8309cf6ce5..23ac96ea263 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -41,7 +41,7 @@ if (empty($user->rights->accounting->chartofaccount)) accessforbidden(); } -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); aZ09 // Parameters ACCOUNTING_EXPORT_* $main_option = array ( diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 16ee0883676..c5726901e2e 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -40,7 +40,7 @@ $langs->loadLangs(array("accountancy")); $page = GETPOST("page"); $sortorder = GETPOST("sortorder"); $sortfield = GETPOST("sortfield"); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); $search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index f56e02f601c..677bc627c80 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langs->loadLangs(array("bills","accountancy")); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index da73db896fe..b245e2539a7 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langs->loadLangs(array("bills","accountancy","trips")); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 4b3122a04c6..439b8625342 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langs->loadLangs(array("bills","accountancy")); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index cd3234643fa..0ec1968ab34 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -39,7 +39,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='adherent'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index 0ab0f55a82e..3a5226d00f4 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -42,7 +42,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index c6e2d282e25..91df8e59ea5 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin","members")); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 5c573be7fe9..887fba847e4 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='actioncomm'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 3f9d2080d9c..497d4748da8 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("admin","companies","bills","other","banks")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index 906111e5f9e..3b95c158f27 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='bank_account'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 330c3c00f6a..e882a56e2b8 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -32,7 +32,7 @@ if (!$user->admin) accessforbidden(); // Parameters -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $arrayofparameters=array( diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index db85f2f35eb..611f7578193 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -77,8 +77,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu /* * Actions - * - * Put here all code to do according to value of "action" parameter */ $parameters = array(); @@ -105,11 +103,29 @@ if (empty($reshook)) } +if ($action == 'confirm_collect') +{ + dol_include_once('/emailcollector/class/emailcollector.class.php'); + + $res = $object->doCollect(); + + if ($res == 0) + { + setEventMessages($object->output, null, 'mesgs'); + } + else + { + setEventMessages($object->error, null, 'errors'); + } + + $action = ''; +} + + + /* * View - * - * Put here all code to build page */ $form = new Form($db); @@ -302,26 +318,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; - - if ($action == 'confirm_collect') - { - print_fiche_titre($langs->trans('MessagesFetchingResults'), '', ''); - - dol_include_once('/emailcollector/class/emailcollector.class.php'); - $emailcollector = new EmailCollector($object); - - $res = $emailcollector->doCollect(); - if (is_array($res)) { - if (count($res['actions_done']) > 0) { - setEventMessages($langs->trans('XActionsDone', count($res['actions_done'])), null, 'info'); - } else { - setEventMessages($langs->trans('NoActionsdone'), null, 'info'); - } - } else { - setEventMessages($langs->trans('NoEmailsToProcess'), null, 'info'); - } - $action = ''; - } print ''; print ''; diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 8e2782e2e14..b7c8ddffa71 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -47,7 +47,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='expedition'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 3480c537c44..cc5a9bddfa5 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -48,7 +48,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='expeditiondet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index ad3dc4732a2..3fedf935405 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -44,7 +44,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='expensereport'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/livraison_extrafields.php index 2fced5d7a42..55fe6f10362 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/livraison_extrafields.php @@ -47,7 +47,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='livraison'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/livraisondet_extrafields.php index 3788730579f..e70b4f2d09b 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/livraisondet_extrafields.php @@ -48,7 +48,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='livraisondet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index a4677e46702..419f6efbee9 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'loan')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); // Other parameters LOAN_* $list = array ( diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 08d1b110233..9843c6a4fb0 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -38,7 +38,7 @@ if (! $user->admin) { } // Parameters -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); /* diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 2405f662de6..16827306bda 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -40,7 +40,7 @@ $langs->loadLangs(array('admin', 'oauth')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); /* diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 6c4745baa69..828bb13384f 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='commande'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index b7954931968..929e49c4ab3 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -46,7 +46,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='commandedet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 781af5679d3..566e57e587b 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("admin","resource")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); /* diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index ef6eb54c0c1..b8ea860ac25 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -44,7 +44,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='resource'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index 7bc037e6bba..a68a4bda5a6 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'salaries')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); // Other parameters SALARIES_* $list = array ( diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 426429b9071..3db96ddd8a4 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -42,7 +42,7 @@ accessforbidden(); $type=GETPOST('type', 'alpha'); $value=GETPOST('value', 'alpha'); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $scandir = GETPOST('scan_dir','alpha'); $specimenthirdparty=new Societe($db); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 5b5c070964e..72050867dfa 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -43,7 +43,7 @@ accessforbidden(); $type=GETPOST('type', 'alpha'); $value=GETPOST('value', 'alpha'); $label = GETPOST('label','alpha'); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $scandir = GETPOST('scan_dir','alpha'); $specimenthirdparty=new Societe($db); diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 0a6f43a66d7..bbda698a778 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='facture_fourn'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index 94855870c24..cdf128871fd 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -47,7 +47,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='facture_fourn_det'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 8922d380169..640b6375c57 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='commande_fournisseur'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 9b6c993e3cb..65fe0537ba7 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -46,7 +46,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='commande_fournisseurdet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 478f1082a96..5cf72b302c9 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -37,7 +37,7 @@ if (!$user->admin) { // Parameters $value = GETPOST('value', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); $type = 'ticket'; diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php index cebc505b51d..6fa70808ec8 100644 --- a/htdocs/admin/ticket_extrafields.php +++ b/htdocs/admin/ticket_extrafields.php @@ -39,7 +39,7 @@ foreach ($tmptype2label as $key => $val) { $type2label[$key] = $langs->trans($val); } -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'ticket'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index e6bde52379b..9afe7c5fcb3 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; if (! $user->admin) accessforbidden(); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm','alpha'); // Security check diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 79e6bc1abba..8ddc1d65525 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -31,7 +31,7 @@ $langs->loadLangs(array("companies","install","users","other")); if (! $user->admin) accessforbidden(); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); // Security check diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 760ccc8a5c3..24a39ce827a 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("admin","workflow","propal","workflow","orders","supplie if (! $user->admin) accessforbidden(); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); /* * Actions diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index ea8f015184c..f220d5cb849 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -37,7 +37,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='don'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index 56ce8e81102..a791078f37b 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -36,7 +36,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index dc6e03fe267..57738309abd 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("admin", "assets")); if (! $user->admin) accessforbidden(); // Parameters -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $arrayofparameters=array('FIXEDASSETS_MYPARAM1'=>array('css'=>'minwidth200'), 'FIXEDASSETS_MYPARAM2'=>array('css'=>'minwidth500')); diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 624543a0660..4f7061aed20 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -34,7 +34,7 @@ $langs->loadLangs(array("asset")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index a4595f266fe..f76c6ea028f 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("asset","companies")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index a0bd11eb807..abea3f41eeb 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -39,7 +39,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='categorie'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index d6879c7a3d9..a5998e220f7 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -40,7 +40,7 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/cla $langs->loadLangs(array('companies', 'commercial', 'other', 'bills')); $id = GETPOST('id', 'int'); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index 714a330ce05..becfabc949c 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -39,7 +39,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='propal'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index f7508005f59..7172c0e5b7c 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -46,7 +46,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='propaldet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 7467985d34a..cb384408e91 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -40,7 +40,7 @@ if (! $user->rights->societe->lire) accessforbidden(); // Load translation files required by the page $langs->loadLangs(array("commercial", "propal")); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $bid=GETPOST('bid', 'int'); // Securite acces client diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index fe6946fc111..f07a5cdfac8 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -68,7 +68,7 @@ $error = 0; $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $origin = GETPOST('origin', 'alpha'); $originid = GETPOST('originid', 'int'); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 17cbe9d670f..f468bd4b146 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -66,7 +66,7 @@ if (! empty($conf->productbatch->enabled)) $langs->load("productbatch"); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int')); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $lineid = GETPOST('lineid', 'int'); diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 4f73a9972a4..f908b68b35c 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('banks', 'companies', 'other')); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $mesg = ''; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 5dad19a9b45..3f1bede8e20 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; // Load translation files required by the page $langs->loadLangs(array("banks","categories","companies","bills","trips")); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $id=GETPOST('account','int'); $ref=GETPOST('ref','alpha'); $dvid=GETPOST('dvid','alpha'); diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index bfa0eb71615..0f417777417 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -41,7 +41,7 @@ $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); // Get parameters $id = GETPOST('id', 'int'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index b284d5a906b..1fe26e82a54 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -40,7 +40,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='facture'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index 1b9da2c5536..23c0d79a33c 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='facture_rec'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index bbd79ad6153..0947f788719 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='facturedet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index 049b44f6b10..46d9ed28335 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='facturedet_rec'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 6bbaf318de8..7366a091056 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -75,7 +75,7 @@ $projectid = (GETPOST('projectid','int') ? GETPOST('projectid', 'int') : 0); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $lineid = GETPOST('lineid', 'int'); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 45a0b452dd9..692849d2fa6 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -50,7 +50,7 @@ $langs->loadLangs(array('compta', 'bills')); if (! empty($conf->commande->enabled)) $langs->load("orders"); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $bid=GETPOST('bid', 'int'); // Security check diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 10276132e69..9f42ef9b16c 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -38,7 +38,7 @@ $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'compta')); $id =GETPOST('id','int'); $ref=GETPOST('ref', 'alpha'); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); // Security check diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index bc36a5bd163..38cee6b8434 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("bills"); $chid=GETPOST("id", 'int'); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $amounts = array(); // Security check diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index b3ddec32c43..d19c91e0bf2 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -42,7 +42,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='contrat'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index fadfdfb72a6..af2585eaf3a 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -42,7 +42,7 @@ $tmptype2label=ExtraFields::$type2label; $type2label=array(''); foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $attrname=GETPOST('attrname', 'alpha'); $elementtype='contratdet'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/core/ajax/selectobject.php b/htdocs/core/ajax/selectobject.php index 23baabe4bed..0c52c490512 100644 --- a/htdocs/core/ajax/selectobject.php +++ b/htdocs/core/ajax/selectobject.php @@ -33,7 +33,7 @@ $objectdesc=GETPOST('objectdesc', 'alpha'); $htmlname=GETPOST('htmlname', 'aZ09'); $sqlfilter=GETPOST('sqlfilter', 'alpha'); $outjson=(GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0); -$action=GETPOST('action', 'aZ09'); +$action=GETPOST('action', 'alpha'); $id=GETPOST('id', 'int'); diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 79d633027e0..2a38ff80b6e 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -577,7 +577,11 @@ class Translate //$newstr=$this->getLabelFromKey($db,$reg[1],'c_ordersource','code','label'); } - if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) dol_syslog(__METHOD__." MAIN_FEATURES_LEVEL=DEVELOP: missing translation for key '".$newstr."' in ".$_SERVER["PHP_SELF"], LOG_DEBUG); + /* Disabled. There is too many cases where translation of $newstr is not defined is normal (like when output with setEventMessage an already translated string) + if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) + { + dol_syslog(__METHOD__." MAIN_FEATURES_LEVEL=DEVELOP: missing translation for key '".$newstr."' in ".$_SERVER["PHP_SELF"], LOG_DEBUG); + }*/ return $newstr; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 27af555c3d2..75cc6735fe4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1038,6 +1038,8 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' } if ($level > $conf->global->SYSLOG_LEVEL) return; + $message = preg_replace('/password=\'[^\']*\'/', 'password=\'hidden\'', $message); // protection to avoid to have value of password in log + // If adding log inside HTML page is required if (! empty($_REQUEST['logtohtml']) && (! empty($conf->global->MAIN_ENABLE_LOG_TO_HTML) || ! empty($conf->global->MAIN_LOGTOHTML))) // MAIN_LOGTOHTML kept for backward compatibility { @@ -1045,7 +1047,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' } //TODO: Remove this. MAIN_ENABLE_LOG_INLINE_HTML should be deprecated and use a log handler dedicated to HTML output - // If enable html log tag enabled and url parameter log defined, we show output log on HTML comments + // If html log tag enabled and url parameter log defined, we show output log on HTML comments if (! empty($conf->global->MAIN_ENABLE_LOG_INLINE_HTML) && ! empty($_GET["log"])) { print "\n\n