diff --git a/bin/fatfree b/bin/fatfree index 7c2f4c9..0e83748 100755 --- a/bin/fatfree +++ b/bin/fatfree @@ -8,7 +8,7 @@ foreach([ __DIR__.'/../vendor/autoload.php', __DIR__.'/../../../autoload.php' ] } } -define("DEVTOOLS_VERSION", '0.1.2'); +define("DEVTOOLS_VERSION", '0.3.1'); $fw = Base::instance(); $fw->DEBUG = 3; diff --git a/composer.lock b/composer.lock index 9e256e4..77eb039 100644 --- a/composer.lock +++ b/composer.lock @@ -11,12 +11,12 @@ "version": "3.8.1", "source": { "type": "git", - "url": "https://github.com/bcosca/fatfree-core.git", + "url": "https://github.com/f3-factory/fatfree-core.git", "reference": "f6ea45472f55a1ecabd4ced74cb56f0efd6af34e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bcosca/fatfree-core/zipball/f6ea45472f55a1ecabd4ced74cb56f0efd6af34e", + "url": "https://api.github.com/repos/f3-factory/fatfree-core/zipball/f6ea45472f55a1ecabd4ced74cb56f0efd6af34e", "reference": "f6ea45472f55a1ecabd4ced74cb56f0efd6af34e", "shasum": "" }, @@ -36,8 +36,8 @@ "description": "A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!", "homepage": "http://fatfreeframework.com/", "support": { - "issues": "https://github.com/bcosca/fatfree-core/issues", - "source": "https://github.com/bcosca/fatfree-core/tree/3.8.1" + "issues": "https://github.com/f3-factory/fatfree-core/issues", + "source": "https://github.com/f3-factory/fatfree-core/tree/3.8.1" }, "time": "2022-11-04T23:15:19+00:00" }, diff --git a/config/webtools_config.ini b/config/webtools_config.ini index 03c30ba..d4f4848 100644 --- a/config/webtools_config.ini +++ b/config/webtools_config.ini @@ -10,7 +10,7 @@ PROJECT_CONFIG = {{ @PROJECT_DATA_DIR.'project_config' }} CACHE = false [routes] -GET / = n0nag0n\Root_Controller->index +GET / = n0nag0n\Index_Controller->index GET /init-environment = n0nag0n\Init_Environment_Controller->indexAction GET /init-environment/build = n0nag0n\Init_Environment_Controller->build GET /init-environment/@page = n0nag0n\Init_Environment_Controller->pageAction @@ -40,4 +40,4 @@ GET /manage-composer = n0nag0n\Manage_Composer_Controller->indexAction [maps] -[redirects] \ No newline at end of file +[redirects] diff --git a/controllers/Base_Controller.php b/controllers/Base_Controller.php index 268d682..d1af179 100644 --- a/controllers/Base_Controller.php +++ b/controllers/Base_Controller.php @@ -9,13 +9,13 @@ abstract class Base_Controller { public function __construct(\Base $fw) { $this->fw = $fw; - $has_been_initted = $this->hasBeenInitted(); - if($this->hasBeenInitted() === false && strpos($this->fw->URI, '/init-environment') === false) { + $has_been_inited = $this->hasBeenInited(); + if($this->hasBeenInited() === false && strpos($this->fw->URI, '/init-environment') === false) { $this->fw->reroute('/init-environment', false); } - $this->fw->set('has_been_initted', $has_been_initted); - if($has_been_initted) { + $this->fw->set('has_been_inited', $has_been_inited); + if($has_been_inited) { $project_config = new Project_Config($fw->DB); $project_config->load(); $this->fw->set('project_config', $project_config); @@ -28,7 +28,7 @@ public function renderHtml(string $file_path, array $hive = []): void { echo \Template::instance()->render('layout.htm'); } - public function hasBeenInitted(): bool { + public function hasBeenInited(): bool { return file_exists($this->fw->PROJECT_CONFIG); } } diff --git a/controllers/Index_Controller.php b/controllers/Index_Controller.php index 4fa1691..6b004a2 100644 --- a/controllers/Index_Controller.php +++ b/controllers/Index_Controller.php @@ -4,14 +4,16 @@ namespace n0nag0n; -class Root_Controller extends Base_Controller { +class Index_Controller extends Base_Controller { + public function index(\Base $fw): void { // if the main config file is missing, start initing this bad boy - if(!$fw->has_been_initted) { - $fw->reroute('/init-environment', false); + if(!$fw->has_been_inited) { + $fw->reroute('/init-environment'); } $this->renderHtml('index/index.htm'); } + } diff --git a/ui/layout.htm b/ui/layout.htm index 7f76663..72046e6 100644 --- a/ui/layout.htm +++ b/ui/layout.htm @@ -18,7 +18,7 @@