minor visual improvements; add back edit link
[mdref/mdref] / public / index.php
index d4518cd3a26691a5387aea740d173ea90cc09703..6c477eeee40c3f17b1b0e15ee3f0a4f678a494b3 100644 (file)
@@ -3,7 +3,9 @@
 define("ROOT", dirname(__DIR__));
 define("REFS", getenv("REFPATH") ?: implode(PATH_SEPARATOR, glob(ROOT."/refs/*")));
 
-$loader = require __DIR__ . "/../vendor/autoload.php";
+#ini_set("open_basedir", ROOT.":".REFS);
+
+$loader = require ROOT . "/vendor/autoload.php";
 /* @var $loader \Composer\Autoload\ClassLoader */
 $loader->add("mdref", ROOT);
 
@@ -18,7 +20,7 @@ new ExceptionHandler;
 
 $ctl = new Controller;
 $ctl->setDependency("baseUrl", new Url)
-       ->attach(new Action)
+       ->attach(new Action(["refpath" => REFS]))
        ->attach(new Layout)
        ->notify()
        ->getResponse()