From 1d549d1dcc8b88111a6a484e8e16cddb5fe9525d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 22 Oct 2008 06:51:01 +0000 Subject: [PATCH] "fix for bug #1467: sorting get lost using green close icon" --- infolog/inc/class.infolog_ui.inc.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 954415a11f..c9bce8e8bf 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -294,7 +294,7 @@ class infolog_ui */ function get_rows(&$query,&$rows,&$readonlys) { - //echo "

infolog_ui.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).")

\n"; + //echo "

infolog_ui.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).",sort=$query[sort],order=$query[order])

\n"; if (!isset($query['start'])) $query['start'] = 0; if (!$query['csv_export']) @@ -486,7 +486,7 @@ class infolog_ui unset($session); } } - //echo "

infolog_ui::index(action='$action/$action_id',called_as='$called_as/$values[referer]',own_referer='$own_referer') values=\n"; _debug_array($values); + //echo "

".__METHOD__."(action='$action/$action_id',called_as='$called_as/$values[referer]',own_referer='$own_referer') values=\n"; _debug_array($values); if (!is_array($values)) { $values = array('nm' => $this->read_sessiondata()); @@ -624,7 +624,10 @@ class infolog_ui $persist['called_as'] = $called_as; $persist['own_referer'] = $own_referer; $values['nm']['csv_fields'] = true; // get set in get_rows to not include all custom fields - + $persist['nm'] = array( + 'sort' => $values['nm']['sort'], + 'order' => $values['nm']['order'], + ); if (!$called_as) { $GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => 'ManualInfologIndex'); @@ -638,8 +641,15 @@ class infolog_ui ),$readonlys,$persist,$return_html ? -1 : 0); } + /** + * Closes an infolog + * + * @param int|array $values=0 info_id (default _GET[info_id]) + * @param string $referer='' + */ function close($values=0,$referer='') { + //echo "

".__METHOD__."($values,$referer)

\n"; $info_id = (int) (is_array($values) ? $values['info_id'] : ($values ? $values : $_GET['info_id'])); $referer = is_array($values) ? $values['referer'] : $referer; @@ -665,6 +675,13 @@ class infolog_ui if ($referer) $this->tmpl->location($referer); } + /** + * Deletes an InfoLog entry + * + * @param array|int $values=0 info_id (default _GET[info_id]) + * @param string $referer='' + * @param string $called_by='' + */ function delete($values=0,$referer='',$called_by='') { $info_id = (int) (is_array($values) ? $values['info_id'] : ($values ? $values : $_GET['info_id']));