diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-02-03 16:39:45 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-02-03 16:39:45 +0100 |
commit | 0868021bf5712da12fd19903d02210f25a573f5d (patch) | |
tree | 43d80739d8749608f47ddd8a6abce86e98ea3512 | |
parent | 82fd59b6cf8cda9b2c419fb08bbc40a571b36fe8 (diff) | |
download | rpg-0868021bf5712da12fd19903d02210f25a573f5d.tar.gz rpg-0868021bf5712da12fd19903d02210f25a573f5d.tar.bz2 |
fix special char ID handling
A given ID consisting of special chars only (either added manually in the URL
or in the search box) will be ignored correctly now.
darcs-hash:20060203153945-7ad00-60fc38b49604f45bb2ca912a9c76c619ad60ac44.gz
-rw-r--r-- | inc/actions.php | 3 | ||||
-rw-r--r-- | inc/pageutils.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/inc/actions.php b/inc/actions.php index 315e35da8..eb43bb13f 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -27,7 +27,8 @@ function act_dispatch(){ $ACT = act_clean($ACT); //check if searchword was given - else just show - if($ACT == 'search' && empty($QUERY)){ + $s = cleanID($QUERY); + if($ACT == 'search' && empty($s)){ $ACT = 'show'; } diff --git a/inc/pageutils.php b/inc/pageutils.php index a6432619d..73be0a3a8 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -52,8 +52,8 @@ function getID($param='id',$clean=true){ //strip leading slashes $id = preg_replace('!^/+!','',$id); } - if(empty($id) && $param=='id') $id = $conf['start']; if($clean) $id = cleanID($id); + if(empty($id) && $param=='id') $id = $conf['start']; return $id; } |