summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-08-14 14:47:31 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-08-14 14:47:31 +0200
commit48665d389b9bb386283c08172b24f3af26628bce (patch)
tree45d62a5af90821de9ef3e208554e89390f726e48
parent26a0801f0a07097077c93422bc92ed2228716cdc (diff)
downloadrpg-48665d389b9bb386283c08172b24f3af26628bce.tar.gz
rpg-48665d389b9bb386283c08172b24f3af26628bce.tar.bz2
fix for external images and the media rewrite patch
darcs-hash:20050814124731-7ad00-9ec2fa2e3a188e3d0b06fc3f15135a05dc99d3dd.gz
-rw-r--r--inc/common.php4
-rw-r--r--inc/pageutils.php8
2 files changed, 8 insertions, 4 deletions
diff --git a/inc/common.php b/inc/common.php
index 5d6287ada..0fdeec63b 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -285,9 +285,9 @@ function ml($id='',$more='',$direct=true){
$xlink .= 'lib/exe/fetch.php';
if($more){
$xlink .= '?'.$more;
- $xlink .= '&amp;media='.$id;
+ $xlink .= '&amp;media='.urlencode($id);
}else{
- $xlink .= '?media='.$id;
+ $xlink .= '?media='.urlencode($id);
}
return $xlink;
}
diff --git a/inc/pageutils.php b/inc/pageutils.php
index d81d22a58..e22dc3c86 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -13,14 +13,18 @@
* Uses either standard $_REQUEST variable or extracts it from
* the full request URI when userewrite is set to 2
*
- * Returns $conf['start'] if no id was found and $param is 'id'
+ * For $param='id' $conf['start'] is returned if no id was found
+ * and the returned ID will be cleaned. For other params the
+ * cleaning has to be done outside this function
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getID($param='id'){
global $conf;
- $id = cleanID($_REQUEST[$param]);
+ $id = $_REQUEST[$param];
+
+ if($param == 'id') $id = cleanID($id);
//construct page id from request URI
if(empty($id) && $conf['userewrite'] == 2){