mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 15:26:46 -06:00
Backup, Maintenance and Restore should not be started if database name contains "=" symbol. Fixes #1220 #1221
This commit is contained in:
parent
8937375885
commit
567f764234
@ -835,6 +835,17 @@ commonUtils
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
var treeInfo = node.getTreeNodeHierarchy.apply(node, [item]);
|
||||
|
||||
if (treeInfo.database._label.indexOf('=') >= 0) {
|
||||
alertify.alert(
|
||||
gettext('Backup error'),
|
||||
gettext('Backup job creation failed. '+
|
||||
'Databases with = symbols in the name cannot be backed up using this utility.')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
title = title.sprintf(node.label, data.label).value();
|
||||
|
||||
if (!alertify.backup_objects) {
|
||||
|
@ -284,6 +284,18 @@ define([
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
var node = d && pgBrowser.Nodes[d._type],
|
||||
treeInfo = node.getTreeNodeHierarchy.apply(node, [i]);
|
||||
|
||||
if (treeInfo.database._label.indexOf('=') >= 0) {
|
||||
Alertify.alert(
|
||||
gettext('Maintenance error'),
|
||||
gettext('Maintenance job creation failed. '+
|
||||
'Databases with = symbols in the name cannot be maintained using this utility.')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Alertify.MaintenanceDialog) {
|
||||
Alertify.dialog('MaintenanceDialog', function factory() {
|
||||
|
||||
|
@ -451,6 +451,17 @@ commonUtils
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
var treeInfo = node.getTreeNodeHierarchy.apply(node, [item]);
|
||||
|
||||
if (treeInfo.database._label.indexOf('=') >= 0) {
|
||||
alertify.alert(
|
||||
gettext('Restore error'),
|
||||
gettext('Restore job creation failed. '+
|
||||
'Databases with = symbols in the name cannot be restored using this utility.')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
title = title.sprintf(node.label, data.label).value();
|
||||
|
||||
if (!alertify.pg_restore) {
|
||||
|
Loading…
Reference in New Issue
Block a user