null+****@clear*****
null+****@clear*****
2012年 8月 2日 (木) 16:24:23 JST
SHIMODA Hiroshi 2012-08-02 16:24:23 +0900 (Thu, 02 Aug 2012) New Revision: 6003fc53ee13d27e62e05fc0b0b4185e79c8472e https://github.com/groonga/gcs/commit/6003fc53ee13d27e62e05fc0b0b4185e79c8472e Log: Disallow to use DomainName option except the configuration API, because it is too danger for batches API Modified files: lib/api/2011-02-01/configuration.js lib/database/domain.js Modified: lib/api/2011-02-01/configuration.js (+6 -6) =================================================================== --- lib/api/2011-02-01/configuration.js 2012-08-02 16:20:55 +0900 (7ce67a6) +++ lib/api/2011-02-01/configuration.js 2012-08-02 16:24:23 +0900 (64b6728) @@ -73,7 +73,7 @@ function createCreateDomainResponse(options) { } handlers.CreateDomain = function(context, request, response) { - var domain = new Domain(request, context); + var domain = new Domain(request.query.DomainName, context); try { domain.createSync(); var host = getBaseDomain(request.headers.host); @@ -105,7 +105,7 @@ function createDeleteDomainResponse(options) { } handlers.DeleteDomain = function(context, request, response) { - var domain = new Domain(request, context); + var domain = new Domain(request.query.DomainName, context); try { domain.deleteSync(); var host = getBaseDomain(request.headers.host); @@ -181,7 +181,7 @@ function createDefineIndexFieldResponse(options) { } handlers.DefineIndexField = function(context, request, response) { - var domain = new Domain(request, context); + var domain = new Domain(request.query.DomainName, context); var fieldName = request.query['IndexField.IndexFieldName'] || ''; var fieldType = request.query['IndexField.IndexFieldType'] || 'text'; @@ -216,7 +216,7 @@ function createDeleteIndexFieldResponse(options) { } handlers.DeleteIndexField = function(context, request, response) { - var domain = new Domain(request, context); + var domain = new Domain(request.query.DomainName, context); var fieldName = request.query['IndexFieldName'] || ''; var field = domain.getIndexField(fieldName); @@ -257,7 +257,7 @@ function createIndexDocumentsResponse(options) { } handlers.IndexDocuments = function(context, request, response) { - var domain = new Domain(request, context); + var domain = new Domain(request.query.DomainName, context); try { domain.reindexSync(); response.contentType('application/xml'); @@ -296,7 +296,7 @@ function createUpdateSynonymOptionsResponse(options) { return doc.toString(); } handlers.UpdateSynonymOptions = function(context, request, response) { - var domain = new Domain(request, context); + var domain = new Domain(request.query.DomainName, context); try { var synonymOptionsJson = request.query.Synonyms; var synonymOptions = JSON.parse(synonymOptionsJson); Modified: lib/database/domain.js (+0 -6) =================================================================== --- lib/database/domain.js 2012-08-02 16:20:55 +0900 (14e3206) +++ lib/database/domain.js 2012-08-02 16:24:23 +0900 (7c7794f) @@ -72,12 +72,6 @@ Domain.prototype = { return; } - if (source.query && source.query.DomainName) { - this.name = source.query.DomainName; - this.initializeId(); - return; - } - if (source.headers && source.headers.host) { var host = source.headers.host; var nameAndIdFromHost = Domain.getNameAndIdFromHost(host); -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... Télécharger