Remove $_POST war
This commit is contained in:
parent
86c7ab922a
commit
047471c220
@ -180,7 +180,7 @@ if ($action == 'add' && $user->rights->tax->charges->creer) {
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->creer) {
|
||||
if ($action == 'update' && !GETPOST("cancel") && $user->rights->tax->charges->creer) {
|
||||
$amount = price2num(GETPOST('amount'), 'MT');
|
||||
|
||||
if (!$dateech) {
|
||||
|
||||
@ -260,7 +260,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->creer) {
|
||||
if ($action == 'update' && !GETPOST("cancel") && $user->rights->tax->charges->creer) {
|
||||
$amount = price2num(GETPOST('amount'));
|
||||
|
||||
if (empty($amount)) {
|
||||
|
||||
@ -45,7 +45,7 @@ $object = new Contact($db);
|
||||
* Action
|
||||
*/
|
||||
|
||||
if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) {
|
||||
if ($action == 'update' && !GETPOST("cancel") && $user->rights->societe->contact->creer) {
|
||||
$ret = $object->fetch($id);
|
||||
|
||||
// Note: Correct date should be completed with location to have exact GM time of birth.
|
||||
|
||||
@ -202,9 +202,6 @@ if ($action == 'create') {
|
||||
|
||||
print dol_get_fiche_head(array(), '');
|
||||
|
||||
// Set some default values
|
||||
//if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue';
|
||||
|
||||
print '<table class="border centpercent tableforfieldcreate">'."\n";
|
||||
|
||||
// Common attributes
|
||||
|
||||
@ -281,8 +281,8 @@ if (empty($reshook)) {
|
||||
|
||||
$totalqty += $subtotalqty;
|
||||
} else {
|
||||
// No detail were provided for lots
|
||||
if (!empty($_POST[$qty])) {
|
||||
// No detail were provided for lots, so if a qty was provided, we can show an error.
|
||||
if (GETPOST($qty)) {
|
||||
// We try to set an amount
|
||||
// Case we dont use the list of available qty for each warehouse/lot
|
||||
// GUI does not allow this yet
|
||||
|
||||
@ -52,7 +52,7 @@ $status = GETPOST('status', 'int');
|
||||
$opp_status = GETPOST('opp_status', 'int');
|
||||
$opp_percent = price2num(GETPOST('opp_percent', 'alpha'));
|
||||
|
||||
if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $action != "update" && !$_POST["cancel"])) {
|
||||
if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $action != "update" && !GETPOST("cancel"))) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ if ($reshook < 0) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer) {
|
||||
if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) {
|
||||
$error = 0;
|
||||
|
||||
if (empty($taskref)) {
|
||||
|
||||
@ -282,7 +282,7 @@ if ($action == 'confirm_delete') {
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'update' && !$_POST["cancel"] && $user->rights->salaries->write) {
|
||||
if ($action == 'update' && !GETPOST("cancel") && $user->rights->salaries->write) {
|
||||
$amount = price2num(GETPOST('amount'), 'MT', 2);
|
||||
|
||||
if (empty($amount)) {
|
||||
|
||||
@ -67,7 +67,7 @@ if ($reshook < 0) {
|
||||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
if ($action == 'update' && $user->rights->user->user->creer && !$_POST["cancel"]) {
|
||||
if ($action == 'update' && $user->rights->user->user->creer && !GETPOST("cancel")) {
|
||||
$db->begin();
|
||||
|
||||
$res = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES | ENT_HTML5));
|
||||
|
||||
@ -90,7 +90,7 @@ if ($reshook < 0) {
|
||||
|
||||
if (empty($reshook)) {
|
||||
if ($action == 'update' && ($caneditfield || !empty($user->admin))) {
|
||||
if (!$_POST["cancel"]) {
|
||||
if (!GETPOST("cancel")) {
|
||||
$tabparam = array();
|
||||
|
||||
if (GETPOST("check_MAIN_LANDING_PAGE") == "on") {
|
||||
|
||||
@ -208,9 +208,6 @@ if ($action == 'create') {
|
||||
|
||||
print dol_get_fiche_head(array(), '');
|
||||
|
||||
// Set some default values
|
||||
//if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue';
|
||||
|
||||
print '<table class="border centpercent tableforfieldcreate">'."\n";
|
||||
|
||||
// Common attributes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user