From 89f957ae5a1b7ed61d8ea7dc7816203bff6bf1a7 Mon Sep 17 00:00:00 2001 From: mohrt Date: Sun, 8 Dec 2002 23:02:59 +0000 Subject: [PATCH] fix query part of URL --- libs/plugins/function.fetch.php | 7 ++----- plugins/function.fetch.php | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/libs/plugins/function.fetch.php b/libs/plugins/function.fetch.php index 46433d7f..e5cef2ba 100644 --- a/libs/plugins/function.fetch.php +++ b/libs/plugins/function.fetch.php @@ -50,11 +50,8 @@ function smarty_function_fetch($params, &$smarty) $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; $agent = "Smarty Template Engine ".$smarty->_version; $referer = ""; - if(!empty($uri_parts['path'])) { - $uri = $uri_parts['path']; - } else { - $uri = '/'; - } + $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; + $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; $_is_proxy = false; if(empty($uri_parts['port'])) { $port = 80; diff --git a/plugins/function.fetch.php b/plugins/function.fetch.php index 46433d7f..e5cef2ba 100644 --- a/plugins/function.fetch.php +++ b/plugins/function.fetch.php @@ -50,11 +50,8 @@ function smarty_function_fetch($params, &$smarty) $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; $agent = "Smarty Template Engine ".$smarty->_version; $referer = ""; - if(!empty($uri_parts['path'])) { - $uri = $uri_parts['path']; - } else { - $uri = '/'; - } + $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; + $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; $_is_proxy = false; if(empty($uri_parts['port'])) { $port = 80;