From 6e65556ce0dbecb7584fcbc3f927017bd92264e2 Mon Sep 17 00:00:00 2001 From: uckelman Date: Tue, 27 Jul 2010 20:00:19 +0000 Subject: Don't barf on unrecognized messages. Unrecognized messages are probaly just ones which predate the list bridge. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@7040 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/forum_post_delete.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/forum_post_delete.php') diff --git a/src/forum_post_delete.php b/src/forum_post_delete.php index 177d08e..56fbfdc 100644 --- a/src/forum_post_delete.php +++ b/src/forum_post_delete.php @@ -14,10 +14,18 @@ catch (Exception $e) { } function remove_post($postId) { + require_once('Log.php'); + $logger = &Log::singleton('file', '/var/log/listbridge', 'one'); + require_once(__DIR__ . '/Bridge.php'); $bridge = new Bridge(); - $bridge->removePost($postId); + if ($bridge->removePost($postId)) { + $logger->info($postId . ' deleted'); + } + else { + $logger->info($postId . ' not found, not deleted'); + } } ?> -- cgit v1.2.3