forked from Wavyzz/dolibarr
Fix: declare $mesg and $mesgs in main.inc.php
Fix: strict mode be back
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -40,13 +40,6 @@ $confirm = GETPOST('confirm');
|
||||
$id = GETPOST('id','int');
|
||||
$ref = GETPOST('ref');
|
||||
|
||||
$mesg='';
|
||||
if (isset($_SESSION['DolMessage']))
|
||||
{
|
||||
$mesg=$_SESSION['DolMessage'];
|
||||
unset($_SESSION['DolMessage']);
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id)
|
||||
{
|
||||
@@ -74,7 +67,7 @@ $object = new Commande($db);
|
||||
*/
|
||||
|
||||
// Envoi fichier
|
||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
@@ -129,7 +122,7 @@ else if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
$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).
|
||||
dol_delete_file($file,0,0,0,$object);
|
||||
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||
$_SESSION['dol_message'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user