diff options
author | Jason Oster <parasytic@users.sourceforge.net> | 2010-05-12 15:26:49 +0000 |
---|---|---|
committer | Jason Oster <parasytic@users.sourceforge.net> | 2010-05-12 15:26:49 +0000 |
commit | 3920179c73e5b78591003ec36ea7991e7f06fd60 (patch) | |
tree | 471d97f077939a053dc2011717b4c553666bebc0 | |
parent | cf1573b46f7927e4c0963a1b4f6f5dac64dec10c (diff) | |
download | phpicalendar-3920179c73e5b78591003ec36ea7991e7f06fd60.tar.gz phpicalendar-3920179c73e5b78591003ec36ea7991e7f06fd60.tar.bz2 phpicalendar-3920179c73e5b78591003ec36ea7991e7f06fd60.zip |
Fix a bug with URL query strings in the new remote_filemtime()
-rw-r--r-- | functions/date_functions.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/functions/date_functions.php b/functions/date_functions.php index cd82fd5..a97e3ca 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -25,11 +25,9 @@ function remote_filemtime($url, $recurse = 0) { '' ); $uri['port'] = isset($uri['port']) ? $uri['port'] : 80; - $path = ( - (isset($uri['path']) || isset($uri['query'])) ? - (@$uri['path'] . @$uri['query']) : - '/' - ); + $uri['path'] = isset($uri['path']) ? $uri['path'] : '/'; + $uri['query'] = isset($uri['query']) ? ('?' . $uri['query']) : ''; + $path = $uri['path'] . $uri['query']; $auth = ( (isset($uri['user']) || isset($uri['pass'])) ? ('Authentication: Basic ' . base64_encode(@$uri['user'] . ':' . @$uri['pass']) . "\r\n") : |