Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #48 from ddreier/develop

Some changes to make Tiny Issue more database flexible
  • Loading branch information...
commit eb6e930c434d210f8895381e2203de5913b64e8f 2 parents e30cc16 + ca976ad
Michael Hasselbring mikelbring authored
2  app/application/config/database.php
@@ -42,8 +42,6 @@
42 42 |
43 43 */
44 44
45   - 'default' => 'mysql',
46   -
47 45 /*
48 46 |--------------------------------------------------------------------------
49 47 | Database Connections
14 app/application/start.php
@@ -43,15 +43,17 @@
43 43
44 44 case 'database':
45 45
46   - $config['connections']['mysql'] = array(
47   - 'host' => $config_app['mysql']['host'],
48   - 'database' => $config_app['mysql']['database'],
49   - 'username' => $config_app['mysql']['username'],
50   - 'password' => $config_app['mysql']['password'],
  46 + $config['connections'][$config_app['database']['driver']] = array(
  47 + 'host' => $config_app['database']['host'],
  48 + 'database' => $config_app['database']['database'],
  49 + 'username' => $config_app['database']['username'],
  50 + 'password' => $config_app['database']['password'],
51 51 'charset' => 'utf8',
52 52 'prefix' => '',
53   - 'driver' => 'mysql'
  53 + 'driver' => $config_app['database']['driver']
54 54 );
  55 +
  56 + $config['default'] = $config_app['database']['driver'];
55 57
56 58 $load = $config + $load;
57 59
6 config.app.example.php
@@ -10,9 +10,11 @@
10 10
11 11
12 12 /**
13   - * Fill out your MySQL database settings
  13 + * Fill out your database settings. Make sure that the driver is correct: 'mysql' for MySQL, 'sqlsrv' for MSSQL,
  14 + * 'pgsql' for PostgreSQL, or 'sqlite' for SQLite
14 15 */
15   - 'mysql' => array(
  16 + 'database' => array(
  17 + 'driver' => 'mysql'
16 18 'host' => 'localhost',
17 19 'database' => 'database_name',
18 20 'username' => 'database_user',

0 comments on commit eb6e930

Please sign in to comment.
Something went wrong with that request. Please try again.