* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Chevere\ThrowableHandler\ThrowableHandler; use function Chevereto\Legacy\getCheveretoEnv; use function Chevereto\Legacy\loaderHandler; if (PHP_SAPI !== 'cli') { header('HTTP/1.0 403 Forbidden'); echo '403 Forbidden'; exit(255); } $opts = getopt('C:') ?: []; if ($opts === []) { echo 'Missing -C command' . PHP_EOL; exit(255); } $access = $opts['C']; $options = [ 'bulk-importer', 'cache-view', 'cache-flush', 'cron', 'decrypt-secrets', 'encrypt-secrets', 'htaccess-checksum', 'htaccess-enforce', 'install', 'js', 'langs', 'password-reset', 'setting-get', 'setting-update', 'database-migrate', 'version', 'version-installed', 'stats', 'stats-rebuild', ]; $aliases = [ 'update' => 'database-migrate', ]; if (array_key_exists($access, $aliases)) { $originalAccess = $access; $access = $aliases[$access]; echo <<