Revert "Fix: stock message in session and reload the page for avoid url problem with jQuery fileupload"
This reverts commit 4deeb20dd8.
This commit is contained in:
parent
73f1d8ee99
commit
f9bda74e22
@ -39,13 +39,7 @@ $langs->load('other');
|
|||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
|
$mesg = "";
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
@ -120,9 +114,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,13 +39,6 @@ $confirm = GETPOST('confirm');
|
|||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
{
|
{
|
||||||
@ -127,9 +120,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,13 +40,6 @@ $confirm = GETPOST('confirm');
|
|||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
{
|
{
|
||||||
@ -66,6 +59,7 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="name";
|
if (! $sortfield) $sortfield="name";
|
||||||
|
|
||||||
|
|
||||||
$object = new Commande($db);
|
$object = new Commande($db);
|
||||||
|
|
||||||
|
|
||||||
@ -129,9 +123,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,13 +43,6 @@ $confirm = GETPOST('confirm');
|
|||||||
$id = GETPOST('facid','int');
|
$id = GETPOST('facid','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
{
|
{
|
||||||
@ -132,9 +125,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,13 +41,6 @@ $langs->load('deliveries');
|
|||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
$langs->load('stocks');
|
$langs->load('stocks');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id=empty($_GET['id']) ? 0 : intVal($_GET['id']);
|
$id=empty($_GET['id']) ? 0 : intVal($_GET['id']);
|
||||||
$action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action']) : $_GET['action'];
|
$action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action']) : $_GET['action'];
|
||||||
@ -126,9 +119,7 @@ if ($action=='delete')
|
|||||||
$upload_dir = $conf->fournisseur->dir_output . "/commande/" . dol_sanitizeFileName($commande->ref);
|
$upload_dir = $conf->fournisseur->dir_output . "/commande/" . dol_sanitizeFileName($commande->ref);
|
||||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,13 +38,6 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
|||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$ref= GETPOST('ref');
|
$ref= GETPOST('ref');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
if (! $project->fetch($id,$ref) > 0)
|
if (! $project->fetch($id,$ref) > 0)
|
||||||
{
|
{
|
||||||
@ -122,9 +115,7 @@ if ($action == 'confirm_delete' && $_REQUEST['confirm'] == 'yes' && $user->right
|
|||||||
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($project->ref);
|
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($project->ref);
|
||||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,13 +44,6 @@ $ref= GETPOST('ref','alpha');
|
|||||||
$withproject=GETPOST('withproject','int');
|
$withproject=GETPOST('withproject','int');
|
||||||
$project_ref = GETPOST('project_ref','alpha');
|
$project_ref = GETPOST('project_ref','alpha');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||||
@ -123,9 +116,7 @@ if ($action=='delete')
|
|||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
||||||
|
|||||||
@ -33,19 +33,13 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|
||||||
|
$mesg='';
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
$confirm=GETPOST('confirm');
|
$confirm=GETPOST('confirm');
|
||||||
$id=(GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
$id=(GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
|
|
||||||
$mesg='';
|
|
||||||
if (isset($_SESSION['DolMessage']))
|
|
||||||
{
|
|
||||||
$mesg=$_SESSION['DolMessage'];
|
|
||||||
unset($_SESSION['DolMessage']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
@ -131,9 +125,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
|
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user