forked from AFPy/afpy.org
Gif access to all user to trash
This commit is contained in:
parent
7e42f8636b
commit
c5c2695115
10
data_xml.py
10
data_xml.py
|
@ -122,6 +122,11 @@ def save_post(category, timestamp, admin, form):
|
||||||
)
|
)
|
||||||
ElementTree.ElementTree(tree).write(post)
|
ElementTree.ElementTree(tree).write(post)
|
||||||
|
|
||||||
|
if ACTION_TRASH in form and status == STATE_PUBLISHED:
|
||||||
|
(root / category / STATE_PUBLISHED / timestamp).rename(
|
||||||
|
root / category / STATE_TRASHED / timestamp
|
||||||
|
)
|
||||||
|
|
||||||
if admin:
|
if admin:
|
||||||
if ACTION_PUBLISH in form and status == STATE_WAITING:
|
if ACTION_PUBLISH in form and status == STATE_WAITING:
|
||||||
(root / category / STATE_WAITING / timestamp).rename(
|
(root / category / STATE_WAITING / timestamp).rename(
|
||||||
|
@ -135,9 +140,6 @@ def save_post(category, timestamp, admin, form):
|
||||||
(root / category / STATE_TRASHED / timestamp).rename(
|
(root / category / STATE_TRASHED / timestamp).rename(
|
||||||
root / category / STATE_PUBLISHED / timestamp
|
root / category / STATE_PUBLISHED / timestamp
|
||||||
)
|
)
|
||||||
elif ACTION_TRASH in form and status == STATE_PUBLISHED:
|
|
||||||
(root / category / STATE_PUBLISHED / timestamp).rename(
|
|
||||||
root / category / STATE_TRASHED / timestamp
|
|
||||||
)
|
|
||||||
|
|
||||||
return get_post(category, timestamp)
|
return get_post(category, timestamp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user