<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 125);
+ 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",
+ "ar_SA" => "العربيّة (Arabic)",
"da_DA" => "Dansk",
"ca_CA" => "Català",
"cs_CZ" => "Česky",
global $fetch_last_error;
global $fetch_last_error_code;
+ global $fetch_last_error_content;
global $fetch_last_content_type;
global $fetch_curl_used;
+ $url = ltrim($url, ' ');
$url = str_replace(' ', '%20', $url);
if (!defined('NO_CURL') && function_exists('curl_init')) {
$fetch_curl_used = true;
- if (ini_get("safe_mode") || ini_get("open_basedir")) {
+ if (ini_get("safe_mode") || ini_get("open_basedir") || defined("FORCE_GETURL")) {
$new_url = geturl($url);
if (!$new_url) {
// geturl has already populated $fetch_last_error
} else {
$fetch_last_error = "HTTP Code: $http_code";
}
+ $fetch_last_error_content = $contents;
curl_close($ch);
return false;
}
$url = key($feedUrls);
}
- /* libxml_use_internal_errors(true);
- $doc = new DOMDocument();
- $doc->loadXML($contents);
- $error = libxml_get_last_error();
- libxml_clear_errors();
-
- if ($error) {
- $error_message = format_libxml_error($error);
-
- return array("code" => 6, "message" => $error_message);
- } */
-
if ($cat_id == "0" || !$cat_id) {
$cat_qpart = "NULL";
} else {
function getFeedTitle($id, $cat = false) {
if ($cat) {
return getCategoryTitle($id);
- } else if ($id == 0) {
- return __("All feeds");
} else if ($id == -1) {
return __("Starred articles");
} else if ($id == -2) {