Commit 38699b9d authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'show-rewrite-https-is_ssl_enabled' into 'stable-3.1'

Show rewrite http->https when is_ssl_enabled (partially fix: #4098)



See merge request !415
parents 11f90664 e0280fde
......@@ -34,13 +34,14 @@
<div class="col-sm-9"><textarea class="form-control" name="rewrite_rules" id="rewrite_rules" rows='10' cols='50'>{tmpl_var name='rewrite_rules'}</textarea>
<b>{tmpl_var name="allowed_rewrite_rule_directives_txt"}</b>&nbsp;break&nbsp;if&nbsp;return&nbsp;rewrite&nbsp;set<br />&nbsp;<a href="http://wiki.nginx.org/HttpRewriteModule" target="_blank">http://wiki.nginx.org/HttpRewriteModule</a></div>
</div>
<tmpl_if name="is_ssl_enabled" op="==" value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='rewrite_to_https_txt'}</label>
<div class="col-sm-9">
{tmpl_var name="rewrite_to_https"}
</div>
</div>
</tmpl_if>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
......
......@@ -835,6 +835,7 @@ class page_action extends tform_actions {
$tmp_sys_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE groupid = ?", intval($tmp_web['sys_groupid']));
if(intval($tmp_sys_group['client_id']) > 0) $tmp_client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", intval($tmp_sys_group['client_id']));
if(is_array($tmp_client) && !empty($tmp_client) && trim($this->dataRecord['ssl_organisation']) == '' && trim($this->dataRecord['ssl_locality']) == '' && trim($this->dataRecord['ssl_state']) == '' && trim($this->dataRecord['ssl_organisation_unit']) == '') $app->tpl->setVar("show_helper_links", true);
$app->tpl->setVar('is_ssl_enabled', $tmp_web['ssl']);
}
$sys_config = $app->getconf->get_global_config('misc');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment