aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Factory.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-08 14:18:32 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-08 14:18:32 +0100
commit73023bc12b81a27045703e1f733faeb2b4e02cec (patch)
tree14aca1a1953d0a813c06794e48a63738abccdcea /app/Models/Factory.php
parent26da4aa448906f857a252507b34d369a386043c6 (diff)
parent0e4e16ac55097aa173c7c439367294ebd7645562 (diff)
Merge branch 'dev' into 252-extensions
Conflicts: app/FreshRSS.php app/Models/Configuration.php app/views/index/index.phtml app/views/index/normal.phtml lib/Minz/Configuration.php lib/Minz/Translate.php lib/lib_rss.php
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);