}
}
+ $result = db_query($link, "SELECT id,title,feed_url,last_error
+ FROM ttrss_feeds WHERE last_error != ''");
+
+ if (db_num_rows($result) > 0) {
+
+ print "<div class=\"warning\">";
+
+ print "<b>Feeds with update errors:</b>";
+
+ print "<ul class=\"nomarks\">";
+
+ while ($line = db_fetch_assoc($result)) {
+ print "<li>" . $line["title"] . " (" . $line["feed_url"] . "): " .
+ $line["last_error"];
+ }
+
+ print "</ul>";
+ print "</div>";
+
+ }
+
print "<table class=\"prefAddFeed\"><tr>
<td><input id=\"fadd_link\"></td>
<td colspan=\"4\" align=\"right\">
if (WEB_DEMO_MODE) return;
+ $feed = db_escape_string($feed);
+
error_reporting(0);
$rss = fetch_rss($feed_url);
+
error_reporting (E_ERROR | E_WARNING | E_PARSE);
db_query($link, "BEGIN");
}
}
- db_query($link, "UPDATE ttrss_feeds SET last_updated = NOW() WHERE id = '$feed'");
+ db_query($link, "UPDATE ttrss_feeds
+ SET last_updated = NOW(), last_error = '' WHERE id = '$feed'");
+ } else {
+ $error_msg = db_escape_string(magpie_error());
+ db_query($link,
+ "UPDATE ttrss_feeds SET last_error = '$error_msg' WHERE id = '$feed'");
}
db_query($link, "COMMIT");
feed_url varchar(250) unique not null,
icon_url varchar(250) not null default '',
update_interval integer not null default 0,
- last_updated datetime default '') TYPE=InnoDB;
+ last_updated datetime default '',
+ last_error text not null default '') TYPE=InnoDB;
insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
feed_url varchar(250) unique not null,
icon_url varchar(250) not null default '',
update_interval integer not null default 0,
- last_updated timestamp default null);
+ last_updated timestamp default null,
+ last_error text not null default '');
insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
input.prefsTab:hover {
background : white;
}
+
+div.warning {
+ background : #fffff0;
+ border : 1px solid #c0c0c0;
+ padding : 5px;
+ margin : 5px;
+ font-size : x-small;
+}
+
+ul.nomarks {
+ list-style-type : none;
+ margin : 0px;
+ padding : 10px;
+}
+
input.prefsTab:hover {
background : white;
}
+
+div.warning {
+ background : #fffff0;
+ border : 1px solid #c0c0c0;
+ padding : 5px;
+ margin : 5px;
+ font-size : x-small;
+}
+
+ul.nomarks {
+ list-style-type : none;
+ margin : 0px;
+ padding : 10px;
+}
+