[Groonga-commit] groonga/gcs [master] Fix internal error from createOptionStatus()

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Fri Nov 16 18:33:35 JST 2012


YUKI Hiroshi	2012-11-16 18:33:35 +0900 (Fri, 16 Nov 2012)

  New Revision: d57895bbb374c6ff2972b2864bbee75565c59509
  https://github.com/groonga/gcs/commit/d57895bbb374c6ff2972b2864bbee75565c59509

  Log:
    Fix internal error from createOptionStatus()

  Modified files:
    lib/api/2011-02-01/configuration.js

  Modified: lib/api/2011-02-01/configuration.js (+8 -6)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-11-16 18:26:28 +0900 (7ea6f30)
+++ lib/api/2011-02-01/configuration.js    2012-11-16 18:33:35 +0900 (f34c6b1)
@@ -256,13 +256,15 @@ function createIndexFieldOptionStatus(field) {
 
 function createOptionStatus(options) {
   var optionStatus = xmlbuilder.create();
+  var createdAt = options.field ? options.field.createdAt : options.createdAt;
+  var updatedAt = options.field ? options.field.updatedAt : options.updatedAt;
+  var updateVersion = /* options.field ? options.field.updateVersion : */ options.updateVersion;
+  var state = options.field ? options.field.state : options.state;
   optionStatus.begin(options.element || 'Status', { version: '1.0' })
-    .element('CreationDate').text(dateFormat(options.createdAt || options.field.createdAt,
-                                             'isoUtcDateTime')).up()
-    .element('State').text(options.state || options.field.state || 'RequiresIndexDocuments').up()
-    .element('UpdateDate').text(dateFormat(options.updatedAt || options.field.updatedAt,
-                                           'isoUtcDateTime')).up()
-    .element('UpdateVersion').text(options.updateVersion || options.field.updateVersion || '0');
+    .element('CreationDate').text(dateFormat(createdAt, 'isoUtcDateTime')).up()
+    .element('State').text(state || 'RequiresIndexDocuments').up()
+    .element('UpdateDate').text(dateFormat(updatedAt, 'isoUtcDateTime')).up()
+    .element('UpdateVersion').text(updateVersion || '0');
   return optionStatus;
 }
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る