mirror of
				https://github.com/slawkens/myaac.git
				synced 2025-11-04 01:36:23 +01:00 
			
		
		
		
	Fixes regarding to init.php
This commit is contained in:
		@@ -16,6 +16,8 @@ class CacheClearCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		if (!clearCache()) {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,12 +2,8 @@
 | 
			
		||||
 | 
			
		||||
namespace MyAAC\Commands;
 | 
			
		||||
 | 
			
		||||
use MyAAC\Hooks;
 | 
			
		||||
use Symfony\Component\Console\Command\Command as SymfonyCommand;
 | 
			
		||||
 | 
			
		||||
class Command extends SymfonyCommand
 | 
			
		||||
{
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -16,10 +16,11 @@ class CronjobCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		// Create a new scheduler
 | 
			
		||||
		$scheduler = new Scheduler();
 | 
			
		||||
 | 
			
		||||
		global $hooks;
 | 
			
		||||
		$hooks->trigger(HOOK_CRONJOB, ['scheduler' => $scheduler]);
 | 
			
		||||
 | 
			
		||||
		// Let the scheduler execute jobs which are due.
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,8 @@ class CronjobInstallCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		if (MYAAC_OS !== 'LINUX') {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,8 @@ class MailSendCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		if (!setting('core.mail_enabled')) {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,8 @@ class MigrateRunCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		$ids = $input->getArgument('id');
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,8 @@ class PluginInstallCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		$pathToFile = $input->getArgument('plugin');
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,8 @@ class PluginInstallInstallCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		$pluginName = $input->getArgument('plugin');
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,8 @@ class SettingsResetCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		if (!$io->confirm('Are you sure you want to reset all settings in database?', false)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,8 @@ class SettingsSetCommand extends Command
 | 
			
		||||
 | 
			
		||||
	protected function execute(InputInterface $input, OutputInterface $output): int
 | 
			
		||||
	{
 | 
			
		||||
		require SYSTEM . 'init.php';
 | 
			
		||||
 | 
			
		||||
		$io = new SymfonyStyle($input, $output);
 | 
			
		||||
 | 
			
		||||
		$key = $input->getArgument('key');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user