From 75cc0e7065e0b35c0b22613068dfe0d37985b2f9 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 27 May 2012 22:57:08 +0000 Subject: [PATCH] Fix problem with return button: the query must be saved --- include/action.common.inc.php | 2 +- include/action.inc.php | 2 +- include/class_follow_up.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/action.common.inc.php b/include/action.common.inc.php index 07974f675..68831c1b3 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -381,7 +381,7 @@ $str_ag_dest=$ag_dest->input(); // if a query is request build the sql stmt $query="and (ag_title ~* '".sql_string($_REQUEST['query'])."' ". "or ag_ref ='".trim(sql_string($_REQUEST['query'])). - "' or ag_comment ~* '".trim(sql_string($_REQUEST['query']))."'". + "' or ag_id in (select ag_id from action_gestion_comment where agc_comment ~* '".trim(sql_string($_REQUEST['query']))."')". ")"; } diff --git a/include/action.inc.php b/include/action.inc.php index 44d92107a..a2044e29f 100644 --- a/include/action.inc.php +++ b/include/action.inc.php @@ -23,7 +23,7 @@ */ require_once('class_ipopup.php'); global $g_user; -$retour=HtmlInput::button_anchor(_('Retour liste'),'?ac='.$_REQUEST['ac'].'&my_action&'.dossier::get()."&".HtmlInput::get_to_string(array("qcode","ag_dest","query","tdoc","date_start","date_end","see_all","all_action"))); +$retour=HtmlInput::button_anchor(_('Retour liste'),HtmlInput::get_to_string(array("ac","gDossier","qcode","ag_dest","query","tdoc","date_start","date_end","see_all","all_action")).'&my_action'); //----------------------------------------------------- // Follow_Up //----------------------------------------------------- diff --git a/include/class_follow_up.php b/include/class_follow_up.php index b0100a750..1ea64e587 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -671,7 +671,7 @@ class Follow_Up { $str_dossier=dossier::get(); // for the sort - $url="?".$str_dossier.'&'.$p_base."&".HtmlInput::get_to_string(array("qcode","ag_dest","query","tdoc","date_start","date_end","see_all","all_action")); + $url=HtmlInput::get_to_string(array("qcode","ag_dest","query","tdoc","date_start","date_end","see_all","all_action")).$str_dossier.'&'.$p_base; $table=new Sort_Table(); $table->add('Date',$url,'order by ag_timestamp asc','order by ag_timestamp desc','da','dd'); @@ -749,7 +749,7 @@ class Follow_Up //show the sub_action foreach ($a_row as $row ) { - $href=''; + $href=''; $i++; $tr=($i%2==0)?'even':'odd'; if ($row['ag_priority'] < 2) $tr='priority1';