Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 931f8895c650aec132a9d0acd17bbf82d40b4d2f |
|---|---|
| Date: | 2010-03-17 23:49:55 |
| User: | drh |
| Comment: | Show artifact changes in ticket history. |
Tags And Properties
- bgcolor=#c0ffc0 inherited from [c3d7df650b]
- branch=experimental inherited from [c3d7df650b]
- sym-experimental inherited from [c3d7df650b]
Changes
Changes to src/tkt.c
723 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); 723 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); 724 if( tagid==0 ){ 724 if( tagid==0 ){ 725 @ No such ticket: %h(zUuid) 725 @ No such ticket: %h(zUuid) 726 style_footer(); 726 style_footer(); 727 return; 727 return; 728 } 728 } 729 db_prepare(&q, 729 db_prepare(&q, > 730 "SELECT datetime(mtime,'localtime'), objid, uuid, NULL, NULL, NULL" 730 "SELECT objid, uuid FROM event, blob" | 731 " FROM event, blob" 731 " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" 732 " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" 732 " AND blob.rid=event.objid" 733 " AND blob.rid=event.objid" > 734 " UNION " > 735 "SELECT datetime(mtime,'localtime'), attachid, uuid, src, filename, user" > 736 " FROM attachment, blob" > 737 " WHERE isLatest AND target=(SELECT substr(tagname,5) FROM tag" > 738 " WHERE tagid=%d)" > 739 " AND blob.rid=attachid" 733 " ORDER BY mtime DESC", | 740 " ORDER BY 1 DESC", 734 tagid | 741 tagid, tagid 735 ); 742 ); 736 while( db_step(&q)==SQLITE_ROW ){ 743 while( db_step(&q)==SQLITE_ROW ){ 737 Blob content; 744 Blob content; 738 Manifest m; 745 Manifest m; > 746 char zShort[12]; > 747 const char *zDate = db_column_text(&q, 0); 739 int rid = db_column_int(&q, 0); | 748 int rid = db_column_int(&q, 1); 740 const char *zChngUuid = db_column_text(&q, 1); | 749 const char *zChngUuid = db_column_text(&q, 2); 741 content_get(rid, &content); < 742 if( manifest_parse(&m, &content) && m.type==CFTYPE_TICKET ){ < 743 char *zDate = db_text(0, "SELECT datetime(%.12f)", m.rDate); | 750 const char *zFile = db_column_text(&q, 4); 744 char zUuid[12]; < 745 memcpy(zUuid, zChngUuid, 10); | 751 memcpy(zShort, zChngUuid, 10); 746 zUuid[10] = 0; | 752 zShort[10] = 0; 747 @ < > 753 if( zFile!=0 ){ > 754 const char *zSrc = db_column_text(&q, 3); 748 @ Ticket change | 755 const char *zUser = db_column_text(&q, 5); > 756 if( zSrc==0 ){ > 757 @ > 758 @ <p>Delete attachment "%h(zFile)" > 759 }else{ > 760 @ > 761 @ <p>Add attachment "%h(zFile)" > 762 } 749 @ [<a href="%s(g.zTop)/artifact/%T(zChngUuid)">%s(zUuid)</a>]</a> | 763 @ [<a href="%s(g.zTop)/artifact/%T(zChngUuid)">%s(zShort)</a>] 750 @ (rid %d(rid)) by 764 @ (rid %d(rid)) by > 765 hyperlink_to_user(zUser,zDate," on"); > 766 hyperlink_to_date(zDate, ".</p>"); > 767 }else{ > 768 content_get(rid, &content); > 769 if( manifest_parse(&m, &content) && m.type==CFTYPE_TICKET ){ > 770 @ > 771 @ <p>Ticket change > 772 @ [<a href="%s(g.zTop)/artifact/%T(zChngUuid)">%s(zShort)</a>] > 773 @ (rid %d(rid)) by 751 hyperlink_to_user(m.zUser,zDate," on"); | 774 hyperlink_to_user(m.zUser,zDate," on"); 752 hyperlink_to_date(zDate, ":"); | 775 hyperlink_to_date(zDate, ":"); 753 free(zDate); < 754 ticket_output_change_artifact(&m); | 776 ticket_output_change_artifact(&m); > 777 @ </p> > 778 } > 779 manifest_clear(&m); 755 } 780 } 756 manifest_clear(&m); < 757 } 781 } 758 db_finalize(&q); 782 db_finalize(&q); 759 style_footer(); 783 style_footer(); 760 } 784 } 761 785 762 /* 786 /* 763 ** Return TRUE if the given BLOB contains a newline character. 787 ** Return TRUE if the given BLOB contains a newline character.