get rid of ssl_policy - it's implicit in the site url
This commit is contained in:
parent
31b934eb5e
commit
6a2cb837af
10
boot.php
10
boot.php
@ -768,11 +768,11 @@ class App {
|
||||
|
||||
$scheme = $this->scheme;
|
||||
|
||||
if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) {
|
||||
if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL)) {
|
||||
$scheme = 'https';
|
||||
}
|
||||
}
|
||||
// if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) {
|
||||
// if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL)) {
|
||||
// $scheme = 'https';
|
||||
// }
|
||||
// }
|
||||
|
||||
$this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
|
||||
return $this->baseurl;
|
||||
|
@ -2320,21 +2320,21 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
|
||||
if(! $rino_enable)
|
||||
$rino = 0;
|
||||
|
||||
$ssl_val = intval(get_config('system','ssl_policy'));
|
||||
$ssl_policy = '';
|
||||
// $ssl_val = intval(get_config('system','ssl_policy'));
|
||||
// $ssl_policy = '';
|
||||
|
||||
switch($ssl_val){
|
||||
case SSL_POLICY_FULL:
|
||||
$ssl_policy = 'full';
|
||||
break;
|
||||
case SSL_POLICY_SELFSIGN:
|
||||
$ssl_policy = 'self';
|
||||
break;
|
||||
case SSL_POLICY_NONE:
|
||||
default:
|
||||
$ssl_policy = 'none';
|
||||
break;
|
||||
}
|
||||
// switch($ssl_val){
|
||||
// case SSL_POLICY_FULL:
|
||||
// $ssl_policy = 'full';
|
||||
// break;
|
||||
// case SSL_POLICY_SELFSIGN:
|
||||
// $ssl_policy = 'self';
|
||||
// break;
|
||||
// case SSL_POLICY_NONE:
|
||||
// default:
|
||||
// $ssl_policy = 'none';
|
||||
// break;
|
||||
// }
|
||||
|
||||
$url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino=1' : '');
|
||||
|
||||
@ -2423,7 +2423,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
|
||||
$postvars['perm'] = 'r';
|
||||
}
|
||||
|
||||
$postvars['ssl_policy'] = $ssl_policy;
|
||||
// $postvars['ssl_policy'] = $ssl_policy;
|
||||
|
||||
if($page)
|
||||
$postvars['page'] = $page;
|
||||
|
@ -235,7 +235,7 @@ function admin_page_site_post(&$a){
|
||||
$timeout = ((x($_POST,'timeout')) ? intval(trim($_POST['timeout'])) : 60);
|
||||
$delivery_interval = ((x($_POST,'delivery_interval'))? intval(trim($_POST['delivery_interval'])) : 0);
|
||||
$poll_interval = ((x($_POST,'poll_interval'))? intval(trim($_POST['poll_interval'])) : 0);
|
||||
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
|
||||
// $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) {
|
||||
@ -278,7 +278,7 @@ function admin_page_site_post(&$a){
|
||||
}
|
||||
}
|
||||
*/
|
||||
set_config('system','ssl_policy',$ssl_policy);
|
||||
// set_config('system','ssl_policy',$ssl_policy);
|
||||
set_config('system','delivery_interval',$delivery_interval);
|
||||
set_config('system','poll_interval',$poll_interval);
|
||||
set_config('system','maxloadavg',$maxloadavg);
|
||||
@ -397,10 +397,10 @@ function admin_page_site(&$a) {
|
||||
ACCESS_FREE => t("Free Access")
|
||||
);
|
||||
|
||||
$ssl_choices = array(
|
||||
SSL_POLICY_NONE => t("No SSL policy, links will track page SSL state"),
|
||||
SSL_POLICY_FULL => t("Force all links to use SSL")
|
||||
);
|
||||
// $ssl_choices = array(
|
||||
// SSL_POLICY_NONE => t("No SSL policy, links will track page SSL state"),
|
||||
// SSL_POLICY_FULL => t("Force all links to use SSL")
|
||||
// );
|
||||
|
||||
$t = get_markup_template("admin_site.tpl");
|
||||
return replace_macros($t, array(
|
||||
@ -421,7 +421,7 @@ function admin_page_site(&$a) {
|
||||
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile),
|
||||
'$theme_accessibility' => array('theme_accessibility', t("Accessibility system theme"), get_config('system','accessibility_theme'), t("Accessibility theme"), $theme_choices_accessibility),
|
||||
'$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")),
|
||||
'$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices),
|
||||
// '$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices),
|
||||
'$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
|
||||
'$register_policy' => array('register_policy', t("Register policy"), get_config('system','register_policy'), "", $register_choices),
|
||||
'$access_policy' => array('access_policy', t("Access policy"), get_config('system','access_policy'), "", $access_choices),
|
||||
|
@ -1 +1 @@
|
||||
2013-08-26.417
|
||||
2013-08-27.418
|
||||
|
@ -44,10 +44,10 @@
|
||||
{{include file="field_textarea.tpl" field=$banner}}
|
||||
{{include file="field_select.tpl" field=$language}}
|
||||
{{include file="field_select.tpl" field=$theme}}
|
||||
{{include file="field_select.tpl" field=$theme_mobile}}
|
||||
{{include file="field_select.tpl" field=$theme_accessibility}}
|
||||
{{include file="field_input.tpl" field=$site_channel}}
|
||||
{{include file="field_select.tpl" field=$ssl_policy}}
|
||||
{{include file="field_select.tpl" field=$theme_mobile}}
|
||||
{{include file="field_select.tpl" field=$theme_accessibility}}
|
||||
{{include file="field_input.tpl" field=$site_channel}}
|
||||
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
||||
|
||||
|
Reference in New Issue
Block a user