Commit e0280fde authored by Pascal Dreissen's avatar Pascal Dreissen
Browse files

Only show rewrite http->https when SSL is enabled and active

parent 086c5b00
...@@ -34,13 +34,14 @@ ...@@ -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> <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> <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> </div>
<tmpl_if name="is_ssl_enabled" op="==" value="y">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='rewrite_to_https_txt'}</label> <label class="col-sm-3 control-label">{tmpl_var name='rewrite_to_https_txt'}</label>
<div class="col-sm-9"> <div class="col-sm-9">
{tmpl_var name="rewrite_to_https"} {tmpl_var name="rewrite_to_https"}
</div> </div>
</div> </div>
</tmpl_if>
<input type="hidden" name="id" value="{tmpl_var name='id'}"> <input type="hidden" name="id" value="{tmpl_var name='id'}">
......
...@@ -835,6 +835,7 @@ class page_action extends tform_actions { ...@@ -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'])); $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(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); 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'); $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