Improved the config system
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
|
||||
namespace CachetHQ\Cachet\Http\Controllers;
|
||||
|
||||
use CachetHQ\Cachet\Facades\Setting;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use Exception;
|
||||
use GrahamCampbell\Binput\Facades\Binput;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Jenssegers\Date\Date;
|
||||
|
||||
@@ -47,14 +47,14 @@ class StatusPageController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$daysToShow = Setting::get('app_incident_days', 0) - 1;
|
||||
$daysToShow = Config::get('setting.app_incident_days', 0) - 1;
|
||||
if ($daysToShow < 0) {
|
||||
$daysToShow = 0;
|
||||
$incidentDays = [];
|
||||
} else {
|
||||
$incidentDays = range(0, $daysToShow);
|
||||
}
|
||||
$dateTimeZone = Setting::get('app_timezone');
|
||||
$dateTimeZone = Config::get('cachet.timezone');
|
||||
|
||||
$incidentVisibility = Auth::check() ? 0 : 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user