From faa3c5a8421c5ba4c21511b78899aeea19315dd4 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 11 Dec 2006 03:30:47 +0000 Subject: [PATCH] r1360: Saved searches are now fully implemented --- docs/changes.txt | 1 + docs/todo.txt | 1 - search.php | 12 ++++++++++++ templates/search.tpl | 9 ++++++++- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index ffeec6d..473e5ec 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -6,6 +6,7 @@ - Links in comments are now parsed if the user so desires (bug://report/2) - Components can now be displayed on the bug grid (bug://report/43) - Votes can now be displayed and sorted on the bug grid (bug://report/13) +- Users can save a search so they can rerun it at any time 1.1.4 =============================== diff --git a/docs/todo.txt b/docs/todo.txt index fb0979d..7af45f8 100755 --- a/docs/todo.txt +++ b/docs/todo.txt @@ -6,7 +6,6 @@ SVN: $Id$ BUGDAR 1.2 - Mark products/versions as obsolete so bugs cannot be filed against them -- Have a favourite queries list - Mass updates and deletes - Importing from other bug systems (bug://report/41) - Workflow interface diff --git a/search.php b/search.php index 70b4939..4b4ee58 100644 --- a/search.php +++ b/search.php @@ -379,6 +379,18 @@ if ($_REQUEST['do'] == 'search') $select['status'] = construct_datastore_select('status', 'status', 'statusid'); $select['resolution'] = construct_datastore_select('resolution', 'resolution', 'resolutionid'); + $searches = ''; + if ($bugsys->userinfo['userid']) + { + $searchesFetch = $db->query("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NOT NULL AND userid = " . $bugsys->userinfo['userid']); + while ($search = $db->fetch_array($searchesFetch)) + { + $value = $search['searchid']; + $label = $search['name']; + eval('$searches .= "' . $template->fetch('selectoption') . '";'); + } + } + $select['dev'] = ''; foreach ($bugsys->datastore['assignto'] AS $dev) { diff --git a/templates/search.tpl b/templates/search.tpl index de12897..0fcead1 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -11,7 +11,14 @@ $headinclude $header -

{@"Any fields left blank or unselected will be excluded from the search query"}

+ +
+{@"Run Saved Search"}: + +
+
+ +

{@"Any fields left blank or unselected will be excluded from the search query."}

-- 2.43.5