simplified the paths.php file.
This commit is contained in:
parent
1847a369fb
commit
2b88c78896
|
@ -41,6 +41,7 @@ ## Laravel 3.2
|
||||||
- Allows pivot table timestamps to be disabled.
|
- Allows pivot table timestamps to be disabled.
|
||||||
- Made the `get_timestamp` Eloquent method static.
|
- Made the `get_timestamp` Eloquent method static.
|
||||||
- `Request::secure` now takes `application.ssl` configuration option into consideration.
|
- `Request::secure` now takes `application.ssl` configuration option into consideration.
|
||||||
|
- Simplified the `paths.php` file.
|
||||||
|
|
||||||
<a name="upgrade-3.2"></a>
|
<a name="upgrade-3.2"></a>
|
||||||
## Upgrading From 3.1
|
## Upgrading From 3.1
|
||||||
|
|
23
paths.php
23
paths.php
|
@ -9,17 +9,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Initialize the web variable if it doesn't exist.
|
// Change to the current working directory.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
if ( ! isset($web)) $web = false;
|
chdir(__DIR__);
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// Change to the current directory if not from the web.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
if ( ! $web)
|
|
||||||
{
|
|
||||||
chdir(__DIR__);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Define the directory separator for the environment.
|
// Define the directory separator for the environment.
|
||||||
|
@ -57,22 +49,13 @@
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// The path to the public directory.
|
// The path to the public directory.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
if ($web)
|
$paths['public'] = 'public';
|
||||||
{
|
|
||||||
$GLOBALS['laravel_paths']['public'] = realpath('').DS;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$paths['public'] = 'public';
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Define each constant if it hasn't been defined.
|
// Define each constant if it hasn't been defined.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
foreach ($paths as $name => $path)
|
foreach ($paths as $name => $path)
|
||||||
{
|
{
|
||||||
if ($web) $path = "../{$path}";
|
|
||||||
|
|
||||||
if ( ! isset($GLOBALS['laravel_paths'][$name]))
|
if ( ! isset($GLOBALS['laravel_paths'][$name]))
|
||||||
{
|
{
|
||||||
$GLOBALS['laravel_paths'][$name] = realpath($path).DS;
|
$GLOBALS['laravel_paths'][$name] = realpath($path).DS;
|
||||||
|
|
Loading…
Reference in New Issue