diff options
| author | 2017-12-16 15:24:13 +0100 | |
|---|---|---|
| committer | 2017-12-16 15:24:13 +0100 | |
| commit | fdc9e0d75a786101a14f64bc418b48fdd1cb4890 (patch) | |
| tree | 9a7a1d523ab1279e2efce84d2d0c73dd0ad47c70 /app/Models/DatabaseDAOSQLite.php | |
| parent | f7560c585f211be41b093906e3a8fb5a6071c660 (diff) | |
| parent | ccb829418d25af49d129ac227b0cbd09c085b8a3 (diff) | |
Merge branch 'dev' into hebrew-i18n
Diffstat (limited to 'app/Models/DatabaseDAOSQLite.php')
| -rw-r--r-- | app/Models/DatabaseDAOSQLite.php | 15 |
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; + } } |
