diff options
Diffstat (limited to 'app/Models/Factory.php')
| -rw-r--r-- | app/Models/Factory.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php index 69885c205..308ff2864 100644 --- a/app/Models/Factory.php +++ b/app/Models/Factory.php @@ -7,8 +7,7 @@ class FreshRSS_Factory { } public static function createCategoryDao($username = null) { - $conf = Minz_Configuration::get('system'); - switch ($conf->db['type']) { + switch (FreshRSS_Context::$system_conf->db['type']) { case 'sqlite': return new FreshRSS_CategoryDAOSQLite($username); default: @@ -17,8 +16,7 @@ class FreshRSS_Factory { } public static function createFeedDao($username = null) { - $conf = Minz_Configuration::get('system'); - switch ($conf->db['type']) { + switch (FreshRSS_Context::$system_conf->db['type']) { case 'sqlite': return new FreshRSS_FeedDAOSQLite($username); default: @@ -27,8 +25,7 @@ class FreshRSS_Factory { } public static function createEntryDao($username = null) { - $conf = Minz_Configuration::get('system'); - switch ($conf->db['type']) { + switch (FreshRSS_Context::$system_conf->db['type']) { case 'sqlite': return new FreshRSS_EntryDAOSQLite($username); case 'pgsql': @@ -39,8 +36,7 @@ class FreshRSS_Factory { } public static function createTagDao($username = null) { - $conf = Minz_Configuration::get('system'); - switch ($conf->db['type']) { + switch (FreshRSS_Context::$system_conf->db['type']) { case 'sqlite': return new FreshRSS_TagDAOSQLite($username); case 'pgsql': @@ -51,8 +47,7 @@ class FreshRSS_Factory { } public static function createStatsDAO($username = null) { - $conf = Minz_Configuration::get('system'); - switch ($conf->db['type']) { + switch (FreshRSS_Context::$system_conf->db['type']) { case 'sqlite': return new FreshRSS_StatsDAOSQLite($username); case 'pgsql': @@ -63,8 +58,7 @@ class FreshRSS_Factory { } public static function createDatabaseDAO($username = null) { - $conf = Minz_Configuration::get('system'); - switch ($conf->db['type']) { + switch (FreshRSS_Context::$system_conf->db['type']) { case 'sqlite': return new FreshRSS_DatabaseDAOSQLite($username); case 'pgsql': |
