From 88d4c55ec38c68c07496ed059616b15622fc83e7 Mon Sep 17 00:00:00 2001 From: uckelman Date: Sun, 31 Oct 2010 20:53:21 +0000 Subject: Major refactoring to make bridge easier to test. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@7431 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/forum_post_delete.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/forum_post_delete.php') diff --git a/src/forum_post_delete.php b/src/forum_post_delete.php index f80b1ad..be3fa0f 100644 --- a/src/forum_post_delete.php +++ b/src/forum_post_delete.php @@ -38,9 +38,12 @@ function remove_post($postId) { require_once('Log.php'); $logger = &Log::singleton('file', '/var/log/listbridge', 'one'); - require_once(__DIR__ . '/Bridge.php'); + require_once(__DIR__ . '/BridgeConf.php') + require_once(__DIR__ . '/BridgeImpl.php'); + + $db = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB, DB_USER, DB_PASS); + $bridge = new BridgeImpl($db); - $bridge = new Bridge(); if ($bridge->removePost($postId)) { $logger->info($postId . ' deleted'); } -- cgit v1.2.3