Skip to content

Commit

Permalink
Fixing db_persistent_connection notice
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 5, 2015
1 parent cbaf8f2 commit c8a8ca5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions main/inc/global.inc.php
Expand Up @@ -115,13 +115,16 @@
global $database_connection;
// Connect to the server database and select the main chamilo database.
// When $_configuration['db_persistent_connection'] is set, it is expected to be a boolean type.
$dbPersistConnection = api_get_configuration_value('db_persistent_connection');

$params = array(
'server' => $_configuration['db_host'],
'username' => $_configuration['db_user'],
'password' => $_configuration['db_password'],
'persistent' => $_configuration['db_persistent_connection']
'server' => $_configuration['db_host'],
'username' => $_configuration['db_user'],
'password' => $_configuration['db_password'],
'persistent' => $dbPersistConnection
);
// $_configuration['db_client_flags'] can be set in configuration.php to pass

// $_configuration['db_client_flags'] can be set in configuration.php to pass
// flags to the DB connection
if (isset($_configuration['db_client_flags']) && !empty($_configuration['db_client_flags'])) {
$params['client_flags'] = $_configuration['db_client_flags'];
Expand Down

1 comment on commit c8a8ca5

@ywarnier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
I took the opportunity to do the same with client_flags

Please sign in to comment.