Fossil

Check-in [bf7ca1a4d8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the page header from Baseline to Check-in on the "vinfo" page. Fix a bug introduced into tagview (ticket [309c57b3d27219fa6ad601c0021dc067a7cb992d]).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bf7ca1a4d8ce33c852164c9105fa35c3e8c81339
User & Date: drh 2009-01-20 23:47:47.000
References
2009-01-20
23:49 Fixed ticket [309c57b3d2]: database error on hyperlinked tagname in tag menu plus 2 other changes ... (artifact: 2fb5b18845 user: drh)
Context
2009-01-21
00:05
Fix an SQL syntax error in the commit logic introduced by check-in [b6e22e62cf26115617822c7940cec5d0dc687184]. ... (check-in: f6d507179e user: drh tags: trunk)
2009-01-20
23:47
Change the page header from Baseline to Check-in on the "vinfo" page. Fix a bug introduced into tagview (ticket [309c57b3d27219fa6ad601c0021dc067a7cb992d]). ... (check-in: bf7ca1a4d8 user: drh tags: trunk)
23:39
On the "vinfo" page, add a link to a timeline of all other check-ins with the same tag. ... (check-in: fecb3e5cc9 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/info.c.
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
  int rid;
  int isLeaf;

  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  rid = name_to_rid(PD("name","0"));
  if( rid==0 ){
    style_header("Baseline Information Error");
    @ No such object: %h(g.argv[2])
    style_footer();
    return;
  }
  isLeaf = !db_exists("SELECT 1 FROM plink WHERE pid=%d", rid);
  db_prepare(&q, 
     "SELECT uuid, datetime(mtime, 'localtime'), user, comment"
     "  FROM blob, event"
     " WHERE blob.rid=%d"
     "   AND event.objid=%d",
     rid, rid
  );
  if( db_step(&q)==SQLITE_ROW ){
    const char *zUuid = db_column_text(&q, 0);
    char *zTitle = mprintf("Baseline [%.10s]", zUuid);
    char *zEUser, *zEComment;
    const char *zUser;
    const char *zComment;
    style_header(zTitle);
    login_anonymous_available();
    free(zTitle);
    zEUser = db_text(0,







|














|







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
  int rid;
  int isLeaf;

  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  rid = name_to_rid(PD("name","0"));
  if( rid==0 ){
    style_header("Check-in Information Error");
    @ No such object: %h(g.argv[2])
    style_footer();
    return;
  }
  isLeaf = !db_exists("SELECT 1 FROM plink WHERE pid=%d", rid);
  db_prepare(&q, 
     "SELECT uuid, datetime(mtime, 'localtime'), user, comment"
     "  FROM blob, event"
     " WHERE blob.rid=%d"
     "   AND event.objid=%d",
     rid, rid
  );
  if( db_step(&q)==SQLITE_ROW ){
    const char *zUuid = db_column_text(&q, 0);
    char *zTitle = mprintf("Check-in [%.10s]", zUuid);
    char *zEUser, *zEComment;
    const char *zUser;
    const char *zComment;
    style_header(zTitle);
    login_anonymous_available();
    free(zTitle);
    zEUser = db_text(0,
Changes to src/tagview.c.
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
  Stmt q;
  int tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='%q%q'",
                        zPrefix, zName);
  zSql = mprintf("%s AND EXISTS (SELECT 1"
         " FROM tagxref"
         "  WHERE tagxref.rid = event.objid"
         "  AND tagxref.tagtype > 0"
         "  AND tagxref.tagid = %d"
         " ORDER BY 3 desc",
         timeline_query_for_www(), tagid
  );
  db_prepare(&q, zSql);
  free(zSql);
  www_print_timeline(&q);
  db_finalize(&q);







|







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
  Stmt q;
  int tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='%q%q'",
                        zPrefix, zName);
  zSql = mprintf("%s AND EXISTS (SELECT 1"
         " FROM tagxref"
         "  WHERE tagxref.rid = event.objid"
         "  AND tagxref.tagtype > 0"
         "  AND tagxref.tagid = %d)"
         " ORDER BY 3 desc",
         timeline_query_for_www(), tagid
  );
  db_prepare(&q, zSql);
  free(zSql);
  www_print_timeline(&q);
  db_finalize(&q);