diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-03-28 19:50:50 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-03-28 19:50:50 +0200 |
commit | 59ca64902e9be76882db16c07e65dc342a336201 (patch) | |
tree | 7bf69bd667761a6afacd9f17bdc37d6e6818b5b2 /command/updater/afterupdate.php | |
parent | 150e2ee20a51e753bee752758a51da98883feecf (diff) |
add console based update api which does not require authentication
Diffstat (limited to 'command/updater/afterupdate.php')
-rw-r--r-- | command/updater/afterupdate.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/command/updater/afterupdate.php b/command/updater/afterupdate.php new file mode 100644 index 000000000..36e23b477 --- /dev/null +++ b/command/updater/afterupdate.php @@ -0,0 +1,40 @@ +<?php +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2016 + */ + +namespace OCA\News\Command\Updater; + +use Exception; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +use \OCA\News\Utility\Updater; + +class AfterUpdate extends Command { + private $updater; + + public function __construct(Updater $updater) { + parent::__construct(); + $this->updater = $updater; + } + + protected function configure() { + $this->setName('news:updater:after-update') + ->setDescription('This is used to clean up the database. It ' . + 'removes old read articles which are not starred'); + } + + protected function execute(InputInterface $input, OutputInterface $output) { + $this->updater->afterUpdate(); + } + +} |