Fixed problem updating cache when upgrading

This commit is contained in:
Hillel Coren 2016-01-12 15:54:19 +02:00
parent bc0ab97279
commit 9bd6d1afe6
2 changed files with 5 additions and 4 deletions

View File

@ -154,13 +154,14 @@ class StartupCheck
} }
foreach ($cachedTables as $name => $class) { foreach ($cachedTables as $name => $class) {
if (Input::has('clear_cache') || !Cache::has($name)) { if (Input::has('clear_cache') || !Cache::has($name)) {
if ( ! class_exists($class)) {
continue;
}
if ($name == 'paymentTerms') { if ($name == 'paymentTerms') {
$orderBy = 'num_days'; $orderBy = 'num_days';
} } elseif ($name == 'fonts') {
else if ($name == 'fonts') {
$orderBy = 'sort_order'; $orderBy = 'sort_order';
} elseif (in_array($name, ['currencies', 'industries', 'languages', 'countries'])) { } elseif (in_array($name, ['currencies', 'industries', 'languages', 'countries'])) {
$orderBy = 'name'; $orderBy = 'name';
} else { } else {
$orderBy = 'id'; $orderBy = 'id';

View File

@ -437,7 +437,7 @@ if (!defined('CONTACT_EMAIL')) {
define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG'); define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG');
define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://app.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com');
define('NINJA_VERSION', '2.4.9'); define('NINJA_VERSION', '2.4.9.1');
define('NINJA_DATE', '2000-01-01'); define('NINJA_DATE', '2000-01-01');
define('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'); define('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja');