X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=include%2Ffunctions.php;h=a8fc9fbe511d10e1aa1ca15e966792c43a763465;hb=cf0231f9d1f0ffdcb5b5638b5502cab48f6f4c1e;hp=37efefbcaf351e1fb62b24ca2fd41587e0f7b07d;hpb=97b7d5c0380ac0fdc846306689d3d8015b6b6e62;p=tt-rss.git diff --git a/include/functions.php b/include/functions.php index 37efefbc..a8fc9fbe 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1,6 +1,6 @@ "Detect automatically", + "da_DA" => "Dansk", "ca_CA" => "Català", "cs_CZ" => "Česky", "en_US" => "English", - "es_ES" => "Español", + "el_GR" => "Ελληνικά", + "es_ES" => "Español (España)", + "es_LA" => "Español", "de_DE" => "Deutsch", "fr_FR" => "Français", "hu_HU" => "Magyar (Hungarian)", @@ -78,6 +82,7 @@ "pl_PL" => "Polski", "ru_RU" => "Русский", "pt_BR" => "Portuguese/Brazil", + "pt_PT" => "Portuguese/Portugal", "zh_CN" => "Simplified Chinese", "zh_TW" => "Traditional Chinese", "sv_SE" => "Svenska", @@ -344,6 +349,7 @@ global $fetch_last_error; global $fetch_last_error_code; + global $fetch_last_error_content; global $fetch_last_content_type; global $fetch_curl_used; @@ -380,7 +386,7 @@ curl_setopt($ch, CURLOPT_USERAGENT, $useragent ? $useragent : SELF_USER_AGENT); curl_setopt($ch, CURLOPT_ENCODING, ""); - curl_setopt($ch, CURLOPT_REFERER, $url); + //curl_setopt($ch, CURLOPT_REFERER, $url); if (!ini_get("safe_mode") && !ini_get("open_basedir")) { curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null"); @@ -426,6 +432,7 @@ } else { $fetch_last_error = "HTTP Code: $http_code"; } + $fetch_last_error_content = $contents; curl_close($ch); return false; } @@ -1000,6 +1007,7 @@ function sanity_check() { require_once 'errors.php'; + global $ERRORS; $error_code = 0; $schema_version = get_schema_version(true); @@ -1198,7 +1206,7 @@ SET unread = false, last_read = NOW() WHERE ref_id IN (SELECT id FROM (SELECT id FROM ttrss_entries, ttrss_user_entries WHERE ref_id = id - AND owner_uid = $owner_uid AND unread = true AND $date_qpart AND $match_part) as tmp)"); + AND owner_uid = $owner_uid AND score >= 0 AND unread = true AND $date_qpart AND $match_part) as tmp)"); } if ($feed == -4) { @@ -1685,6 +1693,10 @@ return array("code" => 5, "message" => $fetch_last_error); } + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) { + $contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass); + } + if (is_html($contents)) { $feedUrls = get_feeds_from_html($url, $contents);