aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Factory.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-10-31 18:15:47 +0100
committerGravatar GitHub <noreply@github.com> 2019-10-31 18:15:47 +0100
commit3aa66f317b496ccd9a2df914bbc747c52081a7ad (patch)
tree6a3f3f74899801abdca00546e213dfdc141c53cf /app/Models/Factory.php
parent82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (diff)
parentfcae48f313d399050cb15f37a8a73ae52fc67796 (diff)
Merge pull request #2599 from FreshRSS/dev1.15.0
FreshRSS 1.15
Diffstat (limited to 'app/Models/Factory.php')
-rw-r--r--app/Models/Factory.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php
index 1accb491c..69885c205 100644
--- a/app/Models/Factory.php
+++ b/app/Models/Factory.php
@@ -2,8 +2,18 @@
class FreshRSS_Factory {
+ public static function createUserDao($username = null) {
+ return new FreshRSS_UserDAO($username);
+ }
+
public static function createCategoryDao($username = null) {
- return new FreshRSS_CategoryDAO($username);
+ $conf = Minz_Configuration::get('system');
+ switch ($conf->db['type']) {
+ case 'sqlite':
+ return new FreshRSS_CategoryDAOSQLite($username);
+ default:
+ return new FreshRSS_CategoryDAO($username);
+ }
}
public static function createFeedDao($username = null) {