Backup, Maintenance and Restore should not be started if database name contains "=" symbol. Fixes #1220 #1221

This commit is contained in:
Khushboo Vashi 2018-05-07 15:09:12 +05:30 committed by Akshay Joshi
parent 8937375885
commit 567f764234
3 changed files with 34 additions and 0 deletions

View File

@ -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) {

View File

@ -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() {

View File

@ -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) {