rename MYSQL_PASSWORD replacer to FROXLOR_MYSQL_PASSWORD in config-templates to avoid false replacement of couriers authmysqlrc, fixes #438

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2017-05-12 12:23:14 +02:00
parent 434f202832
commit 9aa2cc269b
5 changed files with 6 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.</textarea>
</p>
<form id="configfiles_setmysqlpw" action="#">
MYSQL_PASSWORD: <input type="text" class="text" id="configfiles_mysqlpw" name="configfiles_mysqlpw" value="" />
FROXLOR_MYSQL_PASSWORD: <input type="text" class="text" id="configfiles_mysqlpw" name="configfiles_mysqlpw" value="" />
<input type="submit" value="{$lng['panel']['set']}" />
</form>
</div>

View File

@@ -205,12 +205,12 @@ $(document).ready(function() {
// Config files
var configfileTextareas = $("textarea.filecontent, textarea.shell");
var lastPw = "MYSQL_PASSWORD";
var lastPw = "FROXLOR_MYSQL_PASSWORD";
$("#configfiles_setmysqlpw").submit(function(event) {
event.preventDefault();
var inputVal = $("#configfiles_mysqlpw").val();
if (!inputVal.trim()) {
inputVal = "MYSQL_PASSWORD";
inputVal = "FROXLOR_MYSQL_PASSWORD";
}
configfileTextareas.each(function() {
this.value = this.value.replace(lastPw, inputVal);