Fixes lighttpd issues.

This commit is contained in:
Lars Jung
2012-11-02 01:11:08 +01:00
parent 84be82d175
commit 5e28056257
2 changed files with 4 additions and 4 deletions

View File

@@ -121,13 +121,13 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
} }
var item = getItem(); var item = getItem();
if (item.isLocationLoaded) { if (item.isLoaded) {
event.pub('location.changed', item); event.pub('location.changed', item);
refresh(); refresh();
} else { } else {
notify.set('loading...'); notify.set('loading...');
load(function () { load(function () {
item.isLocationLoaded = true; item.isLoaded = true;
notify.set(); notify.set();
event.pub('location.changed', item); event.pub('location.changed', item);
}); });
@@ -136,7 +136,6 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
refresh = function () { refresh = function () {
var item = getItem(), var item = getItem(),
oldItems = _.values(item.content); oldItems = _.values(item.content);

View File

@@ -7,7 +7,8 @@ function normalize_path($path, $trailing_slash = false) {
} }
define("APP_ABS_PATH", normalize_path(dirname(dirname(dirname(__FILE__))))); define("APP_ABS_PATH", normalize_path(dirname(dirname(dirname(__FILE__)))));
define("APP_ABS_HREF", normalize_path(dirname(dirname(dirname(getenv("SCRIPT_NAME")))), true)); // define("APP_ABS_HREF", normalize_path(dirname(dirname(dirname(getenv("SCRIPT_NAME")))), true));
define("APP_ABS_HREF", normalize_path(dirname(dirname(dirname(preg_replace('#^.*//#', '/', getenv("SCRIPT_NAME"))))), true)); // fixes lighttpd issues
define("ABS_HREF", normalize_path(preg_replace('/[^\\/]*$/', '', getenv("REQUEST_URI")), true)); define("ABS_HREF", normalize_path(preg_replace('/[^\\/]*$/', '', getenv("REQUEST_URI")), true));
function normalized_require_once($lib) { function normalized_require_once($lib) {