mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-17 17:57:54 -05:00
For uniformity, and to avoid having PHP searching in include_path. http://php.net/manual/function.include.php https://github.com/FreshRSS/FreshRSS/pull/1715 https://github.com/FreshRSS/FreshRSS/pull/1711#issuecomment-350581350
21 lines
419 B
PHP
Executable File
21 lines
419 B
PHP
Executable File
#!/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);
|