diff options
author | uckelman <uckelman@nomic.net> | 2010-04-30 21:10:36 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-04-30 21:10:36 +0000 |
commit | 140160e332d0ccf153e6e7487b2ec99402e6096f (patch) | |
tree | d5c651a2be5835caea0f8794dd7d8b6dc927bdd3 /src | |
parent | 952a0953515f0854ef6d95317b38d4e1c12b916a (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')
-rw-r--r-- | src/forum_post_delete.php | 18 | ||||
-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', |