summaryrefslogtreecommitdiff
path: root/src/forum_post_delete.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-30 21:10:36 +0000
committeruckelman <uckelman@nomic.net>2010-04-30 21:10:36 +0000
commit140160e332d0ccf153e6e7487b2ec99402e6096f (patch)
treed5c651a2be5835caea0f8794dd7d8b6dc927bdd3 /src/forum_post_delete.php
parent952a0953515f0854ef6d95317b38d4e1c12b916a (diff)
Refactored.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6794 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/forum_post_delete.php')
-rw-r--r--src/forum_post_delete.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/forum_post_delete.php b/src/forum_post_delete.php
new file mode 100644
index 0000000..068c041
--- /dev/null
+++ b/src/forum_post_delete.php
@@ -0,0 +1,18 @@
+<?php
+
+try {
+ remove_post($postId);
+}
+catch (Exception $e) {
+ trigger_error($e, E_USER_ERROR);
+}
+
+# TODO: call this from handle_post_delete in posting.php
+function remove_post($postId) {
+ require_once(__DIR__ . '/Bridge.php');
+
+ $bridge = new Bridge();
+ $bridge->removePost($postId);
+}
+
+?>