From 18e0aa1316ee7b8408a2b0e0e50505d33e23fdca Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Fri, 26 Nov 2010 08:25:07 +0100 Subject: Improvement of URL (mark an article as read) (1). --- pyAggr3g470r.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyAggr3g470r.py') diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 48c4ca8a..c65abb9f 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -141,7 +141,7 @@ class Root: html += '      ' if self.nb_unread_articles != 0: - html += '\n' + html += '\n' html += """\n""" % \ (self.nb_unread_articles,) html += '\n' @@ -853,7 +853,7 @@ class Root: error_page.exposed = True - def mark_as_read(self, target): + def mark_as_read(self, target=""): """ Mark one (or more) article(s) as read by setting the value of the field 'article_readed' of the SQLite database to 1. @@ -864,7 +864,7 @@ class Root: conn = sqlite3.connect(utils.sqlite_base, isolation_level = None) c = conn.cursor() # Mark all articles as read. - if param == "All": + if param == "": c.execute("UPDATE articles SET article_readed=1 WHERE article_readed='0'") # Mark all articles from a feed as read. elif param == "Feed" or param == "Feed_FromMainPage": @@ -881,7 +881,7 @@ class Root: finally: LOCKER.release() - if param == "All" or param == "Feed_FromMainPage": + if param == "" or param == "Feed_FromMainPage": return self.index() elif param == "Feed": return self.all_articles(identifiant) -- cgit