Throws an exception when the installer has not yet been executed.
This commit is contained in:
@@ -4,6 +4,7 @@ use Maveriks\Http\Response;
|
||||
use Maveriks\Pattern\Mvc\PhtmlView;
|
||||
use ProcessMaker\Core\AppEvent;
|
||||
use ProcessMaker\Exception\RBACException;
|
||||
use ProcessMaker\Exception\ExecuteInstallerException;
|
||||
|
||||
// Because laravel has a __ helper function, it's important we include the class.g file to ensure our __ is used.
|
||||
require_once __DIR__ . '/../../gulliver/system/class.g.php';
|
||||
@@ -57,6 +58,13 @@ try {
|
||||
}
|
||||
} catch (RBACException $e) {
|
||||
G::header('location: ' . $e->getPath());
|
||||
} catch (ExecuteInstallerException $e) {
|
||||
$view = new PhtmlView($rootDir . "framework/src/templates/error.phtml");
|
||||
$view->set("title", "Installation Required");
|
||||
$view->set("message", "Please run lurana-installer to use the software. \n\nIf you've already run it, there might be an issue. \nPlease contact support.");
|
||||
$view->set("exception", $e);
|
||||
$response = new Response($view->getOutput(), 403);
|
||||
$response->send();
|
||||
} catch (Exception $e) {
|
||||
$view = new PhtmlView($rootDir . "framework/src/templates/Exception.phtml");
|
||||
$view->set("message", $e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user