From a652177a65cc17c8dddaa739d30ce40dc20d68a9 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 8 Oct 2011 11:29:11 +0200 Subject: include trailing slash in config weburl variable When running CGP in the root, the header didn't link to the overview page because the href was empty. Reported-by: Nikoli --- conf/common.inc.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'conf') diff --git a/conf/common.inc.php b/conf/common.inc.php index c4884d6..165c73f 100644 --- a/conf/common.inc.php +++ b/conf/common.inc.php @@ -3,6 +3,4 @@ require_once 'config.php'; $CONFIG['webdir'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_FILENAME']); -$CONFIG['weburl'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); - -?> +$CONFIG['weburl'] = preg_replace('/(?<=\/)[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); -- cgit v1.1