From 2560800efb703f4c5828672d7ad2cedaf12b8842 Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Tue, 28 Apr 2020 11:43:07 +0200 Subject: [PATCH] Storm patrik Fixes --- ...{automation.php => automationController.php} | 0 .../{dashboard.php => dashboardController.php} | 0 .../{home.php => homeController.php} | 0 .../{login.php => loginController.php} | 0 .../{scene.php => sceneController.php} | 0 .../{setting.php => settingController.php} | 0 app/controllers/settings.php | 17 ----------------- app/models/Partial.php | 4 ++-- {app/models => library}/DB.php | 0 library/Template.php | 4 ++-- 10 files changed, 4 insertions(+), 21 deletions(-) rename app/controllers/{automation.php => automationController.php} (100%) rename app/controllers/{dashboard.php => dashboardController.php} (100%) rename app/controllers/{home.php => homeController.php} (100%) rename app/controllers/{login.php => loginController.php} (100%) rename app/controllers/{scene.php => sceneController.php} (100%) rename app/controllers/{setting.php => settingController.php} (100%) delete mode 100644 app/controllers/settings.php rename {app/models => library}/DB.php (100%) diff --git a/app/controllers/automation.php b/app/controllers/automationController.php similarity index 100% rename from app/controllers/automation.php rename to app/controllers/automationController.php diff --git a/app/controllers/dashboard.php b/app/controllers/dashboardController.php similarity index 100% rename from app/controllers/dashboard.php rename to app/controllers/dashboardController.php diff --git a/app/controllers/home.php b/app/controllers/homeController.php similarity index 100% rename from app/controllers/home.php rename to app/controllers/homeController.php diff --git a/app/controllers/login.php b/app/controllers/loginController.php similarity index 100% rename from app/controllers/login.php rename to app/controllers/loginController.php diff --git a/app/controllers/scene.php b/app/controllers/sceneController.php similarity index 100% rename from app/controllers/scene.php rename to app/controllers/sceneController.php diff --git a/app/controllers/setting.php b/app/controllers/settingController.php similarity index 100% rename from app/controllers/setting.php rename to app/controllers/settingController.php diff --git a/app/controllers/settings.php b/app/controllers/settings.php deleted file mode 100644 index dcda809..0000000 --- a/app/controllers/settings.php +++ /dev/null @@ -1,17 +0,0 @@ -debug = $debug; - if (!empty('../app/templates/part/' . $path . '.phtml') && file_exists('../app/templates/part/' . $path . '.phtml')) { + if (!empty('../app/views/templates/part/' . $path . '.phtml') && file_exists('../app/views/templates/part/' . $path . '.phtml')) { $this->path = $path; } else { echo '
';
@@ -29,6 +29,6 @@ class Partial{
 			extract($this->assignedValues);
 		}
 
-		require('../app/templates/part/' . $this->path . '.phtml');
+		require('../app/views/templates/part/' . $this->path . '.phtml');
 	}
 }
diff --git a/app/models/DB.php b/library/DB.php
similarity index 100%
rename from app/models/DB.php
rename to library/DB.php
diff --git a/library/Template.php b/library/Template.php
index 390a35f..65ce1c0 100644
--- a/library/Template.php
+++ b/library/Template.php
@@ -26,8 +26,8 @@ class Template{
 
 	function render() {
 		extract($this->assignedValues);
-		if (!empty('../app/controls/' . $this->path . '.php') && file_exists('../app/controls/' . $this->path . '.php')) {
-			include('../app/controls/' . $this->path . '.php');
+		if (!empty('../app/controllers/' . $this->path . 'Controller.php') && file_exists('../app/controllers/' . $this->path . 'Controller.php')) {
+			include('../app/controllers/' . $this->path . 'Controller.php');
 		}
 		require_once('../app/views/templates/' . $this->path . '.phtml');
 	}