]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'po_fixes' into 'master'
authorAndrew Dolgov <cthulhoo@gmail.com>
Sun, 17 Jan 2016 13:33:32 +0000 (16:33 +0300)
committerAndrew Dolgov <cthulhoo@gmail.com>
Sun, 17 Jan 2016 13:33:32 +0000 (16:33 +0300)
Fixes to .po files

There were a few minor problems in the .po files, mostly invalid headers. Nothing serious, but the fixes are also quite simple.

See merge request !24

classes/pref/prefs.php
include/functions.php
include/functions2.php
include/rssfuncs.php
include/version.php
plugins/af_psql_trgm/init.php
update.php

index b78aa4d62331bdae364fb85809cf0a5b60f9bbf2..1988649a5a0e7d6c74a5f13f71e49e609b3a3732 100644 (file)
@@ -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\">
index b928a030d5d766718fcedc6b43e0e5c5f26a9d22..b558b0e6c539004b0ee23a5fe061debe3c95f39b 100755 (executable)
                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;
 
index 63b11717e0774ab6600c3fb28cb8956cfc0ec3f8..92ed3f340bccf5ae6732c166d64929ac3bda2367 100755 (executable)
                        $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) {
index ad956cd2a587e073cc2289ff3990415e11f9ab72..fcecbf67069cf001e41da834513bab359734b2e0 100755 (executable)
                        // 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,
index 686da3517ee05a804379a396a488103874fb4213..dfef9da57a656329979ac3310f40e2e24555e589 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-       define('VERSION_STATIC', '15.7');
+       define('VERSION_STATIC', '16.1');
 
        function get_version() {
                date_default_timezone_set('UTC');
index f93f7c02b51614ddd944746c1621d9984c680015..521db4b85284f4e04589504914c402664abef09c 100644 (file)
@@ -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"]);
index 96097c56ad2e3675921f564b86651a954fb9a60e..54401f99acfbffd2476bb4594954b25771fa64c2 100755 (executable)
@@ -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";
 
 
        }
 
+       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"))