forked from MarseyWorld/MarseyWorld
parent
6af8e60692
commit
a5cbc1ffbd
|
@ -62,7 +62,7 @@ def after_request(response):
|
||||||
if hasattr(g, 'v') and g.v:
|
if hasattr(g, 'v') and g.v:
|
||||||
user_id = g.v.id
|
user_id = g.v.id
|
||||||
|
|
||||||
if SITE != 'watchpeopledie.tv' and not session.get("GLOBAL") and request.method == "POST":
|
if not session.get("GLOBAL") and request.method == "POST":
|
||||||
timestamp = int(time.time())
|
timestamp = int(time.time())
|
||||||
if (g.v.last_active + LOGGEDIN_ACTIVE_TIME) < timestamp:
|
if (g.v.last_active + LOGGEDIN_ACTIVE_TIME) < timestamp:
|
||||||
g.v.last_active = timestamp
|
g.v.last_active = timestamp
|
||||||
|
|
|
@ -73,7 +73,6 @@ def publish(pid, v):
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
cache.delete_memoized(userpagelisting)
|
cache.delete_memoized(userpagelisting)
|
||||||
|
|
||||||
if SITE != 'watchpeopledie.tv':
|
|
||||||
execute_snappy(p, v)
|
execute_snappy(p, v)
|
||||||
|
|
||||||
return {"message": "Post has been published successfully!"}
|
return {"message": "Post has been published successfully!"}
|
||||||
|
@ -680,7 +679,7 @@ def submit_post(v, sub=None):
|
||||||
for key in redis_instance.scan_iter(key_pattern):
|
for key in redis_instance.scan_iter(key_pattern):
|
||||||
redis_instance.delete(key)
|
redis_instance.delete(key)
|
||||||
|
|
||||||
if SITE != 'watchpeopledie.tv' and not p.private:
|
if not p.private:
|
||||||
execute_snappy(p, v)
|
execute_snappy(p, v)
|
||||||
|
|
||||||
g.db.commit() #Necessary, do NOT remove
|
g.db.commit() #Necessary, do NOT remove
|
||||||
|
|
Loading…
Reference in New Issue