Allow creation of objects in schemas with special chars in the name. Fixes #1598

This was caused through generation of SQL based on HTML-escaped labels, not the raw versions.
pull/3/head
Murtuza Zabuawala 2016-09-16 17:02:57 +01:00 committed by Dave Page
parent c044af9585
commit fc5ce22de9
8 changed files with 9 additions and 9 deletions

View File

@ -73,7 +73,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
var schemaInfo = args.node_info.schema;
this.set({'owner': userInfo.name}, {silent: true});
this.set({'schema': schemaInfo.label}, {silent: true});
this.set({'schema': schemaInfo._label}, {silent: true});
}
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
},

View File

@ -492,7 +492,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
var isNew = (_.size(attrs) === 0);
if (isNew) {
// Set Selected Schema
schema = args.node_info.schema.label
schema = args.node_info.schema._label
this.set({'basensp': schema}, {silent: true});
// Set Current User

View File

@ -114,7 +114,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
var schemaInfo = args.node_info.schema;
this.set({'seqowner': userInfo.name}, {silent: true});
this.set({'schema': schemaInfo.label}, {silent: true});
this.set({'schema': schemaInfo._label}, {silent: true});
}
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
},

View File

@ -65,8 +65,8 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
var schemaInfo = args.node_info.schema;
this.set({
'owner': userInfo.name,
'synobjschema': schemaInfo.label,
'schema': schemaInfo.label,
'synobjschema': schemaInfo._label,
'schema': schemaInfo._label,
'targettype': 'r'
}, {silent: true});
} else {

View File

@ -284,7 +284,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
var schemaInfo = args.node_info.schema;
this.set({'relowner': userInfo.name}, {silent: true});
this.set({'schema': schemaInfo.label}, {silent: true});
this.set({'schema': schemaInfo._label}, {silent: true});
}
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);

View File

@ -311,7 +311,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backgrid) {
var schemaInfo = args.node_info.schema;
this.set({'typeowner': userInfo.name}, {silent: true});
this.set({'schema': schemaInfo.label}, {silent: true});
this.set({'schema': schemaInfo._label}, {silent: true});
}
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
},

View File

@ -118,7 +118,7 @@ function($, _, S, pgAdmin, alertify, pgBrowser, CodeMirror) {
var isNew = (_.size(attrs) === 0);
if (isNew) {
// Set Selected Schema
var schemaLabel = args.node_info.schema.label;
var schemaLabel = args.node_info.schema._label;
if (schemaLabel == '') {
this.set({'schema': 'public'}, {silent: true});
} else {

View File

@ -92,7 +92,7 @@ function($, _, S, pgAdmin, pgBrowser, CodeMirror) {
var isNew = (_.size(attrs) === 0);
if (isNew) {
// Set Selected Schema
var schemaLabel = args.node_info.schema.label;
var schemaLabel = args.node_info.schema._label;
if (schemaLabel == '') {
this.set({'schema': 'public'}, {silent: true});
} else {