USe second parameter in GETPOST
This commit is contained in:
parent
8f5206accf
commit
0873260b8a
@ -37,7 +37,7 @@ $langs->load("salaries");
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
|
||||
@ -84,8 +84,8 @@ $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accounting
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction')) { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha')) { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -40,7 +40,7 @@ $action = GETPOST('action','aZ09');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
|
||||
// Security check
|
||||
|
||||
@ -52,7 +52,7 @@ $object = new AccountingAccount($db);
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel'))
|
||||
if (GETPOST('cancel','alpha'))
|
||||
{
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/accountancy/admin/account.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
|
||||
@ -35,7 +35,7 @@ $langs->load("accountancy");
|
||||
$mesg = '';
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cat_id = GETPOST('account_category');
|
||||
$selectcpt = GETPOST('cpt_bk', 'array');
|
||||
|
||||
@ -90,8 +90,8 @@ $arrayfields=array();
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -108,8 +108,8 @@ if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
|
||||
@ -101,8 +101,8 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOU
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
|
||||
@ -97,8 +97,8 @@ $accounting = new AccountingAccount($db);
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
|
||||
@ -102,8 +102,8 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUN
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
|
||||
@ -138,8 +138,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -39,7 +39,7 @@ $errmsg='';
|
||||
$action=GETPOST("action",'alpha');
|
||||
$rowid=GETPOST("rowid","int")?GETPOST("rowid","int"):GETPOST("id","int");
|
||||
$typeid=GETPOST("typeid","int");
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$confirm=GETPOST('confirm');
|
||||
|
||||
if (! $user->rights->adherent->cotisation->lire)
|
||||
|
||||
@ -75,8 +75,8 @@ $result=restrictedArea($user,'adherent','','','cotisation');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -69,8 +69,8 @@ $hookmanager->initHooks(array('admindefaultvalues','globaladmin'));
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -55,7 +55,7 @@ if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel'))
|
||||
if (GETPOST('cancel','alpha'))
|
||||
{
|
||||
$action='';
|
||||
}
|
||||
|
||||
@ -179,8 +179,8 @@ $id = 25;
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -64,8 +64,8 @@ $hookmanager->initHooks(array('admintranslation','globaladmin'));
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -63,7 +63,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
||||
|
||||
$error = 0;
|
||||
|
||||
if (GETPOST("cancel"))
|
||||
if (GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (empty($backtopage)) $backtopage=($urlsource?$urlsource:((! empty($url))?$url:DOL_URL_ROOT.'/bookmarks/list.php'));
|
||||
header("Location: ".$backtopage);
|
||||
|
||||
@ -36,7 +36,7 @@ $ref=GETPOST('ref');
|
||||
$type=GETPOST('type');
|
||||
$action=GETPOST('action','aZ09');
|
||||
$confirm=GETPOST('confirm');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
|
||||
$socid=GETPOST('socid','int');
|
||||
$label=GETPOST('label');
|
||||
|
||||
@ -52,7 +52,7 @@ $object = new Address($db);
|
||||
*/
|
||||
|
||||
// Cancel
|
||||
if (GETPOST("cancel") && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -73,7 +73,7 @@ $pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="nom";
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
$cancelbutton = GETPOST('cancel','alpha');
|
||||
|
||||
$object = new Client($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
@ -930,7 +930,7 @@ else
|
||||
* Boutons d'action
|
||||
*/
|
||||
|
||||
if (GETPOST("cancel") || $confirm=='no' || $action == '' || in_array($action,array('settodraft', 'valid','delete','sendall','clone')))
|
||||
if (GETPOST('cancel','alpha') || $confirm=='no' || $action == '' || in_array($action,array('settodraft', 'valid','delete','sendall','clone')))
|
||||
{
|
||||
print "\n\n<div class=\"tabsAction\">\n";
|
||||
|
||||
|
||||
@ -602,7 +602,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (! GETPOST('statut')) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
||||
@ -622,7 +622,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
||||
@ -1106,7 +1106,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('cancel'))
|
||||
else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('cancel','alpha'))
|
||||
{
|
||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||
exit();
|
||||
|
||||
@ -169,8 +169,8 @@ $object = new Propal($db); // To be passed as parameter of executeHooks that nee
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -420,7 +420,7 @@ if ($resql)
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objecttmp=new Propal($db);
|
||||
$listofselectedid=array();
|
||||
|
||||
@ -46,7 +46,7 @@ $backtopage = GETPOST('backtopage','alpha');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel') && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -49,7 +49,7 @@ if ($user->societe_id > 0)
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel') && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -1061,7 +1061,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel') == $langs->trans('Cancel')) {
|
||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -149,8 +149,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -666,7 +666,7 @@ if ($resql)
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objecttmp=new Commande($db);
|
||||
$listofselectedid=array();
|
||||
|
||||
@ -161,8 +161,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -111,8 +111,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -49,7 +49,7 @@ $confirm=GETPOST('confirm','alpha');
|
||||
$rowid=GETPOST("rowid",'int');
|
||||
$orig_account=GETPOST("orig_account");
|
||||
$backtopage=GETPOST('backtopage');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
|
||||
// Security check
|
||||
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :''));
|
||||
|
||||
@ -1762,7 +1762,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('cancel'))
|
||||
elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (! $object->fetch($id) > 0) dol_print_error($db);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
@ -139,8 +139,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -148,7 +148,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if (GETPOST('cancel')) $action='';
|
||||
if (GETPOST('cancel','alpha')) $action='';
|
||||
|
||||
// Selection of new fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
@ -728,7 +728,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('cancel'))
|
||||
elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (! $object->fetch($id) > 0) dol_print_error($db);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
@ -181,8 +181,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -612,7 +612,7 @@ if ($resql)
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objecttmp=new Facture($db);
|
||||
$listofselectedid=array();
|
||||
|
||||
@ -115,7 +115,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cancel
|
||||
if (GETPOST("cancel") && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -91,7 +91,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cancel
|
||||
if (GETPOST("cancel") && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -176,8 +176,8 @@ if (($id > 0 || ! empty($ref)) && $action != 'add')
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -636,7 +636,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel'))
|
||||
else if ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objectline = new ContratLigne($db);
|
||||
if ($objectline->fetch(GETPOST('elrowid')))
|
||||
@ -822,7 +822,7 @@ if (empty($reshook))
|
||||
}
|
||||
elseif ($action=='setref_supplier')
|
||||
{
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
$cancelbutton = GETPOST('cancel','alpha');
|
||||
if (!$cancelbutton) {
|
||||
|
||||
$result = $object->fetch($id);
|
||||
@ -846,7 +846,7 @@ if (empty($reshook))
|
||||
}
|
||||
elseif ($action=='setref_customer')
|
||||
{
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
$cancelbutton = GETPOST('cancel','alpha');
|
||||
|
||||
if (!$cancelbutton)
|
||||
{
|
||||
@ -871,7 +871,7 @@ if (empty($reshook))
|
||||
}
|
||||
elseif ($action=='setref')
|
||||
{
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
$cancelbutton = GETPOST('cancel','alpha');
|
||||
|
||||
if (!$cancelbutton) {
|
||||
$result = $object->fetch($id);
|
||||
@ -895,7 +895,7 @@ if (empty($reshook))
|
||||
}
|
||||
elseif ($action=='setdate_contrat')
|
||||
{
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
$cancelbutton = GETPOST('cancel','alpha');
|
||||
|
||||
if (!$cancelbutton) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
@ -136,8 +136,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -140,8 +140,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
// $id must be defined (object is loaded in this file with fetch)
|
||||
|
||||
// Set public note
|
||||
if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel'))
|
||||
if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
||||
@ -36,7 +36,7 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel
|
||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
// Set public note
|
||||
else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel'))
|
||||
else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
||||
|
||||
@ -36,7 +36,7 @@ $action=GETPOST('action','alpha');
|
||||
$modulepart=GETPOST('modulepart','alpha')?GETPOST('modulepart','alpha'):'produit|service';
|
||||
$original_file = GETPOST("file");
|
||||
$backtourl=GETPOST('backtourl');
|
||||
$cancel=GETPOST("cancel");
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
|
||||
// Security check
|
||||
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
|
||||
|
||||
@ -41,7 +41,7 @@ if (!$user->rights->cron->create) accessforbidden();
|
||||
$id=GETPOST('id','int');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$backtourl=GETPOST('backtourl','alpha');
|
||||
$securitykey = GETPOST('securitykey','alpha');
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ $langs->load("bills");
|
||||
|
||||
$id=GETPOST('rowid')?GETPOST('rowid','int'):GETPOST('id','int');
|
||||
$action=GETPOST('action','alpha');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$amount=GETPOST('amount');
|
||||
$donation_date=dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
||||
|
||||
@ -61,7 +61,7 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="label";
|
||||
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$action=GETPOST('action','aZ09');
|
||||
$section=GETPOST("section");
|
||||
if (! $section)
|
||||
|
||||
@ -138,7 +138,7 @@ if ($action == 'confirm_deletedir' && $confirm == 'yes')
|
||||
}
|
||||
|
||||
// Update description
|
||||
if ($action == 'update' && ! GETPOST('cancel'))
|
||||
if ($action == 'update' && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$error=0;
|
||||
|
||||
|
||||
@ -119,8 +119,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction')) { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha')) { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -49,7 +49,7 @@ $langs->load("bills");
|
||||
$langs->load("mails");
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$date_start = dol_mktime(0, 0, 0, GETPOST('date_debutmonth'), GETPOST('date_debutday'), GETPOST('date_debutyear'));
|
||||
|
||||
@ -130,8 +130,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -128,8 +128,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -45,7 +45,7 @@ $langs->load('orders');
|
||||
$langs->load('commercial');
|
||||
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
$cancelbutton = GETPOST('cancel','alpha');
|
||||
|
||||
// Security check
|
||||
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
||||
|
||||
@ -542,7 +542,7 @@ if (empty($reshook))
|
||||
/*
|
||||
* Updating a line in the order
|
||||
*/
|
||||
if ($action == 'updateline' && $user->rights->fournisseur->commande->creer && ! GETPOST('cancel'))
|
||||
if ($action == 'updateline' && $user->rights->fournisseur->commande->creer && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$tva_tx = GETPOST('tva_tx');
|
||||
|
||||
@ -1170,7 +1170,7 @@ if (empty($reshook))
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||
|
||||
|
||||
if ($action == 'webservice' && GETPOST('mode', 'alpha') == "send" && ! GETPOST('cancel'))
|
||||
if ($action == 'webservice' && GETPOST('mode', 'alpha') == "send" && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$ws_url = $object->thirdparty->webservices_url;
|
||||
$ws_key = $object->thirdparty->webservices_key;
|
||||
@ -2269,7 +2269,7 @@ elseif (! empty($object->id))
|
||||
/*
|
||||
* Action webservice
|
||||
*/
|
||||
elseif ($action == 'webservice' && GETPOST('mode', 'alpha') != "send" && ! GETPOST('cancel'))
|
||||
elseif ($action == 'webservice' && GETPOST('mode', 'alpha') != "send" && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$ws_url = $object->thirdparty->webservices_url;
|
||||
|
||||
@ -172,8 +172,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction')) { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha')) { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -689,7 +689,7 @@ if ($resql)
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objecttmp=new CommandeFournisseur($db);
|
||||
$listofselectedid=array();
|
||||
|
||||
@ -183,8 +183,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -493,7 +493,7 @@ if ($resql)
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objecttmp=new FactureFournisseur($db);
|
||||
$listofselectedid=array();
|
||||
|
||||
@ -69,8 +69,8 @@ $extrafields = new ExtraFields($db);
|
||||
* Put here all code to do according to value of "action" parameter
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -71,8 +71,8 @@ $holiday = new Holiday($db);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -75,8 +75,8 @@ if (GETPOST("button_search_x") || GETPOST("button_search")) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -106,7 +106,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cancel
|
||||
if (GETPOST("cancel") && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -143,8 +143,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Put here all code to do according to value of "$action" parameter
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -35,7 +35,7 @@ if (!$user->rights->opensurvey->read) accessforbidden();
|
||||
|
||||
// Initialisation des variables
|
||||
$action=GETPOST('action','aZ09');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
|
||||
$numsondage = '';
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ $id=GETPOST('id', 'int');
|
||||
$ref=GETPOST('ref', 'alpha');
|
||||
$type=GETPOST('type','int');
|
||||
$action=(GETPOST('action','alpha') ? GETPOST('action','alpha') : 'view');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$socid=GETPOST('socid','int');
|
||||
$duration_value = GETPOST('duration_value');
|
||||
@ -358,7 +358,7 @@ if (empty($reshook))
|
||||
// Update a product or service
|
||||
if ($action == 'update' && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
if (GETPOST('cancel'))
|
||||
if (GETPOST('cancel','alpha'))
|
||||
{
|
||||
$action = '';
|
||||
}
|
||||
|
||||
@ -143,8 +143,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Put here all code to do according to value of "$action" parameter
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -193,8 +193,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -39,7 +39,7 @@ $langs->load("companies");
|
||||
$langs->load("categories");
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$confirm=GETPOST('confirm');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
|
||||
@ -51,7 +51,7 @@ $id=GETPOST('id','int');
|
||||
$msid=GETPOST('msid','int');
|
||||
$product_id=GETPOST("product_id");
|
||||
$action=GETPOST('action','aZ09');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$idproduct = GETPOST('idproduct','int');
|
||||
$year = GETPOST("year");
|
||||
$month = GETPOST("month");
|
||||
@ -112,8 +112,8 @@ $object = new MouvementStock($db); // To be passed as parameter of executeHooks
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -53,13 +53,13 @@ if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
|
||||
|
||||
$backtopage=GETPOST('backtopage');
|
||||
$action=GETPOST('action','aZ09');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
|
||||
$id=GETPOST('id', 'int');
|
||||
$ref=GETPOST('ref', 'alpha');
|
||||
$stocklimit = GETPOST('seuil_stock_alerte');
|
||||
$desiredstock = GETPOST('desiredstock');
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
$d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
|
||||
$d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
|
||||
|
||||
@ -150,7 +150,7 @@ if (empty($reshook))
|
||||
// Action to add record
|
||||
if ($action == 'add')
|
||||
{
|
||||
if (GETPOST('cancel'))
|
||||
if (GETPOST('cancel','alpha'))
|
||||
{
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/stock/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
@ -198,10 +198,10 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Cancel
|
||||
if ($action == 'update' && GETPOST('cancel')) $action='view';
|
||||
if ($action == 'update' && GETPOST('cancel','alpha')) $action='view';
|
||||
|
||||
// Action to update record
|
||||
if ($action == 'update' && ! GETPOST('cancel'))
|
||||
if ($action == 'update' && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$error=0;
|
||||
|
||||
|
||||
@ -132,8 +132,8 @@ if (($id > 0 || ! empty($ref)) && $action != 'add')
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -148,8 +148,8 @@ $object = new Project($db);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -39,7 +39,7 @@ $id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$taskref = GETPOST('taskref', 'alpha');
|
||||
$backtopage=GETPOST('backtopage','alpha');
|
||||
$cancel=GETPOST('cancel');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
|
||||
$search_user_id = GETPOST('search_user_id', 'int');
|
||||
|
||||
|
||||
@ -138,8 +138,8 @@ $object = new Task($db);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -108,7 +108,7 @@ if ($action == 'add_element_resource' && ! $cancel)
|
||||
}
|
||||
|
||||
// Update ressource
|
||||
if ($action == 'update_linked_resource' && $user->rights->resource->write && !GETPOST('cancel') )
|
||||
if ($action == 'update_linked_resource' && $user->rights->resource->write && !GETPOST('cancel','alpha') )
|
||||
{
|
||||
$res = $object->fetch_element_resource($lineid);
|
||||
if($res)
|
||||
|
||||
@ -76,7 +76,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cancel
|
||||
if (GETPOST("cancel") && ! empty($backtopage))
|
||||
if (GETPOST('cancel','alpha') && ! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
|
||||
@ -56,7 +56,7 @@ if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
$mesg=''; $error=0; $errors=array();
|
||||
|
||||
$action = (GETPOST('action','aZ09') ? GETPOST('action','aZ09') : 'view');
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$backtopage = GETPOST('backtopage','alpha');
|
||||
$confirm = GETPOST('confirm');
|
||||
$socid = GETPOST('socid','int');
|
||||
@ -421,7 +421,7 @@ if (empty($reshook))
|
||||
else if (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']);
|
||||
|
||||
// Check parameters
|
||||
if (! GETPOST("cancel"))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (! empty($object->email) && ! isValidEMail($object->email))
|
||||
{
|
||||
@ -580,7 +580,7 @@ if (empty($reshook))
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
if (GETPOST("cancel"))
|
||||
if (GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (! empty($backtopage))
|
||||
{
|
||||
|
||||
@ -208,8 +208,8 @@ $object = new Societe($db);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -434,7 +434,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel')) {
|
||||
else if ($action == 'confirm_reopen' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) {
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->statut == SupplierProposal::STATUS_SIGNED || $object->statut == SupplierProposal::STATUS_NOTSIGNED || $object->statut == SupplierProposal::STATUS_CLOSE) {
|
||||
$object->reopen($user, SupplierProposal::STATUS_VALIDATED);
|
||||
@ -442,7 +442,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel')) {
|
||||
else if ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) {
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->statut == SupplierProposal::STATUS_SIGNED) {
|
||||
$object->setStatut(SupplierProposal::STATUS_CLOSE);
|
||||
@ -450,7 +450,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Set accepted/refused
|
||||
else if ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel')) {
|
||||
else if ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) {
|
||||
if (! GETPOST('statut')) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), null, 'errors');
|
||||
$action = 'statut';
|
||||
@ -871,7 +871,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateligne' && $user->rights->supplier_proposal->creer && GETPOST('cancel') == $langs->trans('Cancel')) {
|
||||
else if ($action == 'updateligne' && $user->rights->supplier_proposal->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -168,8 +168,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -420,7 +420,7 @@ if ($resql)
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
if (! GETPOST('cancel','alpha'))
|
||||
{
|
||||
$objecttmp=new SupplierProposal($db);
|
||||
$listofselectedid=array();
|
||||
|
||||
@ -55,7 +55,7 @@ $mode = GETPOST('mode','alpha');
|
||||
$confirm = GETPOST('confirm','alpha');
|
||||
$subaction = GETPOST('subaction','alpha');
|
||||
$group = GETPOST("group","int",3);
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
|
||||
// Users/Groups management only in master entity if transverse mode
|
||||
if (($action == 'create' || $action == 'adduserldap') && ! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
||||
|
||||
@ -53,7 +53,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action);
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook)) {
|
||||
if ($action == 'update' && !GETPOST('cancel')) {
|
||||
if ($action == 'update' && !GETPOST('cancel','alpha')) {
|
||||
$edituser = new User($db);
|
||||
$edituser->fetch($id);
|
||||
|
||||
|
||||
@ -68,8 +68,8 @@ $fieldstosearchall = array(
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -135,8 +135,8 @@ if ($mode == 'employee') $search_employee=1;
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -41,7 +41,7 @@ $massaction=GETPOST('massaction','alpha');
|
||||
$show_files=GETPOST('show_files','int');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$cancel = GETPOST('cancel');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
|
||||
// Security check
|
||||
$fieldvalue = (! empty($id) ? $id : $ref);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user