From 6c2a16c7db41561333b885ed97bf7fbeab2c5db3 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 28 Jun 2012 13:46:25 +0000 Subject: [PATCH] Improve comment, remove todo --- include/action.common.inc.php | 6 +++--- include/class_acc_ledger.php | 4 ---- include/class_follow_up.php | 21 +++++++++++++-------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/include/action.common.inc.php b/include/action.common.inc.php index 3a8abc7ae..64d86a8d2 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -181,7 +181,7 @@ if ($sub_action == 'delete') if ($g_user->can_write_action($_REQUEST['ag_id'])==true) $act->remove(); $sub_action = "list"; $cn->commit(); - Follow_Up::ShowActionList($cn, $base); + Follow_Up::show_action_list($cn, $base); if (isset($act->ag_ref)) echo hb(_('Action ') . $act->ag_ref . _(' effacée')); exit(); @@ -191,7 +191,7 @@ if ($sub_action == 'delete') // Show a list of the action if ($sub_action == "list") { - Follow_Up::ShowActionList($cn, $base); + Follow_Up::show_action_list($cn, $base); // Add a button to export to Csv echo '
'; echo HtmlInput::request_to_hidden(array("remind_date_end","remind_date","sag_ref", "remind_date","only_internal", "state", "gDossier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query", @@ -244,7 +244,7 @@ if ($sub_action == "save_action_st2") $url = "?$base&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get(); echo '

' . hb('Action Sauvée : ' . $act->ag_ref) . '

'; - Follow_Up::ShowActionList($cn,$base); + Follow_Up::show_action_list($cn,$base); $url = "?$base&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get(); echo '

' . hb('Action Sauvée : ' . $act->ag_ref) . '

'; } diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 529504c1b..e1feb01c6 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -321,10 +321,6 @@ class Acc_Ledger extends jrn_def_sql $sql = "delete from stock_goods where sg_id = any ( select sg_id from stock_goods natural join jrnx where j_grpt=" . $this->jr_grpt_id . ")"; $Res = $this->db->exec_sql($sql); - /** - * @function - * @todo remove also from ANC */ - // Check return code if ($Res == false) throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]")); } diff --git a/include/class_follow_up.php b/include/class_follow_up.php index d32317979..68919f5d1 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -1013,7 +1013,10 @@ class Follow_Up $array = $this->db->get_array($sql); return $array; } - + /** + * get the action where the remind day is today + * @return array + */ function get_today() { $sql = "select coalesce(vw_name,'Interne') as vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp " . @@ -1146,8 +1149,12 @@ class Follow_Up // show the action in require_once 'template/action_search.php'; } - - static function ShowActionList($cn, $p_base) + /** + *@brief show a list of actions + * @param $cn database connextion + * @param $p_base base URL + */ + static function show_action_list($cn, $p_base) { Follow_Up::display_search($cn); @@ -1177,11 +1184,9 @@ class Follow_Up extract($p_array); $query = ""; - /** - *@todo check why we need to use $_REQUEST['query'] - * instead of $_GET['query'] - */ - if (isset($_REQUEST['query'])) + + + if (isset($_REQUEST['query'])) { // if a query is request build the sql stmt $query = "and (ag_title ~* '" . sql_string($_REQUEST['query']) . "' " .