a tiny mvc framework for php using php-activerecord

Config: prepend HALFMOON_ROOT so this works in and out of a chroot

+6 -2
+6 -2
lib/config.php
··· 73 73 $ar_dbs = array(); 74 74 foreach ($dbs as $henv => $db) { 75 75 if ($db["adapter"] == "sqlite") { 76 - $ar_dbs[$henv] = $db["adapter"] . "://unix(" . $db["database"] 77 - . ")" . (empty($db["charset"]) ? "" : 76 + $db_path = $db["database"]; 77 + if (substr($db_path, 0, 1) != "/") 78 + $db_path = realpath(HALFMOON_ROOT . "/" . $db_path); 79 + 80 + $ar_dbs[$henv] = $db["adapter"] . "://unix(" . $db_path . ")" 81 + . (empty($db["charset"]) ? "" : 78 82 "?charset=" . $db["charset"]); 79 83 } else { 80 84 if ($db["socket"] == "")