1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Introduzione procedura di configurazione

This commit is contained in:
Dasc3er
2021-02-19 11:54:03 +01:00
parent 73129be4a7
commit b93ee1a7f6
35 changed files with 1432 additions and 166 deletions

View File

@@ -12,17 +12,17 @@ class LegacyController extends Controller
{
public function index($path = 'index.php')
{
$base_path = realpath(__DIR__.'/../../../legacy/');
$base_path = base_path('legacy/');
$file = realpath($base_path.'/'.$path);
if (strpos($file, $base_path) === false){
if (strpos($file, $base_path) === false) {
throw new NotFoundHttpException();
}
ob_start();
try {
require $file;
} catch (LegacyExitException $e) {
}catch (LegacyRedirectException $e){
} catch (LegacyExitException $e) {
} catch (LegacyRedirectException $e) {
return Redirect::to($e->getMessage());
}