diff options
| -rw-r--r-- | apioforum/templates/delete_thread.html | 2 | ||||
| -rw-r--r-- | apioforum/thread.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/apioforum/templates/delete_thread.html b/apioforum/templates/delete_thread.html index aaf1de3..c4069c9 100644 --- a/apioforum/templates/delete_thread.html +++ b/apioforum/templates/delete_thread.html @@ -7,7 +7,7 @@ {% block content %} <form method="post"> -<p>deleting thread created {{ts(thread.created)}} ago with {{post_count}} posts</p> +<p><span class="warning">permanently</span> deleting thread created {{ts(thread.created)}} ago with {{post_count}} posts</p> {% if post_count > 50 %} <p class="warning">thread contains more than 50 posts!</p> {% endif %} diff --git a/apioforum/thread.py b/apioforum/thread.py index 59bf1c0..2457deb 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -312,6 +312,8 @@ def delete_thread(thread_id): return redirect(url_for("thread.view_thread",thread_id=thread_id)) if request.method == "POST": db.execute("DELETE FROM posts WHERE thread = ?",(thread_id,)) + db.execute("DELETE FROM thread_tags WHERE thread = ?",(thread_id,)) + db.execute("DELETE FROM read WHERE thread = ?",(thread_id,)) db.execute("DELETE FROM threads WHERE id = ?",(thread_id,)) db.commit() flash("thread deleted deletedly") |
