aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Factory.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-15 14:17:00 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-15 14:17:00 +0100
commiteaf6c2c33e3c058bd6890c9fb30308b13727b19d (patch)
tree6a797374b348e5a42ddd5b8dc26079525f9194eb /app/Models/Factory.php
parentcaa274c75b6a7471f09f9c21057749c686e155fb (diff)
parent4c143426712f75fa04999f4e8b3c0b6900bf062d (diff)
Merge branch 'dev' into beta
Diffstat (limited to 'app/Models/Factory.php')
-rw-r--r--app/Models/Factory.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php
index 91cb84998..db09d155d 100644
--- a/app/Models/Factory.php
+++ b/app/Models/Factory.php
@@ -3,8 +3,8 @@
class FreshRSS_Factory {
public static function createFeedDao($username = null) {
- $db = Minz_Configuration::dataBase();
- if ($db['type'] === 'sqlite') {
+ $conf = Minz_Configuration::get('system');
+ if ($conf->db['type'] === 'sqlite') {
return new FreshRSS_FeedDAOSQLite($username);
} else {
return new FreshRSS_FeedDAO($username);
@@ -12,8 +12,8 @@ class FreshRSS_Factory {
}
public static function createEntryDao($username = null) {
- $db = Minz_Configuration::dataBase();
- if ($db['type'] === 'sqlite') {
+ $conf = Minz_Configuration::get('system');
+ if ($conf->db['type'] === 'sqlite') {
return new FreshRSS_EntryDAOSQLite($username);
} else {
return new FreshRSS_EntryDAO($username);
@@ -21,8 +21,8 @@ class FreshRSS_Factory {
}
public static function createStatsDAO($username = null) {
- $db = Minz_Configuration::dataBase();
- if ($db['type'] === 'sqlite') {
+ $conf = Minz_Configuration::get('system');
+ if ($conf->db['type'] === 'sqlite') {
return new FreshRSS_StatsDAOSQLite($username);
} else {
return new FreshRSS_StatsDAO($username);
@@ -30,8 +30,8 @@ class FreshRSS_Factory {
}
public static function createDatabaseDAO($username = null) {
- $db = Minz_Configuration::dataBase();
- if ($db['type'] === 'sqlite') {
+ $conf = Minz_Configuration::get('system');
+ if ($conf->db['type'] === 'sqlite') {
return new FreshRSS_DatabaseDAOSQLite($username);
} else {
return new FreshRSS_DatabaseDAO($username);