FIX #23914 search_all
This commit is contained in:
parent
a405bccb61
commit
3c3d221370
@ -65,7 +65,7 @@ $search_desc = GETPOST('search_desc', 'alpha');
|
|||||||
$search_projet_ref = GETPOST('search_projet_ref', 'alpha');
|
$search_projet_ref = GETPOST('search_projet_ref', 'alpha');
|
||||||
$search_contrat_ref = GETPOST('search_contrat_ref', 'alpha');
|
$search_contrat_ref = GETPOST('search_contrat_ref', 'alpha');
|
||||||
$search_status = GETPOST('search_status', 'alpha');
|
$search_status = GETPOST('search_status', 'alpha');
|
||||||
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
|
|
||||||
@ -310,8 +310,8 @@ if (empty($user->rights->societe->client->voir) && empty($socid)) {
|
|||||||
if ($socid) {
|
if ($socid) {
|
||||||
$sql .= " AND s.rowid = ".((int) $socid);
|
$sql .= " AND s.rowid = ".((int) $socid);
|
||||||
}
|
}
|
||||||
if ($sall) {
|
if ($search_all) {
|
||||||
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||||
}
|
}
|
||||||
// Add where from extra fields
|
// Add where from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||||
@ -320,7 +320,7 @@ $parameters = array();
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
// Add GroupBy from hooks
|
// Add GroupBy from hooks
|
||||||
$parameters = array('search_all' => $sall, 'fieldstosearchall' => $fieldstosearchall);
|
$parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
@ -395,8 +395,8 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
|||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
if ($sall) {
|
if ($search_all) {
|
||||||
$param .= "&sall=".urlencode($sall);
|
$param .= "&search_all=".urlencode($search_all);
|
||||||
}
|
}
|
||||||
if ($socid) {
|
if ($socid) {
|
||||||
$param .= "&socid=".urlencode($socid);
|
$param .= "&socid=".urlencode($socid);
|
||||||
@ -470,11 +470,11 @@ $objecttmp = new Fichinter($db);
|
|||||||
$trackid = 'int'.$object->id;
|
$trackid = 'int'.$object->id;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
|
|
||||||
if ($sall) {
|
if ($search_all) {
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
}
|
}
|
||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>';
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user