+*~
+*.DS_Store
+#*
+.idea/*
config.php
icons/*
cache/*/*
case "view":
$id = db_escape_string($_REQUEST["id"]);
- $cids = split(",", db_escape_string($_REQUEST["cids"]));
+ $cids = explode(",", db_escape_string($_REQUEST["cids"]));
$mode = db_escape_string($_REQUEST["mode"]);
$omode = db_escape_string($_REQUEST["omode"]);
if ($mode == "") {
array_push($articles, format_article($link, $id, false));
} else if ($mode == "zoom") {
- array_push($articles, format_article($link, $id, false, true, true));
+ array_push($articles, format_article($link, $id, true, true));
} else if ($mode == "raw") {
if ($_REQUEST['html']) {
header("Content-Type: text/html");
$articles = array();
foreach ($topmost_article_ids as $id) {
- array_push($articles, format_article($link, $id, $feed, false));
+ array_push($articles, format_article($link, $id, false));
}
$reply['articles'] = $articles;
return $contents;
} else {
- if ($login && $pass && $updated != 3) {
+ if ($login && $pass ){
$url_parts = array();
preg_match("/(^[^:]*):\/\/(.*)/", $url, $url_parts);
$cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
$fetch_url = db_fetch_result($result, 0, "feed_url");
- if ($update_interval < 0) { return; }
+ if ($update_interval < 0) { return false; }
$feed = db_escape_string($feed);
- if ($auth_login && $auth_pass && $updated != 3) {
+ if ($auth_login && $auth_pass ){
$url_parts = array();
preg_match("/(^[^:]*):\/\/(.*)/", $fetch_url, $url_parts);
foreach ($article_filters as $f) {
if ($f[0] == "tag") {
- $manual_tags = trim_array(split(",", $f[1]));
+ $manual_tags = trim_array(explode(",", $f[1]));
foreach ($manual_tags as $tag) {
if (tag_is_valid($tag)) {
// Skip boring tags
- $boring_tags = trim_array(split(",", mb_strtolower(get_pref($link,
+ $boring_tags = trim_array(explode(",", mb_strtolower(get_pref($link,
'BLACKLISTED_TAGS', $owner_uid, ''), 'utf-8')));
$filtered_tags = array();
function lookup_user_id($link, $user) {
- $result = db_query($link, "SELECT id FROM ttrss_users WHERE
- login = '$login'");
+ $result = db_query($link, "SELECT id FROM ttrss_users WHERE login = '$user'");
if (db_num_rows($result) == 1) {
return db_fetch_result($result, 0, "id");
function get_pgsql_version($link) {
$result = db_query($link, "SELECT version() AS version");
- $version = split(" ", db_fetch_result($result, 0, "version"));
+ $version = explode(" ", db_fetch_result($result, 0, "version"));
return $version[1];
}
$search_query_part = "";
- $keywords = split(" ", $search);
+ $keywords = explode(" ", $search);
$query_keywords = array();
foreach ($keywords as $k) {
$not = "";
}
- $commandpair = split(":", mb_strtolower($k), 2);
+ $commandpair = explode(":", mb_strtolower($k), 2);
if ($commandpair[0] == "note" && $commandpair[1]) {
$fg_color = db_fetch_result($result, 0, "fg_color");
$bg_color = db_fetch_result($result, 0, "bg_color");
- $reply .= "<span style='background : $bg_color; color : $fg_color'>";
+ $reply .= "<span style=\"background : $bg_color; color : $fg_color\" >";
$reply .= $feed_title;
$reply .= "</span>";
} else {
return $entry;
}
- function format_article($link, $id, $feed_id, $mark_as_read = true,
- $zoom_mode = false) {
+ function format_article($link, $id, $mark_as_read = true, $zoom_mode = false) {
$rv = array();
if ($subop == "undefined") $subop = "";
- $subop_split = split(":", $subop);
+ $subop_split = explode(":", $subop);
if ($subop == "CatchupSelected") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$cmode = sprintf("%d", $_REQUEST["cmode"]);
catchupArticlesById($link, $ids, $cmode);
$tags[$line["tag_name"]] = $line["count"];
}
+ if( count($tags) == 0 ){ return; }
+
ksort($tags);
$max_size = 32; // max font size in pixels
// Silent
if ($subop == "remprofiles") {
- $ids = split(",", db_escape_string(trim($_REQUEST["ids"])));
+ $ids = explode(",", db_escape_string(trim($_REQUEST["ids"])));
foreach ($ids as $id) {
if ($_SESSION["profile"] != $id) {
// Silent
if ($subop == "remarchive") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
$result = db_query($link, "DELETE FROM ttrss_archived_feeds WHERE
}
if ($subop == "archive") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
archive_article($link, $id, $_SESSION["uid"]);
/* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
if ($subop == "catchupSelected") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$cmode = sprintf("%d", $_REQUEST["cmode"]);
catchupArticlesById($link, $ids, $cmode);
}
if ($subop == "markSelected") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$cmode = sprintf("%d", $_REQUEST["cmode"]);
markArticlesById($link, $ids, $cmode);
}
if ($subop == "publishSelected") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$cmode = sprintf("%d", $_REQUEST["cmode"]);
publishArticlesById($link, $ids, $cmode);
$id = db_escape_string($_REQUEST["id"]);
$tags_str = db_escape_string($_REQUEST["tags_str"]);
- $tags = array_unique(trim_array(split(",", $tags_str)));
+ $tags = array_unique(trim_array(explode(",", $tags_str)));
db_query($link, "BEGIN");
/* update tag cache */
- $tags_str = asort(join(",", $tags_to_cache));
+ sort($tags_to_cache);
+ $tags_str = join(",", $tags_to_cache);
db_query($link, "UPDATE ttrss_user_entries
SET tag_cache = '$tags_str' WHERE ref_id = '$id'
}
if ($subop == "purge") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$days = sprintf("%d", $_REQUEST["days"]);
foreach ($ids as $id) {
} */
if ($subop == "getArticles") {
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$articles = array();
foreach ($ids as $id) {
if ($subop == "assignToLabel" || $subop == "removeFromLabel") {
$reply = array();
- $ids = split(",", db_escape_string($_REQUEST["ids"]));
+ $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$label_id = db_escape_string($_REQUEST["lid"]);
$label = db_escape_string(label_find_caption($link, $label_id,
}
}
-/* $ids = split(",", db_escape_string($_REQUEST["ids"]));
+/* $ids = explode(",", db_escape_string($_REQUEST["ids"]));
$subscribed = array();