From 9250262017b605495c879a12ed38c693b1e024cc Mon Sep 17 00:00:00 2001
From: M <m@lfurio.us>
Date: Sun, 22 Nov 2015 02:25:58 -0500
Subject: * Root controller is now asserting the existence of scrott.conf.php
 and delegating to the correct mvc if it is missing

---
 app/controller/root.control.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'app/controller')

diff --git a/app/controller/root.control.php b/app/controller/root.control.php
index bb7bb4e..6263862 100644
--- a/app/controller/root.control.php
+++ b/app/controller/root.control.php
@@ -1,6 +1,7 @@
 <?php
 
 require_once "class/controller.class.php";
+require_once "controller/sysconf.control.php";
 
 /*
  * Root-level controller for Scrott app.  This object will delegate the page request to the
@@ -13,9 +14,14 @@ class Root extends Controller
      */
     function handle($argv)
     {
+        /* First, make sure the system configuration file has been included */
+        if (!$this->scrottConfExists())
+        {
+            $ctrl = new Sysconf();
+            $ctrl->handle($argv);
+        }
+
         /* TODO */
-        $argv = $this->normalizeArgv($argv);
-        echo implode("/", $argv);
     }
 
     /*
-- 
cgit v1.2.3