show warning when key is not set.
This commit is contained in:
parent
d20deb2847
commit
96b43e90b3
|
@ -69,6 +69,14 @@
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
#main div.warning {
|
||||
background-color: #feefb3;
|
||||
border: 1px solid;
|
||||
border-radius: 5px;
|
||||
color: #9f6000;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#main ul {
|
||||
margin: 10px 0;
|
||||
padding: 0 30px;
|
||||
|
@ -81,6 +89,18 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<?php if (Config::get('application.key') == ''): ?>
|
||||
|
||||
<h1>Whoops!</h1>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="warning">
|
||||
Please set an application key in <strong>application/config/application.php</strong>!
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<h1>Welcome To Laravel</h1>
|
||||
|
||||
<h2>A Framework For Web Artisans</h2>
|
||||
|
@ -117,6 +137,8 @@
|
|||
<li><a href="http://github.com/laravel/laravel">GitHub Repository</a></li>
|
||||
</ul>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -7,19 +7,6 @@
|
|||
*/
|
||||
require 'core.php';
|
||||
|
||||
/**
|
||||
* Verify that an application key has been set in the configuration.
|
||||
* The key is used to do proper signature hashing on cookies, as
|
||||
* well as keep various other parts of the framework secure, so
|
||||
* it is a required configuration option.
|
||||
*/
|
||||
if (Config::$items['application']['application']['key'] == '')
|
||||
{
|
||||
$path = 'application/config/application.php';
|
||||
|
||||
die("Please set an application key in <b>{$path}</b>.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the default timezone for the application. This will be the
|
||||
* default timezone used by all date / timezone functions throughout
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) <2011> <Taylor Otwell> <taylorotwell@gmail.com>
|
||||
Copyright (c) <2012> <Taylor Otwell> <taylorotwell@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
Loading…
Reference in New Issue