1
0
Fork 0

App::get_baseurl is now replaced with System::baseUrl

This commit is contained in:
Michael 2017-08-26 07:32:10 +00:00
commit 5adfeb0bd5
134 changed files with 603 additions and 624 deletions

View file

@ -266,7 +266,7 @@ function proxy_url($url, $writemode = false, $size = '') {
// Only continue if it isn't a local image and the isn't deactivated
if (proxy_is_local_image($url)) {
$url = str_replace(normalise_link(App::get_baseurl()) . '/', App::get_baseurl() . '/', $url);
$url = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $url);
return $url;
}
@ -299,7 +299,7 @@ function proxy_url($url, $writemode = false, $size = '') {
$longpath .= '.' . $extension;
}
$proxypath = App::get_baseurl() . '/proxy/' . $longpath;
$proxypath = System::baseUrl() . '/proxy/' . $longpath;
if ($size != '') {
$size = ':' . $size;
@ -310,7 +310,7 @@ function proxy_url($url, $writemode = false, $size = '') {
if ((strlen($proxypath) > 250) && $writemode) {
return $shortpath;
} elseif (strlen($proxypath) > 250) {
return App::get_baseurl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
return System::baseUrl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
} elseif ($writemode) {
return $longpath;
} else {
@ -332,7 +332,7 @@ function proxy_is_local_image($url) {
}
// links normalised - bug #431
$baseurl = normalise_link(App::get_baseurl());
$baseurl = normalise_link(System::baseUrl());
$url = normalise_link($url);
return (substr($url, 0, strlen($baseurl)) == $baseurl);
}
@ -374,7 +374,7 @@ function proxy_img_cb($matches) {
}
function proxy_parse_html($html) {
$html = str_replace(normalise_link(App::get_baseurl()) . '/', App::get_baseurl() . '/', $html);
$html = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $html);
return preg_replace_callback('/(<img [^>]*src *= *["\'])([^"\']+)(["\'][^>]*>)/siU', 'proxy_img_cb', $html);
}