Index: plugins/special_page/special_search/deki_logged_search.php
===================================================================
--- plugins/special_page/special_search/deki_logged_search.php (revision 19473)
+++ plugins/special_page/special_search/deki_logged_search.php (working copy)
@@ -147,8 +147,10 @@
/**
* Generate the constraints for the query
* @return string
+ * @TODO guerrics (from royk) - this doesn't feel right making this public. but i'm not sure how else the controller gets this
+ * - see special_search.php
*/
- protected function getConstraints()
+ public function getConstraints()
{
$constraints = array();
Index: plugins/special_page/special_search/search.css
===================================================================
--- plugins/special_page/special_search/search.css (revision 19473)
+++ plugins/special_page/special_search/search.css (working copy)
@@ -10,7 +10,7 @@
}
.deki-search-form ul.sortby {
display: inline;
- margin: 0;
+ margin: 0 0 0 8px;
padding: 0;
}
.deki-search-form span.sort,
@@ -25,8 +25,6 @@
}
.deki-search-form ul.sortby li a {
font-weight: bold;
- background: url(/skins/common/icons/sort-none.png) no-repeat center right;
- padding-right: 11px;
color: #888;
text-decoration: none;
}
@@ -36,13 +34,8 @@
.deki-search-form ul.sortby li.sort-asc a,
.deki-search-form ul.sortby li.sort-desc a {
color: #000;
+ border-bottom: 2px solid #000;
}
-.deki-search-form ul.sortby li.sort-asc a {
- background: url(/skins/common/icons/sort-desc.png) no-repeat center right;
-}
-.deki-search-form ul.sortby li.sort-desc a {
- background: url(/skins/common/icons/sort-asc.png) no-repeat center right;
-}
.deki-search-form div.inputs {
display: none;
}
@@ -193,7 +186,9 @@
}
.deki-pagination span.next,
-.deki-pagination span.last {
+.deki-pagination span.last,
+.deki-pagination span.first,
+.deki-pagination span.prev {
display: none;
}
Index: plugins/special_page/special_search/special_search.php
===================================================================
--- plugins/special_page/special_search/special_search.php (revision 19473)
+++ plugins/special_page/special_search/special_search.php (working copy)
@@ -234,7 +234,17 @@
$View->set('results.query', $query);
// rss href
- $View->set('href.subscribe', '/deki/gui/opensearch.php?q='.urlencode($query));
+ $constraints = $Search->getConstraints();
+ $params = array('q='.urlencode($query));
+ if (!empty($sort))
+ {
+ $params[] = 'sortby='.urlencode($sort);
+ }
+ if (!empty($constraints))
+ {
+ $params[] = 'constraint='.$constraints;
+ }
+ $View->set('href.subscribe', '/deki/gui/opensearch.php?'.implode('&', $params));
if ($language != self::OPTION_LANG_ALL)
{
Index: gui/opensearch.php
===================================================================
--- gui/opensearch.php (revision 19424)
+++ gui/opensearch.php (working copy)
@@ -10,12 +10,18 @@
{
global $wgDreamServer, $wgDekiApi, $wgRequest;
$type = $wgRequest->getVal('type');
+ $sortby = $wgRequest->getVal('sortby');
+ $constraint = $wgRequest->getVal('constraint');
if (!empty($type) && $type == 'description')
{
$Plug = new Plug($wgDreamServer, null);
$scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? 'https': 'http';
- $r = $Plug->At($wgDekiApi)->At('site', 'opensearch', 'description')->With('dream.in.scheme', $scheme)->With('dream.in.host', $_SERVER['HTTP_HOST'])->Get();
+ $r = $Plug->At($wgDekiApi)
+ ->At('site', 'opensearch', 'description')
+ ->With('dream.in.scheme', $scheme)
+ ->With('dream.in.host', $_SERVER['HTTP_HOST'])
+ ->Get();
if ($r['status'] == 200)
{
header('Content-type: '.$r['type']);
@@ -29,7 +35,13 @@
if (!is_null($query))
{
$Plug = new Plug($wgDreamServer, null);
- $r = $Plug->At($wgDekiApi)->At('site', 'opensearch')->With('q', $query)->With('dream.in.host', $_SERVER['HTTP_HOST'])->Get();
+ $r = $Plug->At($wgDekiApi)
+ ->At('site', 'opensearch')
+ ->With('q', $query)
+ ->With('constraint', $constraint)
+ ->With('sortby', $sortby)
+ ->With('dream.in.host', $_SERVER['HTTP_HOST'])
+ ->Get();
if ($r['status'] == 200)
{
header('Content-type: '.$r['type']);
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by