summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/pageutils.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 25ba01684..bf629c097 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -30,7 +30,11 @@ function getID($param='id'){
if(empty($id) && $conf['userewrite'] == 2){
//get the script URL
if($conf['basedir']){
- $script = $conf['basedir'].basename($_SERVER['SCRIPT_FILENAME']);
+ $relpath = '';
+ if($param != 'id') {
+ $relpath = 'lib/exe/';
+ }
+ $script = $conf['basedir'].$relpath.basename($_SERVER['SCRIPT_FILENAME']);
}elseif($_SERVER['DOCUMENT_ROOT'] && $_SERVER['SCRIPT_FILENAME']){
$script = preg_replace ('/^'.preg_quote($_SERVER['DOCUMENT_ROOT'],'/').'/','',
$_SERVER['SCRIPT_FILENAME']);