From 628583995e3be96a346a9c078a41cf5ee0eab238 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 15 Nov 2009 20:53:57 +0000 Subject: [PATCH] All *_list() functions now return html code instead direct display, *_list_cells() and *_list_row() work as before. --- includes/ui/ui_lists.inc | 363 +++++++++++++++++---------------------- 1 file changed, 157 insertions(+), 206 deletions(-) diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index a68454cf..b9ef39d5 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -249,11 +249,11 @@ $opts = array( // default options } } default_focus(($search_box && $by_id) ? $search_box : $name); - $str = $selector; + if ($search_box && $opts['cells']) - echo ($edit_entry!='' ? "$edit_entry" : '')."$selector"; + $str = ($edit_entry!='' ? "$edit_entry" : '')."$selector"; else - echo $edit_entry.$selector; + $str = $edit_entry.$selector; return $str; } @@ -335,8 +335,8 @@ $opts = array( // default options . $selector; } - if ($found === false) { - $selected_id[] = $first_id; + if ($found===false) { + $selected_id = array($first_id); } $_POST[$name] = $multi ? $selected_id : $selected_id[0]; $selector = "