From d5f09b7e4d802cdc2d5f3f876c48ea918c961488 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 3 Oct 2009 21:52:30 +0000 Subject: make the application work again git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@388 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/Service/Factory.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/SemanticScuttle/Service/Factory.php') diff --git a/src/SemanticScuttle/Service/Factory.php b/src/SemanticScuttle/Service/Factory.php index b5215e3..b4ba28e 100644 --- a/src/SemanticScuttle/Service/Factory.php +++ b/src/SemanticScuttle/Service/Factory.php @@ -1,16 +1,19 @@ sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist); if(!$db->db_connect_id) { @@ -25,12 +28,15 @@ class ServiceFactory { } if (!class_exists($name)) { if (!isset($servicedir)) { - $servicedir = dirname(__FILE__) .'/'; + $servicedir = 'SemanticScuttle/Service/'; } - require_once($servicedir . strtolower($name) . '.php'); + require_once $servicedir . $name . '.php'; } - $instances[$name] = call_user_func(array($name, 'getInstance'), $db); + $instances[$name] = call_user_func( + array('SemanticScuttle_Service_' . $name, 'getInstance'), + $db + ); } return $instances[$name]; } -- cgit v1.2.3-54-g00ecf