diff --git a/src/var/lib/tyto/program/html.py b/src/var/lib/tyto/program/html.py index 82260c2..30f006b 100644 --- a/src/var/lib/tyto/program/html.py +++ b/src/var/lib/tyto/program/html.py @@ -280,19 +280,27 @@ def create_sidebar(option): hash_uri = tyto.get_filesum(f_uri, False) db_uri = '%s%s.conf'%(db.articles_db, hash_uri) if not os.path.exists(db_uri): - logs.out('25', 'No Database', False) + logs.out('25', line, False) continue # Load article"s database exec(open(db_uri).read(),globals()) # Check wip status and if wip article exists - if not hash_wip == hash_chk: - logs.out("30", '%s "%s"'%(line, title), False) - continue - if not os.path.exists(post_wip): - logs.out("24", 'in wip: %s'%post_wip, False) - continue + if option == 'wip': + if not hash_wip == hash_chk: + logs.out("30", '%s "%s"'%(line, title), False) + continue + if not os.path.exists(post_wip): + logs.out("24", 'in wip: %s'%post_wip, False) + continue + elif option == 'www': + if not hash_www == hash_chk: + logs.out("30", '%s "%s"'%(line, title), False) + continue + if not os.path.exists(post_www): + logs.out("24", 'in www: %s'%post_www, False) + continue # Valid article sidebar_new = True