diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 22ec0059b0c..5bfdd36a728 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -40,13 +40,6 @@ $langs->load("members"); $langs->load("users"); $langs->load("mails"); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} // Security check if (! $user->rights->adherent->cotisation->lire) accessforbidden(); diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index f8f574cac9c..312c4d8b9b0 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -42,14 +42,6 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} - // Security check if (! $user->rights->adherent->lire) accessforbidden(); diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index d430fdeb132..fde030da32d 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -29,13 +29,6 @@ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php"); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} // Security check if (!$user->rights->categorie->lire) diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index cdd083b5422..70576f5af9e 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -31,13 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php"); $langs->load("categories"); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} // Security check $socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid']; diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index f96517b16e7..9e9b744355d 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -35,13 +35,6 @@ if ($conf->projet->enabled) $langs->load("trips"); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} // Security check $id=isset($_GET["id"])?$_GET["id"]:$_POST["id"]; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 384cb0c0904..e0dd4dd58c0 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -40,14 +40,6 @@ $langs->load("users"); $errors = array(); $socid=$_GET["socid"]?$_GET["socid"]:$_POST["socid"]; -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $socid = $_GET['socid'] = $_GET['socid_id']; - $socid = $_POST['socid'] = $_POST['socid_id']; - $socid = $_REQUEST['socid'] = $_REQUEST['socid_id']; -} - // Security check $contactid = isset($_GET["id"])?$_GET["id"]:''; if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 0f6d669266f..e33bd3a081d 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -37,13 +37,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php'); require_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php'); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} $langs->load('bills'); $langs->load('suppliers'); diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index bb5201110a3..676e10f709d 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -86,7 +86,6 @@ function ajax_autocompleter($selected='',$htmlname,$valname,$url) $script.= ''; - //$script.= '
'; $script.= ''; - - return $script; -} - -/** - * \brief Get value of field, do Ajax process and return result. Use jQuery. - * \param selected Preselected value - * \param htmlname Name of html field - * \param url Path of source file to get values: /path/ajaxpage.php - * \param option Not used - * \return string script complet - */ -function ajax_autocompleter2($selected='', $htmlname, $url, $option='') -{ - $script = ''; - - $script.= ''; return $script; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index d531a4d8472..c90713f0fba 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -37,14 +37,6 @@ $langs->load('companies'); $projectid = (isset($_GET["id"])?$_GET["id"]:(isset($_POST["id"])?$_POST["id"]:'')); $projectref = (isset($_GET["ref"])?$_GET["ref"]:''); -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} - if ($projectid == '' && $projectref == '' && ($_GET['action'] != "create" && $_POST['action'] != "add" && $_POST["action"] != "update" && !$_POST["cancel"])) accessforbidden(); $mine = $_REQUEST['mode']=='mine' ? 1 : 0; diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php index debb7f014d8..d5729207e7b 100644 --- a/htdocs/societe/ajaxcompanies.php +++ b/htdocs/societe/ajaxcompanies.php @@ -52,14 +52,14 @@ dol_syslog(join(',',$_GET)); // Generation liste des societes -if (! empty($_POST['newcompany']) || ! empty($_GET['socid']) || ! empty($_POST['id_fourn'])) +if (! empty($_GET['newcompany']) || ! empty($_GET['socid']) || ! empty($_GET['id_fourn'])) { $return_arr = array(); // Define filter on text typed - $socid = $_POST['newcompany']?$_POST['newcompany']:''; + $socid = $_GET['newcompany']?$_GET['newcompany']:''; if (! $socid) $socid = $_GET['socid']?$_GET['socid']:''; - if (! $socid) $socid = $_POST['id_fourn']?$_POST['id_fourn']:''; + if (! $socid) $socid = $_GET['id_fourn']?$_GET['id_fourn']:''; $sql = "SELECT rowid, nom"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";