-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #403 from tyrant88/tyrant88-patch-192
6.12.1 cronjob to clear search cache
- Loading branch information
Showing
11 changed files
with
90 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* @package redaxo\be-style | ||
* | ||
* @author bloep | ||
* | ||
* @internal | ||
*/ | ||
class rex_search_it_command_clearcache extends rex_console_command | ||
{ | ||
protected function configure() | ||
{ | ||
$this->setDescription(rex_i18n::rawMsg('search_it_generate_delete_cache')); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$io = $this->getStyle($input, $output); | ||
$io->title('search_it clear cache'); | ||
|
||
$search_it = new search_it(); | ||
$global_return = $search_it->deleteCache(); | ||
|
||
if ($global_return < 4) { | ||
echo $io->success(rex_i18n::rawMsg('search_it_generate_cache_deleted')); | ||
return 0; | ||
} else { | ||
echo $io->error(rex_i18n::rawMsg('search_it_generate_cache_deleted_error')); | ||
} | ||
|
||
return 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
class rex_cronjob_clearcache extends rex_cronjob | ||
{ | ||
public function execute() | ||
{ | ||
|
||
if (rex_addon::get('search_it')->isAvailable()) { | ||
|
||
//$message = $this->getParam('action').':'."\n"; | ||
|
||
$search_it = new search_it(); | ||
|
||
$search_it->deleteCache(); | ||
|
||
|
||
|
||
//if ( $message != '' ) { $this->setMessage($message); } | ||
return true; | ||
} | ||
$this->setMessage('Search it is not installed'); | ||
return false; | ||
} | ||
|
||
public function getTypeName() | ||
{ | ||
return rex_i18n::msg('search_it_generate_delete_cache'); | ||
} | ||
|
||
public function getParamFields() | ||
{ | ||
$fields = []; | ||
return $fields; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters