Cleans and improves PHP code.

This commit is contained in:
Lars Jung 2012-10-06 16:50:43 +02:00
parent c6a9374488
commit 42cfe55ef3
10 changed files with 115 additions and 156 deletions

View file

@ -8,6 +8,7 @@ function normalize_path($path, $trailing_slash = false) {
define("APP_ABS_PATH", normalize_path(dirname(dirname(dirname(dirname(__FILE__))))));
define("APP_ABS_HREF", normalize_path(dirname(dirname(dirname(getenv("SCRIPT_NAME")))), true));
define("ABS_HREF", normalize_path(preg_replace('/[^\\/]*$/', '', getenv("REQUEST_URI")), true));
function normalized_require_once($lib) {
@ -17,8 +18,7 @@ function normalized_require_once($lib) {
normalized_require_once("/server/php/inc/util.php");
normalized_require_once("/server/php/inc/App.php");
normalized_require_once("/server/php/inc/Entry.php");
normalized_require_once("/conf/config.php");
$APP = new H5ai(APP_ABS_PATH, APP_ABS_HREF);
$APP = new App(APP_ABS_PATH, APP_ABS_HREF, ABS_HREF);
?>