1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Fixes for setup

This commit is contained in:
David Bomba 2020-11-02 11:23:02 +11:00
parent a829db9890
commit 9bbffea260
3 changed files with 3 additions and 19 deletions

View File

@ -131,7 +131,7 @@ class SetupController extends Controller
VersionCheck::dispatchNow(); VersionCheck::dispatchNow();
$this->buildCache(); $this->buildCache(true);
return redirect('/'); return redirect('/');
} catch (Exception $e) { } catch (Exception $e) {

View File

@ -36,22 +36,6 @@ class Gateway extends StaticModel
protected $dateFormat = 'Y-m-d H:i:s.u'; protected $dateFormat = 'Y-m-d H:i:s.u';
// /**
// * @return mixed
// * @deprecated 5.0.17 No longer needs as we are removing omnipay dependence
// */
// public function getFields()
// {
// if ($this->isCustom()) {
// return [
// 'name' => '',
// 'text' => '',
// ];
// } else {
// return Omnipay::create($this->provider)->getDefaultParameters();
// }
// }
public function getOptionsAttribute() public function getOptionsAttribute()
{ {
return $this->getMethods(); return $this->getMethods();

View File

@ -30,12 +30,12 @@ trait AppSetup
return $check['system_health'] == 'true'; return $check['system_health'] == 'true';
} }
public function buildCache() public function buildCache($force = false)
{ {
$cached_tables = config('ninja.cached_tables'); $cached_tables = config('ninja.cached_tables');
foreach ($cached_tables as $name => $class) { foreach ($cached_tables as $name => $class) {
if (request()->has('clear_cache') || ! Cache::has($name)) { if (request()->has('clear_cache') || ! Cache::has($name) || $force) {
// check that the table exists in case the migration is pending // check that the table exists in case the migration is pending
if (! Schema::hasTable((new $class())->getTable())) { if (! Schema::hasTable((new $class())->getTable())) {