<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 123);
+ define('SCHEMA_VERSION', 126);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
$fetch_last_error = false;
$fetch_last_error_code = false;
$fetch_last_content_type = false;
+ $fetch_last_error_content = false; // curl only for the time being
$fetch_curl_used = false;
$suppress_debugging = false;
function get_translations() {
$tr = array(
"auto" => "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)",
"pl_PL" => "Polski",
"ru_RU" => "Русский",
"pt_BR" => "Portuguese/Brazil",
+ "pt_PT" => "Portuguese/Portugal",
"zh_CN" => "Simplified Chinese",
"zh_TW" => "Traditional Chinese",
"sv_SE" => "Svenska",
global $fetch_last_error;
global $fetch_last_error_code;
+ global $fetch_last_error_content;
global $fetch_last_content_type;
global $fetch_curl_used;
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");
} else {
$fetch_last_error = "HTTP Code: $http_code";
}
+ $fetch_last_error_content = $contents;
curl_close($ch);
return false;
}
function sanity_check() {
require_once 'errors.php';
+ global $ERRORS;
$error_code = 0;
$schema_version = get_schema_version(true);
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) {
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);