@@ -213,11 +213,10 @@
db_prepare(&q,
"SELECT blob.uuid, datetime(event.mtime, 'localtime'),"
" coalesce(event.euser, event.user),"
" coalesce(event.ecomment,event.comment)"
- " FROM leaves, plink, blob, event"
- " WHERE plink.cid=leaves.rid"
- " AND blob.rid=leaves.rid"
+ " FROM leaves, blob, event"
+ " WHERE blob.rid=leaves.rid"
" AND event.objid=leaves.rid"
" ORDER BY event.mtime DESC"
);
while( db_step(&q)==SQLITE_ROW ){
@@ -254,9 +253,8 @@
" WHERE tagxref.rid=%d"
" ORDER BY tagname", rid
);
while( db_step(&q)==SQLITE_ROW ){
- int tagid = db_column_int(&q, 0);
const char *zTagname = db_column_text(&q, 1);
int srcid = db_column_int(&q, 2);
const char *zUuid = db_column_text(&q, 3);
const char *zValue = db_column_text(&q, 4);
@@ -546,16 +544,17 @@
const char *zDate = db_column_text(&q, 0);
const char *zUuid = db_column_text(&q, 3);
const char *zCom = db_column_text(&q, 2);
const char *zUser = db_column_text(&q, 1);
- @ Version
+ @ Manifest of version
hyperlink_to_uuid(zUuid);
@ %s(zCom) by %s(zUser) on %s(zDate).
cnt++;
}
db_finalize(&q);
if( cnt==0 ){
- @ Empty file
+ char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
+ @ Control file %s(zUuid).
}else if( linkToView ){
@ <a href="%s(g.zBaseURL)/fview/%d(rid)">[view]</a>
}
}
@@ -566,10 +565,10 @@
** Two arguments, v1 and v2, are integers. Show the difference between
** the two records.
*/
void diff_page(void){
- int v1 = atoi(PD("v1","0"));
- int v2 = atoi(PD("v2","0"));
+ int v1 = name_to_rid(PD("v1","0"));
+ int v2 = name_to_rid(PD("v2","0"));
Blob c1, c2, diff;
login_check_credentials();
if( !g.okHistory ){ login_needed(); return; }
@@ -596,8 +595,9 @@
style_footer();
}
/*
+** WEBPAGE: info
** WEBPAGE: fview
** URL: /fview/UUID
**
** Show the complete content of a file identified by UUID
@@ -609,8 +609,13 @@
rid = name_to_rid(g.zExtra);
login_check_credentials();
if( !g.okHistory ){ login_needed(); return; }
+ if( g.zPath[0]=='i' &&
+ db_exists("SELECT 1 FROM plink WHERE cid=%d", rid) ){
+ vinfo_page();
+ return;
+ }
style_header("File Content");
@ <h2>Content Of:</h2>
@ <blockquote>
object_description(rid, 0);