save $this->db for later use
authorChuck Hagenbuch <chuck@horde.org>
Tue, 13 Oct 2009 03:07:51 +0000 (23:07 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 13 Oct 2009 03:08:23 +0000 (23:08 -0400)
content/app/controllers/ApplicationController.php

index 810ee33..1425d0b 100644 (file)
@@ -18,8 +18,11 @@ class Content_ApplicationController extends Horde_Controller_Base
 
         $GLOBALS['conf']['sql']['adapter'] = $GLOBALS['conf']['sql']['phptype'] == 'mysqli' ? 'mysqli' : 'pdo_' . $GLOBALS['conf']['sql']['phptype'];
 
-        $db = Horde_Db_Adapter::factory($GLOBALS['conf']['sql']);
-        $context = array('dbAdapter' => $db);
+        // @TODO use this
+        // $injector = new Horde_Injector();
+
+        $this->db = Horde_Db_Adapter::factory($GLOBALS['conf']['sql']);
+        $context = array('dbAdapter' => $this->db);
 
         $this->typeManager = new Content_Types_Manager($context);
         $context['typeManager'] = $this->typeManager;