update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -15,6 +15,7 @@ use App\User;
// classes
use Artisan;
use Config;
use DB;
use Exception;
use File;
use Hash;
@@ -303,10 +304,16 @@ class InstallController extends Controller
}
} catch (Exception $e) {
}
if ($request->input('dummy-data') == 'on') {
$path = base_path().'/DB/dummy-data.sql';
// dd($path);
DB::unprepared(file_get_contents($path));
} else {
// migrate database
Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]);
}
// migrate database
Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]);
// create user
$firstname = $request->input('firstname');
$lastname = $request->input('Lastname');
@@ -391,6 +398,13 @@ class InstallController extends Controller
$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);
$app_url = app_path('../config/app.php');
$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 {
@@ -400,6 +414,7 @@ class InstallController extends Controller
Session::forget('step4');
Session::forget('step5');
Session::forget('step6');
Artisan::call('key:generate');
return View::make('themes/default1/installer/helpdesk/view6');
} catch (Exception $e) {
@@ -424,4 +439,30 @@ class InstallController extends Controller
return redirect('/auth/login');
}
}
public function changeFilePermission()
{
$path1 = base_path().DIRECTORY_SEPARATOR.'.env';
$path2 = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'database.php';
$path3 = base_path().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'Http'.DIRECTORY_SEPARATOR.'routes.php';
$path4 = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'lfm.php';
if (chmod($path1, 0644) && chmod($path2, 0644) && chmod($path3, 0644) && chmod($path4, 0644)) {
$f1 = substr(sprintf('%o', fileperms($path1)), -3);
$f2 = substr(sprintf('%o', fileperms($path2)), -3);
$f3 = substr(sprintf('%o', fileperms($path3)), -3);
$f4 = substr(sprintf('%o', fileperms($path4)), -3);
if ($f1 >= '644' && $f2 >= '644' && $f3 >= '644' && $f4 >= '644') {
return Redirect::back();
} else {
return Redirect::back()->with('fail_to_change', 'We are unable to change file permission on your server please try to change permission manually.');
}
} else {
return Redirect::back()->with('fail_to_change', 'We are unable to change file permission on your server please try to change permission manually.');
}
}
public function jsDisabled()
{
return view('themes/default1/installer/helpdesk/check-js')->with('url', $_SERVER['HTTP_REFERER']);
}
}