aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-04-06 00:00:46 +0200
committerMichael Vogel <icarus@dabo.de>2012-04-06 00:00:46 +0200
commit34d268544e565985014ada4369e8673c87883a0a (patch)
tree49a30ed61668405d731df2e32b4548516ecb58b5 /mod/admin.php
parent81dfb61f930005f0f65b1f72935c10edc247a985 (diff)
parent9b6e91086b29554fd04362f6c87ea148718e8b1c (diff)
downloadvolse-hubzilla-34d268544e565985014ada4369e8673c87883a0a.tar.gz
volse-hubzilla-34d268544e565985014ada4369e8673c87883a0a.tar.bz2
volse-hubzilla-34d268544e565985014ada4369e8673c87883a0a.zip
Merge commit 'upstream/master'
Diffstat (limited to 'mod/admin.php')
-rwxr-xr-xmod/admin.php43
1 files changed, 42 insertions, 1 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 53b5ee354..a395027c1 100755
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -208,6 +208,48 @@ function admin_page_site_post(&$a){
$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
+ `url` = replace(`url` , 'http:' , 'https:'),
+ `photo` = replace(`photo` , 'http:' , 'https:'),
+ `thumb` = replace(`thumb` , 'http:' , 'https:'),
+ `micro` = replace(`micro` , 'http:' , 'https:'),
+ `request` = replace(`request`, 'http:' , 'https:'),
+ `notify` = replace(`notify` , 'http:' , 'https:'),
+ `poll` = replace(`poll` , 'http:' , 'https:'),
+ `confirm` = replace(`confirm`, 'http:' , 'https:'),
+ `poco` = replace(`poco` , 'http:' , 'https:')
+ where `self` = 1"
+ );
+ q("update `profile` set
+ `photo` = replace(`photo` , 'http:' , 'https:'),
+ `thumb` = replace(`thumb` , 'http:' , 'https:')
+ where 1 "
+ );
+ }
+ elseif($ssl_policy == SSL_POLICY_SELFSIGN) {
+ q("update `contact` set
+ `url` = replace(`url` , 'https:' , 'http:'),
+ `photo` = replace(`photo` , 'https:' , 'http:'),
+ `thumb` = replace(`thumb` , 'https:' , 'http:'),
+ `micro` = replace(`micro` , 'https:' , 'http:'),
+ `request` = replace(`request`, 'https:' , 'http:'),
+ `notify` = replace(`notify` , 'https:' , 'http:'),
+ `poll` = replace(`poll` , 'https:' , 'http:'),
+ `confirm` = replace(`confirm`, 'https:' , 'http:'),
+ `poco` = replace(`poco` , 'https:' , 'http:')
+ where `self` = 1"
+ );
+ q("update `profile` set
+ `photo` = replace(`photo` , 'https:' , 'http:'),
+ `thumb` = replace(`thumb` , 'https:' , 'http:')
+ where 1 "
+ );
+ }
+ }
+ set_config('system','ssl_policy',$ssl_policy);
+
set_config('config','sitename',$sitename);
if ($banner==""){
// don't know why, but del_config doesn't work...
@@ -218,7 +260,6 @@ function admin_page_site_post(&$a){
} else {
set_config('system','banner', $banner);
}
- set_config('system','ssl_policy',$ssl_policy);
set_config('system','language', $language);
set_config('system','theme', $theme);
set_config('system','maximagesize', $maximagesize);