aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Factory.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-06 11:54:00 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-06 11:54:00 +0200
commit3bbd0e446f6a1a0c41a4db36d2841db36dc34004 (patch)
tree7a6417f0a01d5c318112fbf0419f53c5beae61c6 /app/Models/Factory.php
parent96057fe491412171f4ef2079d3d84cbe1a61e300 (diff)
Prepare statistics for SQLite
Temporarily disable 30-day statistics for SQLite https://github.com/marienfressinaud/FreshRSS/issues/100 https://github.com/marienfressinaud/FreshRSS/issues/90
Diffstat (limited to 'app/Models/Factory.php')
-rw-r--r--app/Models/Factory.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php
index 95d21a277..08569b2e2 100644
--- a/app/Models/Factory.php
+++ b/app/Models/Factory.php
@@ -19,4 +19,14 @@ class FreshRSS_Factory {
return new FreshRSS_EntryDAO();
}
}
+
+ public static function createStatsDAO() {
+ $db = Minz_Configuration::dataBase();
+ if ($db['type'] === 'sqlite') {
+ return new FreshRSS_StatsDAOSQLite();
+ } else {
+ return new FreshRSS_StatsDAO();
+ }
+ }
+
}