Fossil SCM

fixed the mtime field on json timeline output.

stephan 2014-12-18 22:27 trunk
Commit df50cb6e4d5674ebf7d4139c3775378ba05acd4b
1 file changed +4 -4
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -88,20 +88,21 @@
8888
db_multi_exec("%s", zSql /*safe-for-%s*/);
8989
}
9090
9191
/*
9292
** Return a pointer to a constant string that forms the basis
93
-** for a timeline query for the JSON interface.
93
+** for a timeline query for the JSON interface. It MUST NOT
94
+** be used in a formatted string argument.
9495
*/
9596
char const * json_timeline_query(void){
9697
/* Field order MUST match that from json_timeline_temp_table()!!! */
9798
static const char zBaseSql[] =
9899
@ SELECT
99100
@ NULL,
100101
@ blob.rid,
101102
@ uuid,
102
- @ CAST(strftime('%%s',event.mtime) AS INTEGER),
103
+ @ CAST(strftime('%s',event.mtime) AS INTEGER),
103104
@ datetime(event.mtime),
104105
@ coalesce(ecomment, comment),
105106
@ coalesce(euser, user),
106107
@ blob.rid IN leaf,
107108
@ bgcolor,
@@ -544,12 +545,11 @@
544545
goto error;
545546
}
546547
547548
#if 0
548549
/* only for testing! */
549
- tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
550
- SET("timelineSql");
550
+ cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
551551
#endif
552552
db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
553553
blob_reset(&sql);
554554
db_prepare(&q, "SELECT"
555555
" uuid AS uuid,"
556556
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -88,20 +88,21 @@
88 db_multi_exec("%s", zSql /*safe-for-%s*/);
89 }
90
91 /*
92 ** Return a pointer to a constant string that forms the basis
93 ** for a timeline query for the JSON interface.
 
94 */
95 char const * json_timeline_query(void){
96 /* Field order MUST match that from json_timeline_temp_table()!!! */
97 static const char zBaseSql[] =
98 @ SELECT
99 @ NULL,
100 @ blob.rid,
101 @ uuid,
102 @ CAST(strftime('%%s',event.mtime) AS INTEGER),
103 @ datetime(event.mtime),
104 @ coalesce(ecomment, comment),
105 @ coalesce(euser, user),
106 @ blob.rid IN leaf,
107 @ bgcolor,
@@ -544,12 +545,11 @@
544 goto error;
545 }
546
547 #if 0
548 /* only for testing! */
549 tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
550 SET("timelineSql");
551 #endif
552 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
553 blob_reset(&sql);
554 db_prepare(&q, "SELECT"
555 " uuid AS uuid,"
556
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -88,20 +88,21 @@
88 db_multi_exec("%s", zSql /*safe-for-%s*/);
89 }
90
91 /*
92 ** Return a pointer to a constant string that forms the basis
93 ** for a timeline query for the JSON interface. It MUST NOT
94 ** be used in a formatted string argument.
95 */
96 char const * json_timeline_query(void){
97 /* Field order MUST match that from json_timeline_temp_table()!!! */
98 static const char zBaseSql[] =
99 @ SELECT
100 @ NULL,
101 @ blob.rid,
102 @ uuid,
103 @ CAST(strftime('%s',event.mtime) AS INTEGER),
104 @ datetime(event.mtime),
105 @ coalesce(ecomment, comment),
106 @ coalesce(euser, user),
107 @ blob.rid IN leaf,
108 @ bgcolor,
@@ -544,12 +545,11 @@
545 goto error;
546 }
547
548 #if 0
549 /* only for testing! */
550 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
 
551 #endif
552 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
553 blob_reset(&sql);
554 db_prepare(&q, "SELECT"
555 " uuid AS uuid,"
556

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button