aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-03-03 19:50:07 +0100
committerHarald Eilertsen <haraldei@anduin.net>2022-03-03 19:50:07 +0100
commit34ffff3947b8e89a667367277f0fde9c626fd143 (patch)
treef0e218f9581ee90cfc37203fdbd2ca932b133265 /include/plugin.php
parent65ed3818ec0b25d2f2093a08935003a7a07ddb3f (diff)
downloadvolse-hubzilla-34ffff3947b8e89a667367277f0fde9c626fd143.tar.gz
volse-hubzilla-34ffff3947b8e89a667367277f0fde9c626fd143.tar.bz2
volse-hubzilla-34ffff3947b8e89a667367277f0fde9c626fd143.zip
Remove now unused function script_path.
Diffstat (limited to 'include/plugin.php')
-rw-r--r--include/plugin.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/include/plugin.php b/include/plugin.php
index f0ae1ecb1..f9cee7ed6 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -963,44 +963,6 @@ function format_css_if_exists($source) {
}
}
-/**
- * This basically calculates the baseurl. We have other functions to do that, but
- * there was an issue with script paths and mixed-content whose details are arcane
- * and perhaps lost in the message archives. The short answer is that we're ignoring
- * the URL which we are "supposed" to use, and generating script paths relative to
- * the URL which we are currently using; in order to ensure they are found and aren't
- * blocked due to mixed content issues.
- *
- * @return string
- */
-function script_path() {
- if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS'])
- $scheme = 'https';
- elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443))
- $scheme = 'https';
- elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on')
- $scheme = 'https';
- else
- $scheme = 'http';
-
- // Some proxy setups may require using http_host
-
- if(isset(App::$config['system']['script_path_use_http_host']) && intval(App::$config['system']['script_path_use_http_host']))
- $server_var = 'HTTP_HOST';
- else
- $server_var = 'SERVER_NAME';
-
-
- if(x($_SERVER,$server_var)) {
- $hostname = $_SERVER[$server_var];
- }
- else {
- return z_root();
- }
-
- return $scheme . '://' . $hostname;
-}
-
function head_add_js($src, $priority = 0) {
if(isset(App::$js_sources[$priority]) && !is_array(App::$js_sources[$priority]))
App::$js_sources[$priority] = [];