| | @@ -97,16 +97,18 @@ |
| 97 | 97 | Blob *pArg |
| 98 | 98 | ){ |
| 99 | 99 | char zPrevDate[20]; |
| 100 | 100 | int cnt = 0; |
| 101 | 101 | zPrevDate[0] = 0; |
| 102 | + Blob comment; |
| 102 | 103 | |
| 103 | 104 | db_multi_exec( |
| 104 | 105 | "CREATE TEMP TABLE IF NOT EXISTS seen(rid INTEGER PRIMARY KEY);" |
| 105 | 106 | "DELETE FROM seen;" |
| 106 | 107 | ); |
| 107 | 108 | @ <table cellspacing=0 border=0 cellpadding=0> |
| 109 | + blob_zero(&comment); |
| 108 | 110 | while( db_step(pQuery)==SQLITE_ROW ){ |
| 109 | 111 | int rid = db_column_int(pQuery, 0); |
| 110 | 112 | const char *zUuid = db_column_text(pQuery, 1); |
| 111 | 113 | int nPChild = db_column_int(pQuery, 5); |
| 112 | 114 | int nParent = db_column_int(pQuery, 6); |
| | @@ -151,11 +153,13 @@ |
| 151 | 153 | @ <b>Fork</b> |
| 152 | 154 | } |
| 153 | 155 | if( isLeaf ){ |
| 154 | 156 | @ <b>Leaf</b> |
| 155 | 157 | } |
| 156 | | - @ %h(db_column_text(pQuery,3)) |
| 158 | + db_column_blob(pQuery, 3, &comment); |
| 159 | + wiki_convert(&comment, 0); |
| 160 | + blob_reset(&comment); |
| 157 | 161 | @ (by %h(db_column_text(pQuery,4)))</td></tr> |
| 158 | 162 | } |
| 159 | 163 | @ </table> |
| 160 | 164 | } |
| 161 | 165 | |
| | @@ -457,11 +461,11 @@ |
| 457 | 461 | static const char zBaseSql[] = |
| 458 | 462 | @ SELECT |
| 459 | 463 | @ blob.rid, |
| 460 | 464 | @ uuid, |
| 461 | 465 | @ datetime(event.mtime,'localtime'), |
| 462 | | - @ coalesce(ecomment,comment) || ' (by ' || coalesce(euser,user) || ')', |
| 466 | + @ coalesce(ecomment,comment) || ' (by ' || coalesce(euser,user,'?') ||')', |
| 463 | 467 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim), |
| 464 | 468 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid) |
| 465 | 469 | @ FROM event, blob |
| 466 | 470 | @ WHERE blob.rid=event.objid |
| 467 | 471 | ; |
| 468 | 472 | |