curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_REFERER, $url);
- curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
+
+ if (!ini_get("safe_mode") && !ini_get("open_basedir")) {
+ curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
+ }
if (defined('_CURL_HTTP_PROXY')) {
curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);
if (SINGLE_USER_MODE) {
@session_start();
authenticate_user("admin", null);
+ startup_gettext();
load_user_plugins($_SESSION["uid"]);
} else {
if (!validate_session()) $_SESSION["uid"] = false;
db_query("UPDATE ttrss_user_entries
SET unread = false,last_read = NOW() WHERE (SELECT COUNT(*)
- FROM ttrss_user_labels2 WHERE article_id = ref_id) > 0
- AND unread = true AND $date_qpart AND owner_uid = $owner_uid");
+ FROM ttrss_user_labels2, ttrss_entries WHERE article_id = ref_id AND id = ref_id AND $date_qpart) > 0
+ AND unread = true AND owner_uid = $owner_uid");
}
} else if ($feed > 0) {
$from_where = "ttrss_entries.id = ttrss_user_entries.ref_id AND";
} else {
$from_qpart = "ttrss_user_entries";
+ $from_where = "";
}
$query = "SELECT count(int_id) AS unread
$search_query_part = "";
- $keywords = explode(" ", $search);
+ $keywords = str_getcsv($search, " ");
$query_keywords = array();
$search_words = array();
}
- $content_query_part = "content, content AS content_preview, ";
+ $content_query_part = "content, ";
if (is_numeric($feed)) {