From 25f546e100fdcec25b6480a2fe071c9f70b1469c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 28 Mar 2016 09:25:21 +0200 Subject: [PATCH] rename SQLite database on profile rename --- lam/templates/config/profmanage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lam/templates/config/profmanage.php b/lam/templates/config/profmanage.php index 86a31c24..62d3c581 100644 --- a/lam/templates/config/profmanage.php +++ b/lam/templates/config/profmanage.php @@ -80,7 +80,10 @@ if (isset($_POST['action'])) { // rename pdf and profiles folder rename("../../config/profiles/" . $_POST['oldfilename'], "../../config/profiles/" . $_POST['renfilename']); rename("../../config/pdf/" . $_POST['oldfilename'], "../../config/pdf/" . $_POST['renfilename']); - + // rename sqlite database if any + if (file_exists("../../config/" . $_POST['oldfilename'] . ".sqlite")) { + rename("../../config/" . $_POST['oldfilename'] . ".sqlite", "../../config/" . $_POST['renfilename'] . ".sqlite"); + } $msg = _("Renamed profile."); } else $error = _("Could not rename file!");