Fix restore of last_search_value ko
This commit is contained in:
parent
0486a18972
commit
0805c693ae
@ -579,9 +579,10 @@ class Task extends CommonObject
|
|||||||
* @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string
|
* @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string
|
||||||
* @param string $sep Separator between ref and label if option addlabel is set
|
* @param string $sep Separator between ref and label if option addlabel is set
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='',$mode='task', $addlabel=0, $sep=' - ', $notooltip=0)
|
function getNomUrl($withpicto=0,$option='',$mode='task', $addlabel=0, $sep=' - ', $notooltip=0, $save_lastsearch_value=-1)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
@ -599,6 +600,10 @@ class Task extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option=='withproject'?'&withproject=1':'');
|
$url = DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option=='withproject'?'&withproject=1':'');
|
||||||
|
// Add param to save lastsearch_values or not
|
||||||
|
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||||
|
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
|
||||||
|
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
|
||||||
|
|
||||||
$linkclose = '';
|
$linkclose = '';
|
||||||
if (empty($notooltip))
|
if (empty($notooltip))
|
||||||
|
|||||||
@ -193,7 +193,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Project card
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Title
|
// Title
|
||||||
|
|||||||
@ -136,7 +136,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
// Project card
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Title
|
// Title
|
||||||
|
|||||||
@ -115,7 +115,7 @@ if ($object->id > 0)
|
|||||||
$param=($mode=='mine'?'&mode=mine':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
// Project card
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Title
|
// Title
|
||||||
|
|||||||
@ -227,7 +227,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Project card
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Title
|
// Title
|
||||||
@ -430,7 +430,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
* Fiche tache en mode visu
|
* Fiche tache en mode visu
|
||||||
*/
|
*/
|
||||||
$param=($withproject?'&withproject=1':'');
|
$param=($withproject?'&withproject=1':'');
|
||||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
|
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'&restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>':'';
|
||||||
|
|
||||||
dol_fiche_head($head, 'task_task', $langs->trans("Task"), -1, 'projecttask');
|
dol_fiche_head($head, 'task_task', $langs->trans("Task"), -1, 'projecttask');
|
||||||
|
|
||||||
|
|||||||
@ -311,7 +311,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
|
|
||||||
// Project card
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Title
|
// Title
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user