Fix security on GETPOST('action'). Param must be sanitized.

This commit is contained in:
Laurent Destailleur 2018-11-05 20:29:07 +01:00
parent 763f3cd518
commit 4a25317f10
120 changed files with 325 additions and 149 deletions

View File

@ -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 (

View File

@ -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'));

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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

View File

@ -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

View File

@ -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();

View File

@ -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

View File

@ -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');

View File

@ -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

View File

@ -32,7 +32,7 @@ if (!$user->admin)
accessforbidden();
// Parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$arrayofparameters=array(

View File

@ -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 '</table>';
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 '</div>';
print '</div>';

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 (

View File

@ -38,7 +38,7 @@ if (! $user->admin) {
}
// Parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
/*

View File

@ -40,7 +40,7 @@ $langs->loadLangs(array('admin', 'oauth'));
if (!$user->admin)
accessforbidden();
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
/*

View File

@ -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

View File

@ -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

View File

@ -37,7 +37,7 @@ $langs->loadLangs(array("admin","resource"));
if (!$user->admin)
accessforbidden();
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
/*

View File

@ -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

View File

@ -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 (

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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';

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'));

View File

@ -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');

View File

@ -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');

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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');

View File

@ -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');

View File

@ -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 = '';

View File

@ -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');

View File

@ -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');

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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');

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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');

View File

@ -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;
}

View File

@ -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<!-- Log start\n";

View File

@ -35,7 +35,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtourl = GETPOST('backtourl', 'alpha');

View File

@ -35,7 +35,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtourl = GETPOST('backtourl', 'alpha');

View File

@ -35,7 +35,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtourl = GETPOST('backtourl', 'alpha');

View File

@ -37,7 +37,7 @@ $langs->load('datapolicy@datapolicy');
if (! $user->admin) accessforbidden();
// Parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$arrayofparameters=array(

View File

@ -29,7 +29,7 @@ $langs->loadLangs(array('admin', 'companies', 'members', 'datapolicy'));
// Parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$formadmin = new FormAdmin($db);

View File

@ -39,7 +39,7 @@ dol_include_once('/datapolicy/class/datapolicy.class.php');
$idc = GETPOST('c', 'int');
$ids = GETPOST('s', 'int');
$ida = GETPOST('a', 'int');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$lang = GETPOST('l', 'alpha');
$code = GETPOST('key', 'alpha');

View File

@ -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

View File

@ -83,7 +83,7 @@ class EmailCollector extends CommonObject
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'),
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
'user' => array('type'=>'varchar(128)', 'label'=>'User', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
'user' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>1, 'comment'=>"IMAP password"),
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox'),
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
@ -124,7 +124,6 @@ class EmailCollector extends CommonObject
*/
public $label;
public $amount;
/**
* @var int Status
@ -151,13 +150,13 @@ class EmailCollector extends CommonObject
public $user;
public $password;
public $source_directory;
public $filter;
public $actiontodo;
public $target_directory;
public $datelastresult;
public $lastresult;
// END MODULEBUILDER PROPERTIES
public $rules;
public $actions;
/**
@ -613,6 +612,58 @@ class EmailCollector extends CommonObject
$this->initAsSpecimenCommon();
}
/**
* Fetch rules
*
* @return int <0 if KO, >0 if OK
*/
public function fetch_rules()
{
$this->rules = array();
$sql='SELECT type, rulevalue FROM '.MAIN_DB_PREFIX.'emailcollector_emailcollectorfilter WHERE status = 1 AND fk_emailcollector = '.$this->id;
$resql = $this->db->query($sql);
if ($resql)
{
$num=$this->db->num_rows($resql);
$i = 0;
while($i < $num)
{
$obj=$this->db->fetch_object($resql);
$this->rules[]=array('type'=>$obj->type, 'rulevalue'=>$obj->rulevalue);
}
$this->db->free($resql);
}
return 1;
}
/**
* Fetch actions
*
* @return int <0 if KO, >0 if OK
*/
public function fetch_actions()
{
$this->actions = array();
$sql='SELECT type, actionparam FROM '.MAIN_DB_PREFIX.'emailcollector_emailcollectoraction WHERE status = 1 AND fk_emailcollector = '.$this->id;
$resql = $this->db->query($sql);
if ($resql)
{
$num=$this->db->num_rows($resql);
$i = 0;
while($i < $num)
{
$obj=$this->db->fetch_object($resql);
$this->rules[]=array('type'=>$obj->type, 'actionparam'=>$obj->actionparam);
}
$this->db->free($resql);
}
}
/**
* Action executed by scheduler
@ -623,10 +674,12 @@ class EmailCollector extends CommonObject
//public function doScheduledJob($param1, $param2, ...)
public function doCollect()
{
global $conf, $langs;
global $conf, $langs, $user;
//$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log';
dol_syslog("EmailCollector::doCollect start", LOG_DEBUG);
$error = 0;
$this->output = '';
$this->error='';
@ -635,11 +688,127 @@ class EmailCollector extends CommonObject
$now = dol_now();
$this->db->begin();
if (empty($this->host))
{
$this->error=$langs->trans('ErrorFieldRequired', 'EMailHost');
return -1;
}
if (empty($this->user))
{
$this->error=$langs->trans('ErrorFieldRequired', 'Login');
return -1;
}
if (empty($this->source_directory))
{
$this->error=$langs->trans('ErrorFieldRequired', 'MailboxSourceDirectory');
return -1;
}
if (! function_exists('imap_open'))
{
$this->error='IMAP function not enabled on your PHP';
return -2;
}
// ...
$this->fetch_rules();
$this->fetch_actions();
$this->db->commit();
$sourcedir = $this->source_directory;
$targetdir = ($this->target_directory ? $server.$this->target_directory : '');
// Connect to IMAP
$flags ='/service=imap'; // IMAP
$flags.='/ssl'; // '/tls'
$flags.='/novalidate-cert';
//$flags.='/readonly';
//$flags.='/debug';
$connectstring = '{'.$this->host.':993'.$flags.'}';
$connectstring.=imap_utf7_encode($sourcedir);
$connection = imap_open($connectstring, $this->user, $this->password);
if (! $connection)
{
$this->error = 'Failed to open IMAP connection '.$connectstring;
return -3;
}
//$search='ALL';
$search='UNDELETED';
foreach($this->rules as $key => $rulevalue)
{
if ($key == 'to') $search=($search?' ':'').'TO "'.str_replace('"', '', $rulevalue).'"';
if ($key == 'bcc') $search=($search?' ':'').'BCC';
if ($key == 'cc') $search=($search?' ':'').'CC';
if ($key == 'from') $search=($search?' ':'').'FROM "'.str_replace('"', '', $rulevalue).'"';
if ($key == 'subject') $search=($search?' ':'').'SUBJECT "'.str_replace('"', '', $rulevalue).'"';
if ($key == 'body') $search=($search?' ':'').'BODY "'.str_replace('"', '', $rulevalue).'"';
if ($key == 'seen') $search=($search?' ':'').'SEEN';
if ($key == 'unseen') $search=($search?' ':'').'UNSEEN';
}
if (empty($targetdir)) // Use last date as filter if there is no targetdir defined.
{
$fromdate=0;
if ($this->datelastresult) $fromdate = $this->datelastresult;
if ($fromdate > 0) $search.=($search?' ':'').'SINCE '.dol_print_date($fromdate - 1,'dayhourrfc');
}
dol_syslog("search string = ".$search);
$nbemailprocessed=0; $nbactiondone=0;
// Scan IMAP inbox
$arrayofemail= imap_search($connection, $search);
//var_dump($arrayofemail);
// Loop on each email found
if (! empty($arrayofemail) && count($arrayofemail) > 0)
{
foreach($arrayofemail as $imapemail)
{
$errorforactions = 0;
$this->db->begin();
// Record email
foreach($this->actions as $actionkey => $actionvalue)
{
if ($errorforactions) break;
// Make action
if (! $errorforactions)
{
$nbactiondone++;
}
}
// Move email
if (! $errorforactions && $targetdir)
{
//imap_mail_move($connection, $sourcedir, $targetdir);
}
$nbemailprocessed++;
$this->db->commit();
}
$this->output=$langs->trans('XEmailsDoneYActionsDone', $nbemailprocessed, $nbactiondone);
}
else
{
$this->output=$langs->trans('NoNewEmailToProcess');
}
//imap_expunge($connection);
imap_close($connection);
$this->datelastresult = $now;
$this->lastresult = $this->output;
$this->update($user);
dol_syslog("EmailCollector::doCollect end", LOG_DEBUG);
return $error;
}

View File

@ -124,7 +124,7 @@ $entitytolang = array(
$array_selected=isset($_SESSION["export_selected_fields"])?$_SESSION["export_selected_fields"]:array();
$array_filtervalue=isset($_SESSION["export_filtered_fields"])?$_SESSION["export_filtered_fields"]:array();
$datatoexport=GETPOST("datatoexport");
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
$confirm=GETPOST('confirm', 'alpha');
$step=GETPOST("step")?GETPOST("step"):1;
$export_name=GETPOST("export_name");

View File

@ -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='fichinter'; //Must be the $element of the class that manage extrafield

View File

@ -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='fichinterdet'; //Must be the $element of the class that manage extrafield

View File

@ -51,7 +51,7 @@ $langs->loadLangs(array("interventions","admin","compta","bills"));
// Security check
$id=(GETPOST('fichinterid', 'int')?GETPOST('fichinterid', 'int'):GETPOST('id', 'int'));
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
if ($user->societe_id) $socid=$user->societe_id;
$objecttype = 'fichinter_rec';
if ($action == "create" || $action == "add") $objecttype = '';

View File

@ -38,7 +38,7 @@ $langs->loadLangs(array("facture","orders","sendings","companies"));
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
// Security check
if ($user->societe_id) $socid=$user->societe_id;

View File

@ -49,7 +49,7 @@ if (! $user->rights->fournisseur->facture->creer)
$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$sref = GETPOST('sref');
$sref_client = GETPOST('sref_client');

View File

@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php';
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
// Get parameters
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
$id=GETPOST('id', 'int');
$ref=GETPOST('ref', 'alpha');
$fuserid = (GETPOST('fuserid','int')?GETPOST('fuserid','int'):$user->id);

View File

@ -30,7 +30,7 @@ $langs->loadLangs(array('admin', 'hrm'));
if (! $user->admin)
accessforbidden();
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
// Other parameters HRM_*
$list = array (

View File

@ -1822,6 +1822,11 @@ MailboxTargetDirectory=Mailbox target directory
CollectNow=Collect now
DateLastResult=Date last collect
LastResult=Last result
EmailCollectorConfirmCollectTitle=Email collect confirmation
EmailCollectorConfirmCollect=Do you want to run the collect for this collector now ?
NoNewEmailToProcess=No new email to process
NothingProcessed=Nothing done
XEmailsDoneYActionsDone=%s emails analyzed, %s record/actions done by collector
##### Resource ####
ResourceSetup=Configuration du module Resource
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).

View File

@ -50,7 +50,7 @@ $langs->loadLangs(array("sendings","bills",'deliveries','orders'));
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
$confirm=GETPOST('confirm', 'alpha');
$backtopage=GETPOST('backtopage','alpha');

View File

@ -29,7 +29,7 @@ $langs->loadLangs(array("admin", "other", "modulebuilder"));
if (!$user->admin || empty($conf->modulebuilder->enabled))
accessforbidden();
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
/*

View File

@ -48,7 +48,7 @@ $langs->loadLangs(array("errors","admin","mymodule@mymodule"));
if (! $user->admin) accessforbidden();
// Parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');

View File

@ -50,7 +50,7 @@ $langs->loadLangs(array("admin", "mymodule@mymodule"));
if (! $user->admin) accessforbidden();
// Parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$arrayofparameters=array(

View File

@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
// Load translation files required by the page
$langs->loadLangs(array("mymodule@mymodule"));
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
// Securite acces client

View File

@ -50,7 +50,7 @@ $langs->loadLangs(array("mymodule@mymodule","other"));
// 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');

View File

@ -46,7 +46,7 @@ $langs->loadLangs(array("mymodule@mymodule","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');

View File

@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_global_variab
$langs->load("products");
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$save = GETPOST('save', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$selection = GETPOST('selection', 'int');

View File

@ -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='product'; //Must be the $element of the class that manage extrafield

View File

@ -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='product_lot'; //Must be the $element of the class that manage extrafield

View File

@ -39,7 +39,7 @@ $mode = GETPOST('mode', 'int');
$status = ((GETPOST('status', 'int') >= 0) ? GETPOST('status', 'int') : - 1);
$outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
$price_level = GETPOST('price_level', 'int');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$id = GETPOST('id', 'int');
$price_by_qty_rowid = GETPOST('pbq', 'int');
$finished = GETPOST('finished', 'int');

View File

@ -33,7 +33,7 @@ $langs->loadLangs(array('products', 'accountancy')); //"Back" translation is on
$id = GETPOST('id', 'int');
$eid = GETPOST('eid', 'int');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$title = GETPOST('expression_title', 'alpha');
$expression = GETPOST('expression');
$tab = GETPOST('tab', 'alpha');

View File

@ -43,7 +43,7 @@ $langs->loadLangs(array('products', 'suppliers', 'bills', 'margins'));
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$rowid=GETPOST('rowid','int');
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
$cancel=GETPOST('cancel', 'alpha');
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'pricesuppliercard';

View File

@ -32,7 +32,7 @@ $langs->loadLangs(array("stocks","other"));
// Get parameters
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');

View File

@ -52,7 +52,7 @@ $mesg=''; $error=0; $errors=array();
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$eid = GETPOST('eid', 'int');

View File

@ -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='projet'; //Must be the $table_element of the class that manage extrafield

View File

@ -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='projet_task';

View File

@ -35,7 +35,7 @@ require '../../main.inc.php';
$htmlname=GETPOST('htmlname','alpha');
$socid=GETPOST('socid','int');
$action=GETPOST('action', 'aZ09');
$action=GETPOST('action', 'alpha');
$id=GETPOST('id', 'int');
$discard_closed =GETPOST('discardclosed','int');

Some files were not shown because too many files have changed in this diff Show More