Fossil SCM

added a couple FIXME notes before bed.

stephan 2011-09-20 22:55 UTC json
Commit e78578453878bd67602c19114ceb1e9911416c3c
1 file changed +8 -3
+8 -3
--- src/json.c
+++ src/json.c
@@ -1412,16 +1412,21 @@
14121412
cson_object * pay = NULL;
14131413
cson_value * tmp = NULL;
14141414
int limit = json_getenv_int("n",10);
14151415
Stmt q;
14161416
Blob sql = empty_blob;
1417
- if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){
1417
+ if( !g.perm.Read/* && !g.perm.RdTkt && !g.perm.RdWiki*/ ){
14181418
g.json.resultCode = FSL_JSON_E_DENIED;
14191419
return NULL;
14201420
}
14211421
if( limit < 0 ) limit = 10;
1422
- timeline_temp_table();
1422
+ timeline_temp_table() /* FIXME: we need a JSON-specific one or some
1423
+ workarounds for timestamp and int-vs-bool
1424
+ values in the HTML version. i'd prefer the
1425
+ former, to avoid risking breaking HTML
1426
+ mode.
1427
+ */;
14231428
14241429
blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
14251430
blob_append(&sql, timeline_query_for_www(), -1);
14261431
blob_append(&sql, "AND event.type IN('ci') ", -1);
14271432
blob_append(&sql, "ORDER BY mtime DESC ", -1);
@@ -1440,11 +1445,11 @@
14401445
#endif
14411446
14421447
blob_reset(&sql);
14431448
blob_append(&sql, "SELECT rid AS rid,"
14441449
" uuid AS uuid,"
1445
- " timestamp AS timestamp,"
1450
+ " timestamp AS timestamp," /*FIXME: as epoch time*/
14461451
" comment AS comment, "
14471452
" user AS user,"
14481453
" isleaf AS isLeaf,"
14491454
" bgcolor AS bgColor,"
14501455
" etype AS eventType,"
14511456
--- src/json.c
+++ src/json.c
@@ -1412,16 +1412,21 @@
1412 cson_object * pay = NULL;
1413 cson_value * tmp = NULL;
1414 int limit = json_getenv_int("n",10);
1415 Stmt q;
1416 Blob sql = empty_blob;
1417 if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){
1418 g.json.resultCode = FSL_JSON_E_DENIED;
1419 return NULL;
1420 }
1421 if( limit < 0 ) limit = 10;
1422 timeline_temp_table();
 
 
 
 
 
1423
1424 blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
1425 blob_append(&sql, timeline_query_for_www(), -1);
1426 blob_append(&sql, "AND event.type IN('ci') ", -1);
1427 blob_append(&sql, "ORDER BY mtime DESC ", -1);
@@ -1440,11 +1445,11 @@
1440 #endif
1441
1442 blob_reset(&sql);
1443 blob_append(&sql, "SELECT rid AS rid,"
1444 " uuid AS uuid,"
1445 " timestamp AS timestamp,"
1446 " comment AS comment, "
1447 " user AS user,"
1448 " isleaf AS isLeaf,"
1449 " bgcolor AS bgColor,"
1450 " etype AS eventType,"
1451
--- src/json.c
+++ src/json.c
@@ -1412,16 +1412,21 @@
1412 cson_object * pay = NULL;
1413 cson_value * tmp = NULL;
1414 int limit = json_getenv_int("n",10);
1415 Stmt q;
1416 Blob sql = empty_blob;
1417 if( !g.perm.Read/* && !g.perm.RdTkt && !g.perm.RdWiki*/ ){
1418 g.json.resultCode = FSL_JSON_E_DENIED;
1419 return NULL;
1420 }
1421 if( limit < 0 ) limit = 10;
1422 timeline_temp_table() /* FIXME: we need a JSON-specific one or some
1423 workarounds for timestamp and int-vs-bool
1424 values in the HTML version. i'd prefer the
1425 former, to avoid risking breaking HTML
1426 mode.
1427 */;
1428
1429 blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
1430 blob_append(&sql, timeline_query_for_www(), -1);
1431 blob_append(&sql, "AND event.type IN('ci') ", -1);
1432 blob_append(&sql, "ORDER BY mtime DESC ", -1);
@@ -1440,11 +1445,11 @@
1445 #endif
1446
1447 blob_reset(&sql);
1448 blob_append(&sql, "SELECT rid AS rid,"
1449 " uuid AS uuid,"
1450 " timestamp AS timestamp," /*FIXME: as epoch time*/
1451 " comment AS comment, "
1452 " user AS user,"
1453 " isleaf AS isLeaf,"
1454 " bgcolor AS bgColor,"
1455 " etype AS eventType,"
1456

Keyboard Shortcuts

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