Fix filter criteria when using backto for events
This commit is contained in:
parent
133e736801
commit
67ed1e0841
@ -1291,7 +1291,7 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
$linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
||||||
$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Link to other agenda views
|
// Link to other agenda views
|
||||||
$out='';
|
$out='';
|
||||||
|
|||||||
@ -1209,9 +1209,10 @@ class ActionComm extends CommonObject
|
|||||||
* @param string $option ''=Link to action, 'birthday'=Link to contact
|
* @param string $option ''=Link to action, 'birthday'=Link to contact
|
||||||
* @param int $overwritepicto 1=Overwrite picto
|
* @param int $overwritepicto 1=Overwrite picto
|
||||||
* @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,$maxlength=0,$classname='',$option='',$overwritepicto=0, $notooltip=0)
|
function getNomUrl($withpicto=0, $maxlength=0, $classname='', $option='', $overwritepicto=0, $notooltip=0, $save_lastsearch_value=-1)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user, $hookmanager, $action;
|
global $conf, $langs, $user, $hookmanager, $action;
|
||||||
|
|
||||||
@ -1275,6 +1276,13 @@ class ActionComm extends CommonObject
|
|||||||
$url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id;
|
||||||
else
|
else
|
||||||
$url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
|
||||||
|
if ($option !== 'nolink')
|
||||||
|
{
|
||||||
|
// 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';
|
||||||
|
}
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a href="'.$url.'"';
|
||||||
$linkstart.=$linkclose.'>';
|
$linkstart.=$linkclose.'>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user