rename SQLite database on profile rename
This commit is contained in:
parent
e8760f2541
commit
25f546e100
|
@ -80,7 +80,10 @@ if (isset($_POST['action'])) {
|
||||||
// rename pdf and profiles folder
|
// rename pdf and profiles folder
|
||||||
rename("../../config/profiles/" . $_POST['oldfilename'], "../../config/profiles/" . $_POST['renfilename']);
|
rename("../../config/profiles/" . $_POST['oldfilename'], "../../config/profiles/" . $_POST['renfilename']);
|
||||||
rename("../../config/pdf/" . $_POST['oldfilename'], "../../config/pdf/" . $_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.");
|
$msg = _("Renamed profile.");
|
||||||
}
|
}
|
||||||
else $error = _("Could not rename file!");
|
else $error = _("Could not rename file!");
|
||||||
|
|
Loading…
Reference in New Issue