| | @@ -212,13 +212,12 @@ |
| 212 | 212 | int cnt = 0; |
| 213 | 213 | db_prepare(&q, |
| 214 | 214 | "SELECT blob.uuid, datetime(event.mtime, 'localtime')," |
| 215 | 215 | " coalesce(event.euser, event.user)," |
| 216 | 216 | " coalesce(event.ecomment,event.comment)" |
| 217 | | - " FROM leaves, plink, blob, event" |
| 218 | | - " WHERE plink.cid=leaves.rid" |
| 219 | | - " AND blob.rid=leaves.rid" |
| 217 | + " FROM leaves, blob, event" |
| 218 | + " WHERE blob.rid=leaves.rid" |
| 220 | 219 | " AND event.objid=leaves.rid" |
| 221 | 220 | " ORDER BY event.mtime DESC" |
| 222 | 221 | ); |
| 223 | 222 | while( db_step(&q)==SQLITE_ROW ){ |
| 224 | 223 | const char *zUuid = db_column_text(&q, 0); |
| | @@ -253,11 +252,10 @@ |
| 253 | 252 | " LEFT JOIN blob ON blob.rid=tagxref.srcid" |
| 254 | 253 | " WHERE tagxref.rid=%d" |
| 255 | 254 | " ORDER BY tagname", rid |
| 256 | 255 | ); |
| 257 | 256 | while( db_step(&q)==SQLITE_ROW ){ |
| 258 | | - int tagid = db_column_int(&q, 0); |
| 259 | 257 | const char *zTagname = db_column_text(&q, 1); |
| 260 | 258 | int srcid = db_column_int(&q, 2); |
| 261 | 259 | const char *zUuid = db_column_text(&q, 3); |
| 262 | 260 | const char *zValue = db_column_text(&q, 4); |
| 263 | 261 | const char *zDate = db_column_text(&q, 5); |
| | @@ -545,18 +543,19 @@ |
| 545 | 543 | while( db_step(&q)==SQLITE_ROW ){ |
| 546 | 544 | const char *zDate = db_column_text(&q, 0); |
| 547 | 545 | const char *zUuid = db_column_text(&q, 3); |
| 548 | 546 | const char *zCom = db_column_text(&q, 2); |
| 549 | 547 | const char *zUser = db_column_text(&q, 1); |
| 550 | | - @ Version |
| 548 | + @ Manifest of version |
| 551 | 549 | hyperlink_to_uuid(zUuid); |
| 552 | 550 | @ %s(zCom) by %s(zUser) on %s(zDate). |
| 553 | 551 | cnt++; |
| 554 | 552 | } |
| 555 | 553 | db_finalize(&q); |
| 556 | 554 | if( cnt==0 ){ |
| 557 | | - @ Empty file |
| 555 | + char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 556 | + @ Control file %s(zUuid). |
| 558 | 557 | }else if( linkToView ){ |
| 559 | 558 | @ <a href="%s(g.zBaseURL)/fview/%d(rid)">[view]</a> |
| 560 | 559 | } |
| 561 | 560 | } |
| 562 | 561 | |
| | @@ -565,12 +564,12 @@ |
| 565 | 564 | ** |
| 566 | 565 | ** Two arguments, v1 and v2, are integers. Show the difference between |
| 567 | 566 | ** the two records. |
| 568 | 567 | */ |
| 569 | 568 | void diff_page(void){ |
| 570 | | - int v1 = atoi(PD("v1","0")); |
| 571 | | - int v2 = atoi(PD("v2","0")); |
| 569 | + int v1 = name_to_rid(PD("v1","0")); |
| 570 | + int v2 = name_to_rid(PD("v2","0")); |
| 572 | 571 | Blob c1, c2, diff; |
| 573 | 572 | |
| 574 | 573 | login_check_credentials(); |
| 575 | 574 | if( !g.okHistory ){ login_needed(); return; } |
| 576 | 575 | style_header("Diff"); |
| | @@ -595,10 +594,11 @@ |
| 595 | 594 | blob_reset(&diff); |
| 596 | 595 | style_footer(); |
| 597 | 596 | } |
| 598 | 597 | |
| 599 | 598 | /* |
| 599 | +** WEBPAGE: info |
| 600 | 600 | ** WEBPAGE: fview |
| 601 | 601 | ** URL: /fview/UUID |
| 602 | 602 | ** |
| 603 | 603 | ** Show the complete content of a file identified by UUID |
| 604 | 604 | ** as preformatted text. |
| | @@ -608,10 +608,15 @@ |
| 608 | 608 | Blob content; |
| 609 | 609 | |
| 610 | 610 | rid = name_to_rid(g.zExtra); |
| 611 | 611 | login_check_credentials(); |
| 612 | 612 | if( !g.okHistory ){ login_needed(); return; } |
| 613 | + if( g.zPath[0]=='i' && |
| 614 | + db_exists("SELECT 1 FROM plink WHERE cid=%d", rid) ){ |
| 615 | + vinfo_page(); |
| 616 | + return; |
| 617 | + } |
| 613 | 618 | style_header("File Content"); |
| 614 | 619 | @ <h2>Content Of:</h2> |
| 615 | 620 | @ <blockquote> |
| 616 | 621 | object_description(rid, 0); |
| 617 | 622 | @ </blockquote> |
| 618 | 623 | |