aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-30 14:58:44 -0700
committerfriendica <info@friendica.com>2012-03-30 14:58:44 -0700
commit007d67a998eb8f26228ddd22bb0323d54af9af8c (patch)
tree01d8d450ccc447b50138f2fa5d7a15e953ac85f6 /boot.php
parentf50fb7d6ca47729c7cb464f84b768d56e35b62d6 (diff)
parentbe2005f146fc8d482734ca48ec594bc3f797360c (diff)
downloadvolse-hubzilla-007d67a998eb8f26228ddd22bb0323d54af9af8c.tar.gz
volse-hubzilla-007d67a998eb8f26228ddd22bb0323d54af9af8c.tar.bz2
volse-hubzilla-007d67a998eb8f26228ddd22bb0323d54af9af8c.zip
Merge pull request #188 from fabrixxm/master
Display settings tab and theme settings code
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index 1f2b69077..2cf20805b 100755
--- a/boot.php
+++ b/boot.php
@@ -1261,17 +1261,20 @@ function current_theme(){
$system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
$theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
- if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css'))
+ if($theme_name &&
+ (file_exists('view/theme/' . $theme_name . '/style.css') ||
+ file_exists('view/theme/' . $theme_name . '/style.php')))
return($theme_name);
foreach($app_base_themes as $t) {
- if(file_exists('view/theme/' . $t . '/style.css'))
+ if(file_exists('view/theme/' . $t . '/style.css')||
+ file_exists('view/theme/' . $t . '/style.php'))
return($t);
}
- $fallback = glob('view/theme/*/style.css');
+ $fallback = glob('view/theme/*/style.[css|php]');
if(count($fallback))
- return (str_replace('view/theme/','', str_replace("/style.css","",$fallback[0])));
+ return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
}}
@@ -1283,6 +1286,8 @@ if(! function_exists('current_theme_url')) {
function current_theme_url() {
global $a;
$t = current_theme();
+ if (file_exists('view/theme/' . $t . '/style.php'))
+ return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss');
return($a->get_baseurl() . '/view/theme/' . $t . '/style.css');
}}
@@ -1432,4 +1437,4 @@ function zrl($s) {
if($mine and ! link_compare($mine,$s))
return $s . $achar . 'zrl=' . urlencode($mine);
return $s;
-} \ No newline at end of file
+}