mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2025-02-01 12:31:38 +01:00
Fix installation after adding RestartQueueWorker::dispatch() to CleaCache
This commit is contained in:
parent
c33b770b2e
commit
78b52bfb81
@ -54,6 +54,9 @@ class ClearCache extends Command
|
||||
if (!$this->option('doNotGenerateVars')) {
|
||||
$this->call('freescout:generate-vars');
|
||||
}
|
||||
\App\Jobs\RestartQueueWorker::dispatch()->onQueue('default');
|
||||
// This should not be done during installation.
|
||||
if (\Helper::isInstalled()) {
|
||||
\App\Jobs\RestartQueueWorker::dispatch()->onQueue('default');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -949,7 +949,12 @@ class Helper
|
||||
|
||||
// User may add an extra translation to the app on Translate page,
|
||||
// we should allow user to see his custom translations.
|
||||
$custom_locales = \Helper::getCustomLocales();
|
||||
$custom_locales = [];
|
||||
try {
|
||||
$custom_locales = \Helper::getCustomLocales();
|
||||
} catch (\Exception $e) {
|
||||
// During installation it throws an error as there is no tables yet.
|
||||
}
|
||||
|
||||
if (count($custom_locales)) {
|
||||
$app_locales = array_unique(array_merge($app_locales, $custom_locales));
|
||||
@ -1687,4 +1692,9 @@ class Helper
|
||||
'ps (shell)' => function_exists('shell_exec') ? shell_exec('ps') : false,
|
||||
];
|
||||
}
|
||||
|
||||
public static function isInstalled()
|
||||
{
|
||||
return file_exists(storage_path().DIRECTORY_SEPARATOR.'.installed');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user