Reestruturacao da pasta app e mudancas nos templates

This commit is contained in:
ahwelp
2020-04-14 22:41:02 -03:00
parent b66dcff003
commit 9548157f02
24 changed files with 85 additions and 62 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
use Routes\RouteCollection as RouteCollection;
use DDLWrapper\Wrapper as Wrapper;
RouteCollection::cli('sanity/install', function() {
include_once 'classes/Migrator.class.php';
global $DB;
Wrapper::set_driver($DB);
Migrator::getInstance()->execute_plan();
Wrapper::commit();
})->middlewareIgnore('auth');
RouteCollection::add('*', '*', function() {
global $ROUTE;
if(INSTALL_REQUIRE){
//App need to be installed
if (!is_file(DIR_CONFIG . 'modules.ini')) {
$ROUTE->doBlock()->setHttpError(500);
}
}
}, -19)->doIgnore()->middlewareIgnore('auth');