summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-21 12:49:30 +0200
committerandi <andi@splitbrain.org>2005-05-21 12:49:30 +0200
commit5233912627d370d8a346a810cc95c46554a4a8e1 (patch)
treed2ae24c0e8e3f88c255a02910eaf75860a914b20
parent7d8be2006640e723bf77e0c1a74adf2e672e5246 (diff)
downloadrpg-5233912627d370d8a346a810cc95c46554a4a8e1.tar.gz
rpg-5233912627d370d8a346a810cc95c46554a4a8e1.tar.bz2
fix for internal rewrites #332
darcs-hash:20050521104930-9977f-f93dd746cbb3db2ebda43a044198c2eb0aa4152b.gz
-rw-r--r--inc/pageutils.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index fdece44e4..731c3415c 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -34,9 +34,12 @@ function getID(){
$script = $_SERVER['SCRIPT_NAME'];
}
+ //clean script and request (fixes a windows problem)
+ $script = preg_replace('/\/\/+/','/',$script);
+ $request = preg_replace('/\/\/+/','/',$_SERVER['REQUEST_URI']);
+
//remove script URL and Querystring to gain the id
- if(preg_match('/^'.preg_quote($script,'/').'(.*)/',
- $_SERVER['REQUEST_URI'], $match)){
+ if(preg_match('/^'.preg_quote($script,'/').'(.*)/',$request, $match)){
$id = preg_replace ('/\?.*/','',$match[1]);
}
$id = cleanID($id);