aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-07 14:09:51 -0800
committerfriendica <info@friendica.com>2012-11-07 14:09:51 -0800
commitcc8a11eee2c0f8c190ac421542845bfc3ae0b5c4 (patch)
treec1c97a545821135913bad018f039a505c8de7396 /mod
parent7501717d2e844fefb142cbbdac2bca5ab4d77754 (diff)
downloadvolse-hubzilla-cc8a11eee2c0f8c190ac421542845bfc3ae0b5c4.tar.gz
volse-hubzilla-cc8a11eee2c0f8c190ac421542845bfc3ae0b5c4.tar.bz2
volse-hubzilla-cc8a11eee2c0f8c190ac421542845bfc3ae0b5c4.zip
allow theme selection
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php7
-rw-r--r--mod/channel.php1
-rw-r--r--mod/settings.php17
3 files changed, 13 insertions, 12 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 90eabd1ef..367ddcf7f 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -260,7 +260,7 @@ function admin_page_site_post(&$a){
$ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False);
$diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False);
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
-
+/*
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
if($ssl_policy == SSL_POLICY_FULL) {
q("update `contact` set
@@ -301,6 +301,7 @@ function admin_page_site_post(&$a){
);
}
}
+*/
set_config('system','ssl_policy',$ssl_policy);
set_config('system','delivery_interval',$delivery_interval);
set_config('system','poll_interval',$poll_interval);
@@ -874,8 +875,8 @@ function admin_page_themes(&$a){
if($files) {
foreach($files as $file) {
$f = basename($file);
- $is_experimental = intval(file_exists($file . '/experimental'));
- $is_supported = 1-(intval(file_exists($file . '/unsupported'))); // Is not used yet
+ $is_experimental = intval(file_exists($file . '/.experimental'));
+ $is_supported = 1-(intval(file_exists($file . '/.unsupported'))); // Is not used yet
$is_allowed = intval(in_array($f,$allowed_themes));
$themes[] = array('name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed);
}
diff --git a/mod/channel.php b/mod/channel.php
index 4fd7a6481..01803a4aa 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -58,6 +58,7 @@ function channel_content(&$a, $update = 0) {
}
+
require_once("include/bbcode.php");
require_once('include/security.php');
require_once('include/conversation.php');
diff --git a/mod/settings.php b/mod/settings.php
index e8241f397..d4dd34ad5 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -2,15 +2,15 @@
function get_theme_config_file($theme){
- $a = get_app();
- $base_theme = $a->theme_info['extends'];
+
+ $base_theme = get_app()->theme_info['extends'];
if (file_exists("view/theme/$theme/php/config.php")){
return "view/theme/$theme/php/config.php";
}
- //if (file_exists("view/theme/$base_theme/php/config.php")){
- // return "view/theme/$base_theme/php/config.php";
- //}
+ if (file_exists("view/theme/$base_theme/php/config.php")){
+ return "view/theme/$base_theme/php/config.php";
+ }
return null;
}
@@ -179,7 +179,7 @@ function settings_post(&$a) {
check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
- $theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->user['theme']);
+ $theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->channel['channel_theme']);
$mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme'])) : '');
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
@@ -201,7 +201,7 @@ function settings_post(&$a) {
set_pconfig(local_user(),'system','no_smilies',$nosmile);
- if ($theme == $a->user['theme']){
+ if ($theme == $a->channel['channel_theme']){
// call theme_post only if theme has not been changed
if( ($themeconfigfile = get_theme_config_file($theme)) != null){
require_once($themeconfigfile);
@@ -209,8 +209,7 @@ function settings_post(&$a) {
}
}
-
- $r = q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d LIMIT 1",
+ $r = q("UPDATE channel SET channel_theme = '%s' WHERE channel_id = %d LIMIT 1",
dbesc($theme),
intval(local_user())
);