aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-17 22:21:55 +0100
committerMario <mario@mariovavti.com>2024-03-17 22:21:55 +0100
commitb05845f495e7561eddf2ad5b0c9325649f5289af (patch)
tree2cc6e8f35b3ca1435476ca45e75885e01b3a287b
parent732dbfd6f56510127405767ca86af240d3c85cf4 (diff)
downloadvolse-hubzilla-b05845f495e7561eddf2ad5b0c9325649f5289af.tar.gz
volse-hubzilla-b05845f495e7561eddf2ad5b0c9325649f5289af.tar.bz2
volse-hubzilla-b05845f495e7561eddf2ad5b0c9325649f5289af.zip
cleanup some ancient code and fix check for $path so that it will not pass if theme_include() will not return anything. also add an empty zen.css file for the zen template
-rw-r--r--Zotlabs/Render/Theme.php7
-rw-r--r--boot.php10
-rw-r--r--include/plugin.php8
-rw-r--r--view/css/zen.css1
4 files changed, 8 insertions, 18 deletions
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php
index dc23eae84..543bf7a3f 100644
--- a/Zotlabs/Render/Theme.php
+++ b/Zotlabs/Render/Theme.php
@@ -97,14 +97,9 @@ class Theme {
*
* Provide a sane default if nothing is chosen or the specified theme does not exist.
*
- * @param bool $installing (optional) default false, if true return the name of the first base theme
- *
* @return string
*/
- static public function url($installing = false) {
-
- if($installing)
- return self::$base_themes[0];
+ static public function url() {
$uid = App::$profile_uid ?: local_channel();
diff --git a/boot.php b/boot.php
index 1eb64cb0a..1dc29051e 100644
--- a/boot.php
+++ b/boot.php
@@ -2331,8 +2331,6 @@ function construct_page() {
require_once(theme_include('theme_init.php'));
- $installing = false;
-
$uid = ((App::$profile_uid) ? App::$profile_uid : local_channel());
$navbar = get_config('system', 'navbar', 'default');
@@ -2344,14 +2342,10 @@ function construct_page() {
$navbar = App::$layout['navbar'];
}
- if (App::$module == 'setup') {
- $installing = true;
- }
- else {
+ if (App::$module !== 'setup') {
nav($navbar);
}
-
$current_theme = Zotlabs\Render\Theme::current();
// logger('current_theme: ' . print_r($current_theme,true));
// Zotlabs\Render\Theme::debug();
@@ -2372,7 +2366,7 @@ function construct_page() {
if (($p = theme_include('mod_' . App::$module . '.css')) != '')
head_add_css('mod_' . App::$module . '.css');
- head_add_css(Zotlabs\Render\Theme::url($installing));
+ head_add_css(Zotlabs\Render\Theme::url());
if (($p = theme_include('mod_' . App::$module . '.js')) != '')
head_add_js('mod_' . App::$module . '.js');
diff --git a/include/plugin.php b/include/plugin.php
index cc740f915..bbfeab988 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -985,12 +985,12 @@ function format_css_if_exists($source) {
}
} else {
// It's a file from the theme
- $path = '/' . theme_include($script);
+ $path = theme_include($script);
}
if($path) {
$qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION;
- return '<link rel="stylesheet" href="' . $path_prefix . $path . $qstring . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
+ return '<link rel="stylesheet" href="' . $path_prefix . '/' . $path . $qstring . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
}
}
@@ -1057,11 +1057,11 @@ function format_js_if_exists($source) {
}
else {
// It's a file from the theme
- $path = '/' . theme_include($source);
+ $path = theme_include($source);
}
if($path) {
$qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION;
- return '<script src="' . $path_prefix . $path . $qstring . '" ></script>' . "\r\n" ;
+ return '<script src="' . $path_prefix . '/' . $path . $qstring . '" ></script>' . "\r\n" ;
}
}
diff --git a/view/css/zen.css b/view/css/zen.css
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/view/css/zen.css
@@ -0,0 +1 @@
+