1
0
Fork 0

Strating with '_' is no longer defined as 'isSystem'

This commit is contained in:
gschwab 2014-04-10 13:03:05 +02:00
parent 9b3f22e2da
commit 89e85926cd
2 changed files with 24 additions and 4 deletions

View File

@ -119,8 +119,22 @@
},
isSystemCollection: function (val) {
//return val && val.name && val.name.substr(0, 1) === '_';
return val.substr(0, 1) === '_';
var returnVal = false;
$.ajax({
type: "GET",
cache: false,
url: "/_api/collection/"+encodeURIComponent(val)+"/properties",
contentType: "application/json",
processData: false,
async: false,
success: function(data) {
returnVal = data.isSystem;
},
error: function(data) {
returnVal = false;
}
});
return returnVal;
},
collectionApiType: function (identifier, refresh) {
@ -150,7 +164,7 @@
type = "unknown";
}
if (val.name.substr(0, 1) === '_') {
if (this.isSystemCollection(val.name)) {
type += " (system)";
}

View File

@ -258,7 +258,13 @@
shardBy.push("_key");
}
}
var isSystem = (collName.substr(0, 1) === '_');
//no new system collections via webinterface
//var isSystem = (collName.substr(0, 1) === '_');
if (collName.substr(0, 1) === '_') {
arangoHelper.arangoError('No "_" allowed as first character!');
return 0;
}
var isSystem = false;
var wfs = (collSync === "true");
if (collSize > 0) {
try {