summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--[-rwxr-xr-x]include/functions.php16
-rwxr-xr-xinclude/sanity_check.php4
-rw-r--r--include/sessions.php2
3 files changed, 18 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index 3adeae924..6dc9990e8 100755..100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 137);
+ define('SCHEMA_VERSION', 138);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
@@ -1203,6 +1203,7 @@
"goto_fresh" => __("Fresh"),
"goto_marked" => __("Starred"),
"goto_published" => __("Published"),
+ "goto_read" => __("Recently read"),
"goto_tagcloud" => __("Tag cloud"),
"goto_prefs" => __("Preferences")),
__("Other") => array(
@@ -1269,6 +1270,7 @@
"g f" => "goto_fresh",
"g s" => "goto_marked",
"g p" => "goto_published",
+ "g r" => "goto_read",
"g t" => "goto_tagcloud",
"g P" => "goto_prefs",
"r" => "select_article_cursor",
@@ -1484,11 +1486,19 @@
}
if (count($search_query_leftover) > 0) {
- $search_query_leftover = $pdo->quote(implode(" & ", $search_query_leftover));
if (DB_TYPE == "pgsql") {
+
+ // if there's no joiners consider this a "simple" search and
+ // concatenate everything with &, otherwise don't try to mess with tsquery syntax
+ if (preg_match("/[&|]/", implode(" " , $search_query_leftover))) {
+ $tsquery = $pdo->quote(implode(" ", $search_query_leftover));
+ } else {
+ $tsquery = $pdo->quote(implode(" & ", $search_query_leftover));
+ }
+
array_push($query_keywords,
- "(tsvector_combined @@ to_tsquery($search_language, $search_query_leftover))");
+ "(tsvector_combined @@ to_tsquery($search_language, $tsquery))");
}
}
diff --git a/include/sanity_check.php b/include/sanity_check.php
index 654c83e38..f06cf0a39 100755
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -56,6 +56,10 @@
array_push($errors, "PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . ".");
}
+ if (!class_exists("UConverter")) {
+ array_push($errors, "PHP UConverter class is missing, it's provided by the Internationalization (intl) module.");
+ }
+
if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value.");
}
diff --git a/include/sessions.php b/include/sessions.php
index c27eb98b0..ca9f169d8 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -49,7 +49,7 @@
if ($_SESSION["uid"]) {
- if ($_SESSION["user_agent"] != sha1($_SERVER['HTTP_USER_AGENT'])) {
+ if (!defined('_SESSION_SKIP_UA_CHECKS') && $_SESSION["user_agent"] != sha1($_SERVER['HTTP_USER_AGENT'])) {
$_SESSION["login_error_msg"] = __("Session failed to validate (UA changed).");
return false;
}