aboutsummaryrefslogtreecommitdiff
path: root/app/Models/DatabaseDAOSQLite.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-12-16 15:24:13 +0100
committerGravatar GitHub <noreply@github.com> 2017-12-16 15:24:13 +0100
commitfdc9e0d75a786101a14f64bc418b48fdd1cb4890 (patch)
tree9a7a1d523ab1279e2efce84d2d0c73dd0ad47c70 /app/Models/DatabaseDAOSQLite.php
parentf7560c585f211be41b093906e3a8fb5a6071c660 (diff)
parentccb829418d25af49d129ac227b0cbd09c085b8a3 (diff)
Merge branch 'dev' into hebrew-i18n
Diffstat (limited to 'app/Models/DatabaseDAOSQLite.php')
-rw-r--r--app/Models/DatabaseDAOSQLite.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.php
index 7f53f967d..d3aedb3c0 100644
--- a/app/Models/DatabaseDAOSQLite.php
+++ b/app/Models/DatabaseDAOSQLite.php
@@ -9,7 +9,7 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO {
$stm = $this->bd->prepare($sql);
$stm->execute();
$res = $stm->fetchAll(PDO::FETCH_ASSOC);
-
+
$tables = array(
'category' => false,
'feed' => false,
@@ -45,4 +45,17 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO {
'default' => $dao['dflt_value'],
);
}
+
+ public function size($all = false) {
+ return @filesize(join_path(DATA_PATH, 'users', $this->current_user, 'db.sqlite'));
+ }
+
+ public function optimize() {
+ $sql = 'VACUUM';
+ $stm = $this->bd->prepare($sql);
+ if ($stm) {
+ return $stm->execute();
+ }
+ return false;
+ }
}