update v1.0.7.7
This commit is contained in:
@@ -192,7 +192,7 @@ class InstallController extends Controller
|
||||
$dbpassword = Input::get('password');
|
||||
$port = Input::get('port');
|
||||
|
||||
$ENV['APP_ENV'] = 'local';
|
||||
$ENV['APP_ENV'] = 'production';
|
||||
$ENV['APP_DEBUG'] = 'false';
|
||||
$ENV['APP_KEY'] = 'SomeRandomString';
|
||||
$ENV['APP_BUGSNAG'] = 'true';
|
||||
@@ -218,9 +218,10 @@ class InstallController extends Controller
|
||||
$config .= "{$key}={$val}\n";
|
||||
}
|
||||
// Write environment file
|
||||
$fp = fopen(base_path().'/.env', 'w');
|
||||
$fp = fopen(base_path().DIRECTORY_SEPARATOR.'example.env', 'w');
|
||||
fwrite($fp, $config);
|
||||
fclose($fp);
|
||||
rename(base_path().DIRECTORY_SEPARATOR.'example.env', base_path().DIRECTORY_SEPARATOR.'.env');
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -273,7 +274,10 @@ class InstallController extends Controller
|
||||
try {
|
||||
$check_for_pre_installation = System::all();
|
||||
if ($check_for_pre_installation) {
|
||||
return redirect()->back()->with('fails', 'The data in database already exist. Please provide fresh database');
|
||||
rename(base_path().DIRECTORY_SEPARATOR.'.env', base_path().DIRECTORY_SEPARATOR.'example.env');
|
||||
Cache::put('fails', 'The data in database already exist. Please provide fresh database', 2);
|
||||
|
||||
return redirect()->route('configuration');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
@@ -358,13 +362,7 @@ class InstallController extends Controller
|
||||
File::put($install, $datacontent);
|
||||
// setting email settings in route
|
||||
$smtpfilepath = "\App\Http\Controllers\Common\SettingsController::smtp()";
|
||||
$lfmpath = "url('photos').'/'";
|
||||
$path22 = app_path('Http/routes.php');
|
||||
$path23 = base_path('config/lfm.php');
|
||||
$content23 = File::get($path22);
|
||||
$content24 = File::get($path23);
|
||||
$content23 = str_replace('"%smtplink%"', $smtpfilepath, $content23);
|
||||
$content24 = str_replace("'%url%'", $lfmpath, $content24);
|
||||
|
||||
$link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
||||
$pos = strpos($link, 'final');
|
||||
$link = substr($link, 0, $pos);
|
||||
@@ -372,8 +370,6 @@ class InstallController extends Controller
|
||||
$datacontent2 = File::get($app_url);
|
||||
$datacontent2 = str_replace('http://localhost', $link, $datacontent2);
|
||||
File::put($app_url, $datacontent2);
|
||||
File::put($path22, $content23);
|
||||
File::put($path23, $content24);
|
||||
try {
|
||||
Cache::flush();
|
||||
|
||||
|
Reference in New Issue
Block a user