mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 16:12:39 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict Conflicts: htdocs/install/mysql/migration/6.0.0-7.0.0.sql
This commit is contained in:
@@ -309,12 +309,25 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
||||
// Else, retreive default values if we are not doing a sort
|
||||
elseif (! isset($_GET['sortfield']) && ! empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_ENABLE_DEFAULT_VALUES is not set
|
||||
{
|
||||
if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
{
|
||||
if (! empty($user->default_values)) // $user->default_values defined from menu default values
|
||||
{
|
||||
//var_dump($user->default_values[$relativepathstring]['createform']);
|
||||
if (isset($user->default_values[$relativepathstring]['createform'][$paramname])) $out = $user->default_values[$relativepathstring]['createform'][$paramname];
|
||||
$qualified=1;
|
||||
if (isset($user->default_values[$relativepathstring]['createform_queries'])) // Even if paramname is sortfield, data are stored into ['sortorder...']
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $user->default_values[$relativepathstring]['createform_queries']);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $qualified=0;
|
||||
}
|
||||
}
|
||||
if ($qualified)
|
||||
{
|
||||
//var_dump($user->default_values[$relativepathstring]['createform']);
|
||||
if (isset($user->default_values[$relativepathstring]['createform'][$paramname])) $out = $user->default_values[$relativepathstring]['createform'][$paramname];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Management of default search_filters and sort order
|
||||
@@ -330,7 +343,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
||||
if (isset($user->default_values[$relativepathstring]['sortorder_queries'])) // Even if paramname is sortfield, data are stored into ['sortorder...']
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $user->default_values[$relativepathstring]['sortorder_queries']);
|
||||
$tmpqueryarraywehave=explode('&', $_SERVER['QUERY_STRING']);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $qualified=0;
|
||||
@@ -355,7 +368,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
||||
if (isset($user->default_values[$relativepathstring]['sortorder_queries']))
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $user->default_values[$relativepathstring]['sortorder_queries']);
|
||||
$tmpqueryarraywehave=explode('&', $_SERVER['QUERY_STRING']);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $qualified=0;
|
||||
@@ -380,7 +393,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
||||
if (isset($user->default_values[$relativepathstring]['filters_queries']))
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $user->default_values[$relativepathstring]['filters_queries']);
|
||||
$tmpqueryarraywehave=explode('&', $_SERVER['QUERY_STRING']);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $qualified=0;
|
||||
@@ -3596,8 +3609,8 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
|
||||
// Right
|
||||
print '<td class="nobordernopadding valignmiddle" align="right">';
|
||||
if ($sortfield) $options .= "&sortfield=".$sortfield;
|
||||
if ($sortorder) $options .= "&sortorder=".$sortorder;
|
||||
if ($sortfield) $options .= "&sortfield=".$sortfield;
|
||||
if ($sortorder) $options .= "&sortorder=".$sortorder;
|
||||
// Show navigation bar
|
||||
$pagelist = '';
|
||||
if ($savlimit != 0 && ($page > 0 || $num > $limit))
|
||||
|
||||
Reference in New Issue
Block a user