if ($subop == "MarkAllRead") {
- if (preg_match("/^[0-9][0-9]*$/", $feed) != false) {
+ if (preg_match("/^[0-9][0-9]*$/", $feed) != false && $feed >= 0) {
if ($cat_view) {
if ($search && $search_mode == "All feeds") {
$query_strategy_part = "ttrss_entries.id > 0";
$vfeed_query_part = "ttrss_feeds.title AS feed_title,";
- } else if (preg_match("/^[0-9][0-9]*$/", $feed) == false) {
+ } else if (preg_match("/^-?[0-9][0-9]*$/", $feed) == false) {
$query_strategy_part = "ttrss_entries.id > 0";
$vfeed_query_part = "(SELECT title FROM ttrss_feeds WHERE
id = feed_id) as feed_title,";
if ($search && $search_mode == "All feeds") {
$feed_title = "Global search results ($search)";
- } else if ($search && sprintf("%d", $feed) == 0) {
+ } else if ($search && preg_match('/^-?[0-9][0-9]*$/', $feed) == false) {
$feed_title = "Feed search results ($search, $feed)";
- } else if ($feed >= 0) {
+ } else if (preg_match('/^-?[0-9][0-9]*$/', $feed) == false) {
+ $feed_title = $feed;
+ } else if (preg_match('/^-?[0-9][0-9]*$/', $feed) != false && $feed >= 0) {
if ($cat_view) {
print "<div id=\"headlinesContainer\">";
- if (preg_match("/^[0-9][0-9]*$/", $feed) != false) {
+ if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) {
if ($feed >= 0) {
$feed_kind = "Feeds";
if (!document.getElementById("feedCatHolder")) {
for (i = 0; i < content.childNodes.length; i++) {
var child = content.childNodes[i];
- child.className = child.className.replace("Selected", "");
+ try {
+ child.className = child.className.replace("Selected", "");
+ } catch (e) {
+ //
+ }
}
} else {
for (i = 0; i < content.childNodes.length; i++) {