summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.php28
-rw-r--r--modules/popup-dialog.php11
2 files changed, 35 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 1401cd744..0da69094a 100644
--- a/functions.php
+++ b/functions.php
@@ -3349,13 +3349,37 @@
$not = "";
}
- if (strpos($k, "@") === 0) {
+ $commandpair = split(":", mb_strtolower($k), 2);
+
+ if ($commandpair[0] == "note" && $commandpair[1]) {
+
+ if ($commandpair[1] == "true")
+ array_push($query_keywords, "($not (note IS NOT NULL AND note != ''))");
+ else
+ array_push($query_keywords, "($not (note IS NULL OR note = ''))");
+
+ } else if ($commandpair[0] == "star" && $commandpair[1]) {
+
+ if ($commandpair[1] == "true")
+ array_push($query_keywords, "($not (marked = true))");
+ else
+ array_push($query_keywords, "($not (marked = false))");
+
+ } else if ($commandpair[0] == "pub" && $commandpair[1]) {
+
+ if ($commandpair[1] == "true")
+ array_push($query_keywords, "($not (published = true))");
+ else
+ array_push($query_keywords, "($not (published = false))");
+
+ } else if (strpos($k, "@") === 0) {
$user_tz_string = get_pref($link, 'USER_TIMEZONE', $_SESSION['uid']);
$orig_ts = strtotime(substr($k, 1));
-
$k = date("Y-m-d", convert_timestamp($orig_ts, $user_tz_string, 'UTC'));
+ //$k = date("Y-m-d", strtotime(substr($k, 1)));
+
array_push($query_keywords, "(".SUBSTRING_FOR_DATE."(updated,1,LENGTH('$k')) $not = '$k')");
} else if ($match_on == "both") {
array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER('%$k%')
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 1f98edadb..2eb63af9d 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -421,8 +421,15 @@
print "</div>";
- print "<div class=\"dlgButtons\">
- <button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('searchDlg').execute()\">".__('Search')."</button>
+ print "<div class=\"dlgButtons\">";
+
+ if (!SPHINX_ENABLED) {
+ print "<div style=\"float : left\">
+ <a class=\"visibleLink\" target=\"_blank\" href=\"http://tt-rss.org/redmine/wiki/tt-rss/SearchSyntax\">Search syntax</a>
+ </div>";
+ }
+
+ print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('searchDlg').execute()\">".__('Search')."</button>
<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('searchDlg').hide()\">".__('Cancel')."</button>
</div>";
}