From 6bc1ffdef4a90317c79a6e8e87ef3d03ee5e090d Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 31 Oct 2018 15:19:03 +0100 Subject: not relevant anymore Signed-off-by: Maxence Lange --- lib/Migration/ResetIndexes.php | 102 ----------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 lib/Migration/ResetIndexes.php (limited to 'lib') diff --git a/lib/Migration/ResetIndexes.php b/lib/Migration/ResetIndexes.php deleted file mode 100644 index 7bc1389..0000000 --- a/lib/Migration/ResetIndexes.php +++ /dev/null @@ -1,102 +0,0 @@ - - * @copyright 2018 - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -namespace OCA\FullTextSearch\Migration; - -use OCA\FullTextSearch\Db\IndexesRequest; -use OCA\FullTextSearch\Service\ProviderService; -use OCP\Migration\IOutput; -use OCP\Migration\IRepairStep; - -/** - * Class ResetDatabase - * - * @package OCA\FullTextSearch\Migration - */ -class ResetIndexes implements IRepairStep { - - /** @var IndexesRequest */ - protected $indexRequest; - - /** @var ProviderService */ - protected $providerService; - - - /** - * ResetDatabase constructor. - * - * @param IndexesRequest $indexRequest - * @param ProviderService $providerService - */ - public function __construct(IndexesRequest $indexRequest, ProviderService $providerService) { - $this->indexRequest = $indexRequest; - $this->providerService = $providerService; - } - - - /** - * Returns the step's name - * - * @return string - * @since 9.1.0 - */ - public function getName() { - return 'Reset index'; - } - - - /** - * @param IOutput $output - */ - public function run(IOutput $output) { - - $oldVersion = explode( - '.', \OC::$server->getConfig() - ->getAppValue('fulltextsearch', 'installed_version', '') - ); - - if ((int)$oldVersion[0] === 0 - && (int)$oldVersion[1] < 6) { - $this->resetIndexes($output); - } - - } - - - /** - * @param IOutput $output - */ - public function resetIndexes(IOutput $output) { - $output->info('Reset database'); - -// $this->indexRequest->reset(); -// $this->providerService->setProvidersAsNotIndexed(); - - - $output->finishProgress(); - } - -} -- cgit v1.2.3