Commit 018955be authored by Falko Timme's avatar Falko Timme

- Implemented FS#3308 - PATH placeholder in directive snippets (placeholder is...

- Implemented FS#3308 - PATH placeholder in directive snippets (placeholder is named {DOCROOT}, like for nginx).
parent f798aa09
......@@ -88,7 +88,7 @@
</div>
<div class="ctrlHolder apache">
<label for="apache_directives">{tmpl_var name='apache_directives_txt'}</label>
<textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea>&nbsp;<b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="apache_directive_snippets_txt"}
<textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea>&nbsp;<b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="apache_directive_snippets_txt"}<br>----<br><b>&nbsp;{tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>
</div>
<div class="ctrlHolder nginx">
<label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label>
......
......@@ -892,6 +892,8 @@ class apache2_plugin {
// Make sure we only have Unix linebreaks
$vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']);
$vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']);
$trans = array('{DOCROOT}' => $vhost_data['web_document_root_www']);
$vhost_data['apache_directives'] = strtr($vhost_data['apache_directives'], $trans);
// Check if a SSL cert exists
$ssl_dir = $data['new']['document_root'].'/ssl';
......
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