fix. Sidebar manage with wip/publish
This commit is contained in:
parent
c95cf9dc67
commit
e65a92d38a
|
@ -280,19 +280,27 @@ def create_sidebar(option):
|
||||||
hash_uri = tyto.get_filesum(f_uri, False)
|
hash_uri = tyto.get_filesum(f_uri, False)
|
||||||
db_uri = '%s%s.conf'%(db.articles_db, hash_uri)
|
db_uri = '%s%s.conf'%(db.articles_db, hash_uri)
|
||||||
if not os.path.exists(db_uri):
|
if not os.path.exists(db_uri):
|
||||||
logs.out('25', 'No Database', False)
|
logs.out('25', line, False)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Load article"s database
|
# Load article"s database
|
||||||
exec(open(db_uri).read(),globals())
|
exec(open(db_uri).read(),globals())
|
||||||
|
|
||||||
# Check wip status and if wip article exists
|
# Check wip status and if wip article exists
|
||||||
if not hash_wip == hash_chk:
|
if option == 'wip':
|
||||||
logs.out("30", '%s "%s"'%(line, title), False)
|
if not hash_wip == hash_chk:
|
||||||
continue
|
logs.out("30", '%s "%s"'%(line, title), False)
|
||||||
if not os.path.exists(post_wip):
|
continue
|
||||||
logs.out("24", 'in wip: %s'%post_wip, False)
|
if not os.path.exists(post_wip):
|
||||||
continue
|
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
|
# Valid article
|
||||||
sidebar_new = True
|
sidebar_new = True
|
||||||
|
|
Loading…
Reference in New Issue