Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | The /ci_tags page now adapts its header label based on the type of artifact hash passed to it (since it works as-is with hashes other than checkins). |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
41f0838cbeacb51da0de4643fb789abf |
| User & Date: | stephan 2021-05-31 03:26:00.060 |
References
|
2021-06-01
| ||
| 00:02 | Minor refactoring of [41f0838cbeac] in prep for expanding the tag command to handle non-checkin artifacts. ... (check-in: b051ada90d user: stephan tags: plink-for-non-checkins) | |
Context
|
2021-05-31
| ||
| 23:33 | Merge into trunk the enhancements that allow an admin to set an expiration time for email notification subscriptions. ... (check-in: 34d45c55b9 user: drh tags: trunk) | |
| 04:11 | Merged in trunk. ... (check-in: 24ccc48160 user: stephan tags: plink-for-non-checkins) | |
| 03:26 | The /ci_tags page now adapts its header label based on the type of artifact hash passed to it (since it works as-is with hashes other than checkins). ... (check-in: 41f0838cbe user: stephan tags: trunk) | |
|
2021-05-30
| ||
| 03:46 | Added a note to release-checklist.wiki reminding the user to pass the proper binary name to valgrind so that it does not pick up another copy (or a wrapper script) from the PATH. ... (check-in: efb602b7de user: stephan tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
*/
void ci_tags_page(void){
const char *zHash;
int rid;
Stmt q;
int cnt = 0;
Blob sql;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
rid = name_to_rid_www("name");
if( rid==0 ){
style_header("Check-in Information Error");
@ No such object: %h(g.argv[2])
style_finish_page();
return;
}
zHash = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
style_header("Tags and Properties");
| > > > | | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
*/
void ci_tags_page(void){
const char *zHash;
int rid;
Stmt q;
int cnt = 0;
Blob sql;
char const *zType;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
rid = name_to_rid_www("name");
if( rid==0 ){
style_header("Check-in Information Error");
@ No such object: %h(g.argv[2])
style_finish_page();
return;
}
zHash = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
style_header("Tags and Properties");
zType = whatis_rid_type(rid);
if(!zType) zType = "Artifact";
@ <h1>Tags and Properties for %s(zType) \
@ %z(href("%R/ci/%!S",zHash))%S(zHash)</a></h1>
db_prepare(&q,
"SELECT tag.tagid, tagname, "
" (SELECT uuid FROM blob WHERE rid=tagxref.srcid AND rid!=%d),"
" value, datetime(tagxref.mtime,toLocal()), tagtype,"
" (SELECT uuid FROM blob WHERE rid=tagxref.origid AND rid!=%d)"
" FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid"
|
| ︙ | ︙ |
Changes to src/name.c.
| ︙ | ︙ | |||
735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
rid = symbolic_name_to_rid(zName, "*");
if( rid<0 ){
cgi_redirectf("%R/ambiguous/%T?src=%t", zName, g.zPath);
rid = 0;
}
return rid;
}
/*
** Generate a description of artifact "rid"
*/
void whatis_rid(int rid, int verboseFlag){
Stmt q;
int cnt;
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
rid = symbolic_name_to_rid(zName, "*");
if( rid<0 ){
cgi_redirectf("%R/ambiguous/%T?src=%t", zName, g.zPath);
rid = 0;
}
return rid;
}
/*
** Given an RID of a structural artifact, which is assumed to be
** valid, this function returns a brief string (in static memory)
** describing the record type. Returns NULL if rid does not refer to
** an artifact record (as determined by reading the event table). The
** returned string is intended to be used in headers which can refer
** to different artifact types. It is not "definitive," in that it
** does not distinguish between closely-related types like wiki
** creation, edit, and removal.
*/
char const * whatis_rid_type(int rid){
Stmt q = empty_Stmt;
char const * zType = 0;
/* Check for entries on the timeline that reference this object */
db_prepare(&q,
"SELECT type FROM event WHERE objid=%d", rid);
if( db_step(&q)==SQLITE_ROW ){
switch( db_column_text(&q,0)[0] ){
case 'c': zType = "Check-in"; break;
case 'w': zType = "Wiki-edit"; break;
case 'e': zType = "Technote"; break;
case 'f': zType = "Forum-post"; break;
case 't': zType = "Ticket-change"; break;
case 'g': zType = "Tag-change"; break;
default: break;
}
}
db_finalize(&q);
return zType;
}
/*
** Generate a description of artifact "rid"
*/
void whatis_rid(int rid, int verboseFlag){
Stmt q;
int cnt;
|
| ︙ | ︙ |