summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/pref/prefs.php4
-rwxr-xr-xinclude/functions.php2
-rwxr-xr-xinclude/functions2.php3
-rwxr-xr-xinclude/rssfuncs.php5
-rw-r--r--include/version.php2
-rw-r--r--plugins/af_psql_trgm/init.php3
-rwxr-xr-xupdate.php17
7 files changed, 31 insertions, 5 deletions
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index b78aa4d62..1988649a5 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -709,6 +709,10 @@ class Pref_Prefs extends Handler_Protected {
print_notice(__("Download more plugins at tt-rss.org <a class=\"visibleLink\" target=\"_blank\" href=\"http://tt-rss.org/forum/viewforum.php?f=22\">forums</a> or <a target=\"_blank\" class=\"visibleLink\" href=\"http://tt-rss.org/wiki/Plugins\">wiki</a>."));
+ if (ini_get("open_basedir") && function_exists("curl_init") && !defined("NO_CURL")) {
+ print_warning("Your PHP configuration has open_basedir restrictions enabled. Some plugins relying on CURL for functionality may not work correctly.");
+ }
+
print "<form dojoType=\"dijit.form.Form\" id=\"changePluginsForm\">";
print "<script type=\"dojo/method\" event=\"onSubmit\" args=\"evt\">
diff --git a/include/functions.php b/include/functions.php
index b928a030d..b558b0e6c 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -347,7 +347,7 @@
if (strpos($url, "//") === 0)
$url = 'http:' . $url;
- if (!defined('NO_CURL') && function_exists('curl_init')) {
+ if (!defined('NO_CURL') && function_exists('curl_init') && !ini_get("open_basedir")) {
$fetch_curl_used = true;
diff --git a/include/functions2.php b/include/functions2.php
index 63b11717e..92ed3f340 100755
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -1121,7 +1121,8 @@
$result = db_query("SELECT tag_cache FROM ttrss_user_entries
WHERE ref_id = '$id' AND owner_uid = $owner_uid");
- $tag_cache = db_fetch_result($result, 0, "tag_cache");
+ if (db_num_rows($result) != 0)
+ $tag_cache = db_fetch_result($result, 0, "tag_cache");
}
if ($tag_cache) {
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index ad956cd2a..fcecbf670 100755
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -399,6 +399,11 @@
// fetch feed from source
if (!$feed_data) {
_debug("fetching [$fetch_url]...", $debug_enabled);
+
+ if (ini_get("open_basedir") && function_exists("curl_init")) {
+ _debug("not using CURL due to open_basedir restrictions");
+ }
+
_debug("If-Modified-Since: ".gmdate('D, d M Y H:i:s \G\M\T', $last_article_timestamp), $debug_enabled);
$feed_data = fetch_file_contents($fetch_url, false,
diff --git a/include/version.php b/include/version.php
index 686da3517..dfef9da57 100644
--- a/include/version.php
+++ b/include/version.php
@@ -1,5 +1,5 @@
<?php
- define('VERSION_STATIC', '15.7');
+ define('VERSION_STATIC', '16.1');
function get_version() {
date_default_timezone_set('UTC');
diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php
index f93f7c02b..521db4b85 100644
--- a/plugins/af_psql_trgm/init.php
+++ b/plugins/af_psql_trgm/init.php
@@ -263,10 +263,9 @@ class Af_Psql_Trgm extends Plugin {
$similarity = (float) $this->host->get($this, "similarity");
if ($similarity < 0.01) return $article;
- $min_title_length = (int) $this->host->get($this, "min_length");
+ $min_title_length = (int) $this->host->get($this, "min_title_length");
if (mb_strlen($article["title"]) < $min_title_length) return $article;
-
$owner_uid = $article["owner_uid"];
$entry_guid = $article["guid_hashed"];
$title_escaped = db_escape_string($article["title"]);
diff --git a/update.php b/update.php
index 96097c56a..54401f99a 100755
--- a/update.php
+++ b/update.php
@@ -35,6 +35,9 @@
"force-update",
"gen-search-idx",
"list-plugins",
+ "debug-feed:",
+ "force-refetch",
+ "force-rehash",
"help");
foreach (PluginHost::getInstance()->get_commands() as $command => $data) {
@@ -85,6 +88,9 @@
print " --convert-filters - convert type1 filters to type2\n";
print " --force-update - force update of all feeds\n";
print " --list-plugins - list all available plugins\n";
+ print " --debug-feed N - perform debug update of feed N\n";
+ print " --force-refetch - debug update: force refetch feed data\n";
+ print " --force-rehash - debug update: force rehash articles\n";
print " --help - show this help\n";
print "Plugin options:\n";
@@ -385,6 +391,17 @@
}
+ if (isset($options["debug-feed"])) {
+ $feed = $options["debug-feed"];
+
+ if (isset($options["force-refetch"])) $_REQUEST["force_refetch"] = true;
+ if (isset($options["force-rehash"])) $_REQUEST["force_rehash"] = true;
+
+ $_REQUEST['xdebug'] = 1;
+
+ update_rss_feed($feed);
+ }
+
PluginHost::getInstance()->run_commands($options);
if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))