Fossil SCM
Fix malformed hyperlink for historical revisions of a forum post. Perhaps introduced by [check-in 168eb71643a4]. Reported by [forum post 44505ae8ec51](forum:/forumpost/44505ae8ec515e75).
Commit
114b17c4081090ec033406a8cce206f3a027735b919a85a453bd172f86e2c45d
Parent
8cc9211f9f384eb…
1 file changed
+2
-1
+2
-1
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -505,11 +505,11 @@ | ||
| 505 | 505 | zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist"; |
| 506 | 506 | @ <h3 class='forumPostHdr'>(%d(p->sid)\ |
| 507 | 507 | @ .%0*d(fossil_num_digits(p->nEdit))(p->rev)) \ |
| 508 | 508 | if( fossil_strcmp(zPosterName, zEditorName)==0 ){ |
| 509 | 509 | @ By %s(zPosterName) on %h(zDate) edited from \ |
| 510 | - @ %z(href("%R/forumpost/%S?%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ | |
| 510 | + @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ | |
| 511 | 511 | @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a> |
| 512 | 512 | }else{ |
| 513 | 513 | @ Originally by %s(zPosterName) \ |
| 514 | 514 | @ with edits by %s(zEditorName) on %h(zDate) from \ |
| 515 | 515 | @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| @@ -706,10 +706,11 @@ | ||
| 706 | 706 | zQuery[i++] = 's'; |
| 707 | 707 | zQuery[i++] = 't'; |
| 708 | 708 | } |
| 709 | 709 | assert( i<sizeof(zQuery) ); |
| 710 | 710 | zQuery[i] = 0; |
| 711 | + assert( zQuery[0]==0 || zQuery[0]=='?' ); | |
| 711 | 712 | |
| 712 | 713 | /* Identify which post to display first. If history is shown, start with the |
| 713 | 714 | ** original, unedited post. Otherwise advance to the post's latest edit. */ |
| 714 | 715 | if( mode==FD_RAW || mode==FD_SINGLE ){ |
| 715 | 716 | p = pSelect; |
| 716 | 717 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -505,11 +505,11 @@ | |
| 505 | zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist"; |
| 506 | @ <h3 class='forumPostHdr'>(%d(p->sid)\ |
| 507 | @ .%0*d(fossil_num_digits(p->nEdit))(p->rev)) \ |
| 508 | if( fossil_strcmp(zPosterName, zEditorName)==0 ){ |
| 509 | @ By %s(zPosterName) on %h(zDate) edited from \ |
| 510 | @ %z(href("%R/forumpost/%S?%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| 511 | @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a> |
| 512 | }else{ |
| 513 | @ Originally by %s(zPosterName) \ |
| 514 | @ with edits by %s(zEditorName) on %h(zDate) from \ |
| 515 | @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| @@ -706,10 +706,11 @@ | |
| 706 | zQuery[i++] = 's'; |
| 707 | zQuery[i++] = 't'; |
| 708 | } |
| 709 | assert( i<sizeof(zQuery) ); |
| 710 | zQuery[i] = 0; |
| 711 | |
| 712 | /* Identify which post to display first. If history is shown, start with the |
| 713 | ** original, unedited post. Otherwise advance to the post's latest edit. */ |
| 714 | if( mode==FD_RAW || mode==FD_SINGLE ){ |
| 715 | p = pSelect; |
| 716 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -505,11 +505,11 @@ | |
| 505 | zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist"; |
| 506 | @ <h3 class='forumPostHdr'>(%d(p->sid)\ |
| 507 | @ .%0*d(fossil_num_digits(p->nEdit))(p->rev)) \ |
| 508 | if( fossil_strcmp(zPosterName, zEditorName)==0 ){ |
| 509 | @ By %s(zPosterName) on %h(zDate) edited from \ |
| 510 | @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| 511 | @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a> |
| 512 | }else{ |
| 513 | @ Originally by %s(zPosterName) \ |
| 514 | @ with edits by %s(zEditorName) on %h(zDate) from \ |
| 515 | @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| @@ -706,10 +706,11 @@ | |
| 706 | zQuery[i++] = 's'; |
| 707 | zQuery[i++] = 't'; |
| 708 | } |
| 709 | assert( i<sizeof(zQuery) ); |
| 710 | zQuery[i] = 0; |
| 711 | assert( zQuery[0]==0 || zQuery[0]=='?' ); |
| 712 | |
| 713 | /* Identify which post to display first. If history is shown, start with the |
| 714 | ** original, unedited post. Otherwise advance to the post's latest edit. */ |
| 715 | if( mode==FD_RAW || mode==FD_SINGLE ){ |
| 716 | p = pSelect; |
| 717 |