Improved the config system

This commit is contained in:
Graham Campbell
2016-01-29 22:49:06 +00:00
parent 51e850ddc2
commit 1b24cdb1c5
35 changed files with 188 additions and 232 deletions

View File

@@ -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;