From 63d34061a2edf233a43b0f5b0f8f7f9fdd7177e8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 9 Jul 2008 19:42:28 -0400 Subject: add notice search rss ("tracking") darcs-hash:20080709234228-84dde-f24d277947ab49031a1b6d74184568fe2f50a685.gz --- lib/searchaction.php | 12 ++++++++++-- lib/util.php | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/searchaction.php b/lib/searchaction.php index bf598ea93..a9fb77fd3 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -26,7 +26,10 @@ class SearchAction extends Action { $this->show_form(); } - function show_top($error=NULL) { + function show_top($arr=NULL) { + if ($arr) { + $error = $arr[1]; + } if ($error) { common_element('p', 'error', $error); } else { @@ -42,12 +45,17 @@ class SearchAction extends Action { function get_title() { return NULL; } + + function show_header($arr) { + return; + } function show_form($error=NULL) { $q = $this->trimmed('q'); $page = $this->trimmed('page', 1); - common_show_header($this->get_title(), NULL, $error, array($this, 'show_top')); + common_show_header($this->get_title(), array($this, 'show_header'), array($q, $error), + array($this, 'show_top')); common_element_start('form', array('method' => 'post', 'id' => 'login', 'action' => common_local_url($this->trimmed('action')))); diff --git a/lib/util.php b/lib/util.php index d86cc5e4c..7627cafdc 100644 --- a/lib/util.php +++ b/lib/util.php @@ -778,6 +778,8 @@ function common_fancy_url($action, $args=NULL) { return common_path('search/people' . (($args) ? ('?' . http_build_query($args)) : '')); case 'noticesearch': return common_path('search/notice' . (($args) ? ('?' . http_build_query($args)) : '')); + case 'noticesearchrss': + return common_path('search/notice/rss' . (($args) ? ('?' . http_build_query($args)) : '')); default: return common_simple_url($action, $args); } -- cgit v1.2.3-54-g00ecf