Fossil SCM
added a couple FIXME notes before bed.
Commit
e78578453878bd67602c19114ceb1e9911416c3c
Parent
eff3f7d92960b0a…
1 file changed
+8
-3
+8
-3
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -1412,16 +1412,21 @@ | ||
| 1412 | 1412 | cson_object * pay = NULL; |
| 1413 | 1413 | cson_value * tmp = NULL; |
| 1414 | 1414 | int limit = json_getenv_int("n",10); |
| 1415 | 1415 | Stmt q; |
| 1416 | 1416 | 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*/ ){ | |
| 1418 | 1418 | g.json.resultCode = FSL_JSON_E_DENIED; |
| 1419 | 1419 | return NULL; |
| 1420 | 1420 | } |
| 1421 | 1421 | 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 | + */; | |
| 1423 | 1428 | |
| 1424 | 1429 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1425 | 1430 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1426 | 1431 | blob_append(&sql, "AND event.type IN('ci') ", -1); |
| 1427 | 1432 | blob_append(&sql, "ORDER BY mtime DESC ", -1); |
| @@ -1440,11 +1445,11 @@ | ||
| 1440 | 1445 | #endif |
| 1441 | 1446 | |
| 1442 | 1447 | blob_reset(&sql); |
| 1443 | 1448 | blob_append(&sql, "SELECT rid AS rid," |
| 1444 | 1449 | " uuid AS uuid," |
| 1445 | - " timestamp AS timestamp," | |
| 1450 | + " timestamp AS timestamp," /*FIXME: as epoch time*/ | |
| 1446 | 1451 | " comment AS comment, " |
| 1447 | 1452 | " user AS user," |
| 1448 | 1453 | " isleaf AS isLeaf," |
| 1449 | 1454 | " bgcolor AS bgColor," |
| 1450 | 1455 | " etype AS eventType," |
| 1451 | 1456 |
| --- 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 |