diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 93757a2b060..d82db7d3c8d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -132,7 +132,7 @@ class FormFile * @param genallowed Generation is allowed (1/0 or array of formats) * @param delallowed Remove is allowed (1/0) * @param modelselected Model to preselect by default - * @param allowgenifempty Show warning if no model activated + * @param allowgenifempty Show warning if no model activated * @param forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined) * @param iconPDF Show only PDF icon with link (1/0) * @param maxfilenamelength Max length for filename shown diff --git a/htdocs/document.php b/htdocs/document.php index 5e7f52f8d5d..c3ddbd982f0 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -397,6 +397,13 @@ if ($modulepart) $original_file=$conf->adherent->dir_output.'/'.$original_file; } + // Wrapping for PHPSane + else if ($modulepart == 'phpsane_user_temp') + { + $accessallowed=1; + $original_file=$conf->phpsane->dir_temp.'/'.$user->id.'/'.$original_file; + } + // Generic wrapping else { diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 54fda38de0c..c07d3462603 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -37,11 +37,11 @@ $langs->load("suppliers"); $langs->load("bills"); // If socid provided by ajax company selector -if (! empty($_REQUEST['id_fourn_id'])) +if (! empty($_REQUEST['search_fourn_id'])) { - $_GET['id_fourn'] = $_GET['id_fourn_id']; - $_POST['id_fourn'] = $_POST['id_fourn_id']; - $_REQUEST['id_fourn'] = $_REQUEST['id_fourn_id']; + $_GET['id_fourn'] = $_GET['search_fourn_id']; + $_POST['id_fourn'] = $_POST['search_fourn_id']; + $_REQUEST['id_fourn'] = $_REQUEST['search_fourn_id']; } // Security check @@ -89,19 +89,24 @@ if ($_GET["action"] == 'remove_pf') if ($_POST["action"] == 'updateprice' && $_POST["cancel"] <> $langs->trans("Cancel")) { + $id_fourn=GETPOST("id_fourn"); + if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn"); + $ref_fourn=GETPOST("ref_fourn"); + if (empty($ref_fourn)) $id_fourn=GETPOST("search_ref_fourn"); + $product = new ProductFournisseur($db); - $result=$product->fetch($_REQUEST["id"]); + $result=$product->fetch(GETPOST("id")); if ($result > 0) { $db->begin(); $error=0; - if (! $_POST["ref_fourn"]) + if (! $ref_fourn) { $error++; $mesg='