]> projects.mako.cc - scuttle/blobdiff - services/servicefactory.php
- Override privacy status on bookmark file import, if specified (i.e. Delicious)
[scuttle] / services / servicefactory.php
index ba2d6d7910a1ecc459d1ac09008847b0ba831f16..5f7635a91ebcc1500b8cdf28261300308284338c 100644 (file)
@@ -1,14 +1,14 @@
 <?php
 class ServiceFactory {
 <?php
 class ServiceFactory {
-    function ServiceFactory(&$db, $serviceoverrules = array()) {    
+    function ServiceFactory(&$db, $serviceoverrules = array()) {
     }
     }
-  
+
     function &getServiceInstance($name, $servicedir = NULL) {
         global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype;
         static $instances = array();
         static $db;
         if (!isset($db)) {
     function &getServiceInstance($name, $servicedir = NULL) {
         global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype;
         static $instances = array();
         static $db;
         if (!isset($db)) {
-            require_once(dirname(__FILE__) .'/../includes/db/'. $dbtype .'.php');
+            require_once dirname(__FILE__) .'/../includes/db/'. $dbtype .'.php';
             $db = new sql_db();
             $db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist);
             if(!$db->db_connect_id) {
             $db = new sql_db();
             $db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist);
             if(!$db->db_connect_id) {
@@ -23,11 +23,10 @@ class ServiceFactory {
                 if (!isset($servicedir)) {
                     $servicedir = dirname(__FILE__) .'/';
                 }
                 if (!isset($servicedir)) {
                     $servicedir = dirname(__FILE__) .'/';
                 }
-                require_once($servicedir . strtolower($name) . '.php');
+                require_once $servicedir . strtolower($name) .'.php';
             }
             $instances[$name] = call_user_func(array($name, 'getInstance'), $db);
             }
             $instances[$name] = call_user_func(array($name, 'getInstance'), $db);
-        }        
+        }
         return $instances[$name];
     }
 }
         return $instances[$name];
     }
 }
-?>
\ No newline at end of file

Benjamin Mako Hill || Want to submit a patch?