diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 3d13265ac6f..6b41a217f80 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -61,9 +61,10 @@ $search_type=GETPOST("search_type"); $search_email=GETPOST("search_email"); $search_categ = GETPOST("search_categ",'int'); $catid = GETPOST("catid",'int'); -$sall=GETPOST('sall', 'alphanohtml'); $optioncss = GETPOST('optioncss','alpha'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); + if ($statut < -1) $statut = ''; $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 82cb53fdfbf..f2491b09336 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -41,7 +41,7 @@ $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="m.date_creat"; -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $sref=GETPOST("sref", "alpha"); $filteremail=GETPOST('filteremail','alpha'); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 8baa1f2fd5f..49fb668a916 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -81,7 +81,7 @@ $viewstatut=GETPOST('viewstatut','alpha'); $optioncss = GETPOST('optioncss','alpha'); $object_statut=GETPOST('propal_statut','alpha'); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 0f5601bd881..df47e04390e 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -67,7 +67,7 @@ $search_zip=GETPOST('search_zip','alpha'); $search_state=trim(GETPOST("search_state")); $search_country=GETPOST("search_country",'int'); $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $socid=GETPOST('socid','int'); $search_user=GETPOST('search_user','int'); $search_sale=GETPOST('search_sale','int'); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 83ec75043c3..a15598ee82d 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -52,7 +52,7 @@ $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); $sref = GETPOST('sref'); $sref_client = GETPOST('sref_client'); -$sall = GETPOST('sall', 'alphanohtml'); +$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $socid = GETPOST('socid','int'); $selected = GETPOST('orders_to_invoice'); $sortfield = GETPOST("sortfield",'alpha'); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index dcc1cab2237..43222d8d454 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -53,7 +53,7 @@ $langs->load('bills'); $langs->load('companies'); $langs->load('products'); -$sall=trim(GETPOST('sall', 'alphanohtml')); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index f6e9781569c..dc3ec1c458b 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -47,7 +47,7 @@ $ref = ''; // There is no ref for contacts if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'contact', $contactid,''); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_cti=preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars $search_phone=GETPOST("search_phone"); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 9db444755cc..cdafbd6c2fd 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -56,7 +56,7 @@ $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_contract=GETPOST('search_contract'); $search_ref_customer=GETPOST('search_ref_customer','alpha'); $search_ref_supplier=GETPOST('search_ref_supplier','alpha'); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_status=GETPOST('search_status'); $socid=GETPOST('socid'); $search_user=GETPOST('search_user','int'); diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index e69a2804109..55a197861a0 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -130,11 +130,11 @@ if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_D } if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire) { - $arrayresult['searchintoexpensereport']=array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):'')); + $arrayresult['searchintoexpensereport']=array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue?'&sall='.urlencode($search_boxvalue):'')); } if (! empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read) { - $arrayresult['searchintoleaves']=array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&'.($search_boxvalue?'sall='.urlencode($search_boxvalue):'')); + $arrayresult['searchintoleaves']=array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue?'&sall='.urlencode($search_boxvalue):'')); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 60171a74146..839a4c56fe0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -766,7 +766,7 @@ class Form $out .= ''; } - $out.= ''; $out.= ''; $num = $this->db->num_rows($resql); $i = 0; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 83ef016d3a9..acf2f788802 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -86,9 +86,8 @@ else { $tmp=explode('?', $val['url']); $urlaction=$tmp[0]; - $keysearch=$tmp[1]; - $keysearch=preg_replace('/mainmenu=(.*)&/','',$keysearch); - $keysearch=preg_replace('/=/','',$keysearch); + $keysearch='search_all'; + $accesskey=''; if (! $accesskeyalreadyassigned[$val['label'][0]]) { diff --git a/htdocs/don/list.php b/htdocs/don/list.php index cb5ab766ae9..46692c9025b 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -43,7 +43,7 @@ if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="d.datedon"; $statut=(GETPOST("statut",'intcomma')!='')?GETPOST("statut",'intcomma'):"-1"; -$search_all=GETPOST('sall', 'alphanohtml'); +$search_all=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref=GETPOST('search_ref','alpha'); $search_company=GETPOST('search_company','alpha'); $search_name=GETPOST('search_name','alpha'); diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 0646507f9f4..ff4e056e928 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -50,7 +50,7 @@ $search_state=trim(GETPOST("search_state")); $search_country=GETPOST("search_country",'int'); $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_billed=GETPOST("search_billed",'int'); -$sall = GETPOST('sall', 'alphanohtml'); +$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $optioncss = GETPOST('optioncss','alpha'); $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 8b2471919f8..caae068461a 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -66,7 +66,7 @@ if (!$sortfield) $sortfield="d.date_debut"; $id = GETPOST('id', 'int'); -$sall = GETPOST('sall', 'alphanohtml'); +$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST('search_ref'); $search_user = GETPOST('search_user','int'); $search_amount_ht = GETPOST('search_amount_ht','alpha'); @@ -77,7 +77,7 @@ $month_start = GETPOST("month_start","int"); $year_start = GETPOST("year_start","int"); $month_end = GETPOST("month_end","int"); $year_end = GETPOST("year_end","int"); -$optioncss = GETPOST('optioncss','alpha'); +$optioncss = GETPOST('optioncss','alpha'); if ($search_status == '') $search_status=-1; if ($search_user == '') $search_user=-1; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 276d7ee2831..49cb1837d35 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -46,7 +46,7 @@ $search_ref=GETPOST('search_ref')?GETPOST('search_ref','alpha'):GETPOST('search_ $search_company=GETPOST('search_company','alpha'); $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); -$sall=GETPOST('sall'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $optioncss = GETPOST('optioncss','alpha'); $socid=GETPOST('socid','int'); @@ -75,7 +75,7 @@ if (! $sortfield) // Initialize technical object to manage context to save list fields $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'interventionlist'; -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref=GETPOST('search_ref')?GETPOST('search_ref','alpha'):GETPOST('search_inter','alpha'); $search_company=GETPOST('search_company','alpha'); $search_desc=GETPOST('search_desc','alpha'); diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 012574915ab..890cac8e1b2 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -53,7 +53,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $sref = GETPOST('sref'); $sref_client = GETPOST('sref_client'); -$sall = GETPOST('sall', 'alphanohtml'); +$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $socid = GETPOST('socid', 'int'); $selected = GETPOST('orders_to_invoice'); $sortfield = GETPOST("sortfield", 'alpha'); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 4cccf12a042..2227c750927 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -68,7 +68,7 @@ if ($user->societe_id > 0) $mode=GETPOST("mode"); -$search_all = GETPOST('sall', 'alphanohtml'); +$search_all = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_label = GETPOST("search_label","alpha"); $search_company = GETPOST("search_company","alpha"); $search_amount_no_tax = GETPOST("search_amount_no_tax","alpha"); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 8627b7367d9..cf81d0a98fa 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -73,7 +73,7 @@ if (! $sortorder) $sortorder="DESC"; $id = GETPOST('id','int'); -$sall = GETPOST('sall', 'alphanohtml'); +$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST('search_ref'); $month_create = GETPOST('month_create'); $year_create = GETPOST('year_create'); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c9e14f3d67a..1cf0a18e3a1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1829,10 +1829,6 @@ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinpu { global $conf,$langs,$user; - if (empty($htmlinputid)) { - $htmlinputid = $htmlinputname; - } - $ret=''; $ret.='
'; $ret.=''; diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index e33d1e10fd9..09508f5c2cb 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -327,7 +327,7 @@ class ActionsCardProduct $this->list_datas = array(); // Clean parameters - $sall=trim(GETPOST('sall', 'alphanohtml')); + $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); foreach($this->field_list as $field) { diff --git a/htdocs/product/list.php b/htdocs/product/list.php index d5bd79d1100..6b13e3c1d0c 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -51,7 +51,7 @@ $show_files=GETPOST('show_files','int'); $confirm=GETPOST('confirm','alpha'); $toselect = GETPOST('toselect', 'array'); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref=GETPOST("search_ref"); $search_barcode=GETPOST("search_barcode"); $search_label=GETPOST("search_label"); diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index b61b9043d95..f71601e7bc0 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -42,7 +42,7 @@ $result=restrictedArea($user,'produit|service'); $action=GETPOST('action','alpha'); $sref=GETPOST("sref"); $snom=GETPOST("snom"); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $type=GETPOST("type","int"); $search_barcode=GETPOST("search_barcode"); $catid=GETPOST('catid','int'); diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index be4ff835c01..fc2632fe5e2 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -45,7 +45,7 @@ $result=restrictedArea($user,'produit|service'); $action=GETPOST('action','alpha'); $sref=GETPOST("sref"); $snom=GETPOST("snom"); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $type=GETPOST("type","int"); $search_barcode=GETPOST("search_barcode",'alpha'); $search_warehouse=GETPOST('search_warehouse','alpha'); diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 77991ab2909..58ea5eadc21 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -32,7 +32,7 @@ $langs->load("stocks"); // Security check $result=restrictedArea($user,'stock'); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref=GETPOST("sref","alpha")?GETPOST("sref","alpha"):GETPOST("search_ref","alpha"); $search_label=GETPOST("snom","alpha")?GETPOST("snom","alpha"):GETPOST("search_label","alpha"); $search_status=GETPOST("search_status","int"); diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 600d4e06c18..e51747fd78c 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -48,7 +48,7 @@ $result=restrictedArea($user,'produit|service'); $action = GETPOST('action','alpha'); $sref = GETPOST('sref', 'alpha'); $snom = GETPOST('snom', 'alpha'); -$sall = GETPOST('sall', 'alphanohtml'); +$sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $type = GETPOST('type','int'); $tobuy = GETPOST('tobuy', 'int'); $salert = GETPOST('salert', 'alpha'); diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 7e6aca17f67..76e741faa1d 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -31,9 +31,9 @@ $langs->load("stocks"); // Security check $result=restrictedArea($user,'stock'); -$sref=GETPOST("sref"); -$snom=GETPOST("snom"); -$sall=GETPOST('sall', 'alphanohtml'); +$sref=GETPOST("sref",'alpha'); +$snom=GETPOST("snom",'alpha'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $sortfield = GETPOST("sortfield"); $sortorder = GETPOST("sortorder"); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index f8cfe23eae9..4b8692a1cfe 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -49,7 +49,7 @@ $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user,'societe',$socid,''); -$search_all=trim(GETPOST('sall', 'alphanohtml')); +$search_all=trim(GETPOST('search_all', 'alphanohtml')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_cti=preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars $search_id=trim(GETPOST("search_id","int")); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 0c81300c4ca..abf9f9cfd2a 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -74,7 +74,7 @@ $search_montant_ttc=GETPOST('search_montant_ttc','alpha'); $search_status=GETPOST('viewstatut','alpha')?GETPOST('viewstatut','alpha'):GETPOST('search_status','int'); $object_statut=$db->escape(GETPOST('supplier_proposal_statut')); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); $year=GETPOST("year"); $month=GETPOST("month"); diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index f4b962fb86f..0a7b32062e2 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -40,7 +40,7 @@ if (! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global- $langs->load("users"); -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_group=GETPOST('search_group'); $optioncss = GETPOST('optioncss','alpha'); diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 892d60373a9..ec85428bcab 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -39,7 +39,7 @@ $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_user=GETPOST('search_user','alpha'); $userstatic=new User($db); diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 6d6b82e8f68..b2cdd9e3dc6 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -107,7 +107,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab } // Init search fields -$sall=GETPOST('sall', 'alphanohtml'); +$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_user=GETPOST('search_user','alpha'); $search_login=GETPOST('search_login','alpha'); $search_lastname=GETPOST('search_lastname','alpha');