]> source.dussan.org Git - nextcloud-server.git/commitdiff
Create instance of Doctrine\Common\EventManager() in OC_DB.
authorAndreas Fischer <bantu@owncloud.com>
Tue, 10 Sep 2013 17:14:30 +0000 (19:14 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Thu, 12 Sep 2013 21:43:20 +0000 (23:43 +0200)
lib/db.php

index f090f474243c8a4f34b2a9bb3370235d379de071..bd67937cdd8bc82910b9a5df42b097eefd74d1b5 100644 (file)
@@ -75,6 +75,7 @@ class OC_DB {
                // do nothing if the connection already has been established
                if (!self::$connection) {
                        $config = new \Doctrine\DBAL\Configuration();
+                       $eventManager = new \Doctrine\Common\EventManager();
                        switch($type) {
                                case 'sqlite':
                                case 'sqlite3':
@@ -142,7 +143,7 @@ class OC_DB {
                        $connectionParams['wrapperClass'] = 'OC\DB\Connection';
                        $connectionParams['tablePrefix'] = OC_Config::getValue('dbtableprefix', 'oc_' );
                        try {
-                               self::$connection = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
+                               self::$connection = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config, $eventManager);
                                if ($type === 'sqlite' || $type === 'sqlite3') {
                                        // Sqlite doesn't handle query caching and schema changes
                                        // TODO: find a better way to handle this