}
}
+ // TODO: should this support POST requests or not? idk
+
if (!$post_query && $timestamp) {
$context = stream_context_create(array(
'http' => array(
'method' => 'GET',
+ 'timeout' => $timeout ? $timeout : FILE_FETCH_TIMEOUT,
'protocol_version'=> 1.1,
'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp)
)));
$context = stream_context_create(array(
'http' => array(
'method' => 'GET',
+ 'timeout' => $timeout ? $timeout : FILE_FETCH_TIMEOUT,
'protocol_version'=> 1.1
)));
}
"SELECT id FROM ttrss_feeds
WHERE feed_url = '$url' AND owner_uid = ".$_SESSION["uid"]);
- if (strlen(FEED_CRYPT_KEY) > 0) {
- require_once "crypt.php";
- $auth_pass = substr(encrypt_string($auth_pass), 0, 250);
- $auth_pass_encrypted = 'true';
- } else {
- $auth_pass_encrypted = 'false';
- }
-
+ $auth_pass_encrypted = 'false';
$auth_pass = db_escape_string($auth_pass);
if (db_num_rows($result) == 0) {
set_basic_feed_info($feed_id);
}
- return array("code" => 1, "feed_id" => $feed_id);
+ return array("code" => 1, "feed_id" => (int) $feed_id);
} else {
- return array("code" => 0, "feed_id" => db_fetch_result($result, 0, "id"));
+ return array("code" => 0, "feed_id" => (int) db_fetch_result($result, 0, "id"));
}
}