diff options
| author | 2017-12-17 20:28:04 +0100 | |
|---|---|---|
| committer | 2017-12-17 20:28:04 +0100 | |
| commit | 60f56539c3f30fd3f7ba4f2a3570f7029ac93e5f (patch) | |
| tree | 1e78bfac7042dceb63898e2215db8fb0c1d7745d /cli/db-optimize.php | |
| parent | ceda55c75b158fc1cf4813fe0f258527754b9289 (diff) | |
| parent | 0b1516af91792f86868689392f72ad4b6e32cdcf (diff) | |
Merge pull request #1720 from FreshRSS/dev
FreshRSS 1.9.0
Diffstat (limited to 'cli/db-optimize.php')
| -rwxr-xr-x | cli/db-optimize.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/db-optimize.php b/cli/db-optimize.php new file mode 100755 index 000000000..39dc97638 --- /dev/null +++ b/cli/db-optimize.php @@ -0,0 +1,20 @@ +#!/usr/bin/php +<?php +require(__DIR__ . '/_cli.php'); + +$options = getopt('', array( + 'user:', + )); + +if (empty($options['user'])) { + fail('Usage: ' . basename(__FILE__) . " --user username"); +} + +$username = cliInitUser($options['user']); + +echo 'FreshRSS optimizing database for user “', $username, "”…\n"; + +$databaseDAO = FreshRSS_Factory::createDatabaseDAO($username); +$ok = $databaseDAO->optimize(); + +done($ok); |
