summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/forum_post_delete.php18
-rw-r--r--src/forum_post_send.php (renamed from src/F2M.php)8
2 files changed, 18 insertions, 8 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);
+}
+
+?>
diff --git a/src/F2M.php b/src/forum_post_send.php
index 7e35f60..cd103e7 100644
--- a/src/F2M.php
+++ b/src/forum_post_send.php
@@ -205,14 +205,6 @@ EOF;
}
}
-# 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);
-}
-
function build_text_part($mime, $text) {
$params = array(
'content_type' => 'text/plain',