aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-03-03 19:29:56 +0100
committerHarald Eilertsen <haraldei@anduin.net>2022-03-03 19:47:33 +0100
commit65ed3818ec0b25d2f2093a08935003a7a07ddb3f (patch)
tree6361f3b801188c7f67a7e7dff1168de711f4c598
parentc8417df6f1bf6cf8eae03a1b14e67e6c3c113afa (diff)
downloadvolse-hubzilla-65ed3818ec0b25d2f2093a08935003a7a07ddb3f.tar.gz
volse-hubzilla-65ed3818ec0b25d2f2093a08935003a7a07ddb3f.tar.bz2
volse-hubzilla-65ed3818ec0b25d2f2093a08935003a7a07ddb3f.zip
Use correct base url for stylesheets and js.
Use z_root instead of script_path when formatting stylesheet and javascript links for the head section. script_path does not preserve information about the port if the site uses a nonstandard port.
-rw-r--r--include/plugin.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 25fa22e10..f0ae1ecb1 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -941,9 +941,7 @@ function head_get_links() {
function format_css_if_exists($source) {
- // script_path() returns https://yoursite.tld
-
- $path_prefix = script_path();
+ $path_prefix = z_root();
$script = $source[0];
@@ -1054,7 +1052,7 @@ function head_get_main_js() {
}
function format_js_if_exists($source) {
- $path_prefix = script_path();
+ $path_prefix = z_root();
if(strpos($source,'/') !== false) {
// The source is a known path on the system