From 4e271d321c5216050286fa9b5424d08c074fbcb8 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 26 Jan 2016 14:41:53 +0100 Subject: [PATCH] Add migration correction --- app/Migrations/AbstractMigrationChamilo.php | 10 +++++----- main/inc/lib/database.lib.php | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/Migrations/AbstractMigrationChamilo.php b/app/Migrations/AbstractMigrationChamilo.php index fc7843c9df..3212c59667 100644 --- a/app/Migrations/AbstractMigrationChamilo.php +++ b/app/Migrations/AbstractMigrationChamilo.php @@ -33,11 +33,11 @@ abstract class AbstractMigrationChamilo extends AbstractMigration if (empty($this->manager)) { $dbParams = array( 'driver' => 'pdo_mysql', - 'host' => $this->getConfigurationValue('db_host'), - 'user' => $this->getConfigurationValue('db_user'), - 'password' => $this->getConfigurationValue('db_password'), - 'dbname' => $this->getConfigurationValue('main_database'), - 'port' => $this->getConfigurationValue('db_port') + 'host' => $this->connection->getHost(), + 'user' => $this->connection->getUsername(), + 'password' => $this->connection->getPassword(), + 'dbname' => $this->connection->getDatabase(), + 'port' => $this->connection->getPort() ); $database = new \Database(); $database->connect( diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index 0191fb8d94..67a6560ea6 100755 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -651,12 +651,6 @@ class Database $path.'src/Chamilo/CourseBundle/Entity' ); - /*$doctrineCache = api_get_path(SYS_ARCHIVE_PATH).'doctrine/'; - - if (!is_dir($doctrineCache)) { - mkdir($doctrineCache, api_get_permissions_for_new_directories(), true); - }*/ - return \Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration( $paths, $isDevMode,