1
0
Fork 0

Overhauling proxy_url: use $shortpath for long URL in writemode

This commit is contained in:
Hypolite Petovan 2016-11-19 14:03:31 -05:00
parent a6bdb2c34a
commit 1cf9506646

View file

@ -306,7 +306,7 @@ function proxy_url($url, $writemode = false, $size = '') {
// Too long files aren't supported by Apache // Too long files aren't supported by Apache
// Writemode in combination with long files shouldn't be possible // Writemode in combination with long files shouldn't be possible
if ((strlen($proxypath) > 250) AND $writemode) { if ((strlen($proxypath) > 250) AND $writemode) {
return hash('md5', $url); return $shortpath;
} elseif (strlen($proxypath) > 250) { } elseif (strlen($proxypath) > 250) {
return $a->get_baseurl() . '/proxy/' . $shortpath . '?url=' . urlencode($url); return $a->get_baseurl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
} elseif ($writemode) { } elseif ($writemode) {