aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-19 16:50:41 -0800
committerzotlabs <mike@macgirvin.com>2017-02-19 16:50:41 -0800
commit573846707ceade4d00a4dfe3184d9f8004a3112b (patch)
tree501d9508c22be518894cb18dfec13416412073cb /Zotlabs
parent02e487f30687a1602bd257e2acf2b9954aab6e98 (diff)
downloadvolse-hubzilla-573846707ceade4d00a4dfe3184d9f8004a3112b.tar.gz
volse-hubzilla-573846707ceade4d00a4dfe3184d9f8004a3112b.tar.bz2
volse-hubzilla-573846707ceade4d00a4dfe3184d9f8004a3112b.zip
fix several places where head_add_(css|js) functions have been used incorrectly. It appears that mistakes were made going back a long time and propagated. Here's the way it should work:
- if there is no preceding / character, we look for the file within all the appropriate theme directories. - otherwise the file should have a preceding /, which means use this path relative to the hubzilla basedir - files beginning with // are considered to be schemeless URLs. Therefore 'foo.css' means find the best theme-able representation of foo.css. '/library/foo.css' means only use the version of foo.css that is in /library.
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Wiki.php2
-rw-r--r--Zotlabs/Render/Theme.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index d42c26681..d0856f4d6 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -296,7 +296,7 @@ class Wiki extends \Zotlabs\Web\Controller {
));
if($p['mimeType'] != 'text/bbcode')
- head_add_js('library/ace/ace.js'); // Ace Code Editor
+ head_add_js('/library/ace/ace.js'); // Ace Code Editor
return $o;
}
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php
index 9f9009d72..dadb18051 100644
--- a/Zotlabs/Render/Theme.php
+++ b/Zotlabs/Render/Theme.php
@@ -125,9 +125,9 @@ class Theme {
$opts .= $schema_str;
if(file_exists('view/theme/' . $t . '/php/style.php'))
- return('view/theme/' . $t . '/php/style.pcss' . $opts);
+ return('/view/theme/' . $t . '/php/style.pcss' . $opts);
- return('view/theme/' . $t . '/css/style.css');
+ return('/view/theme/' . $t . '/css/style.css');
}
function debug() {