Fossil SCM
Only show the SMTP transcript button if the transcript actually exists.
Commit
0a6898b030444f7ea6dba36111761407c2454a2e41ef74541bb67e87e77a55e1
Parent
032e80b55e68758…
1 file changed
+3
-1
+3
-1
| --- src/webmail.c | ||
| +++ src/webmail.c | ||
| @@ -462,11 +462,13 @@ | ||
| 462 | 462 | } |
| 463 | 463 | } |
| 464 | 464 | db_finalize(&q); |
| 465 | 465 | |
| 466 | 466 | /* Optionally show the SMTP transcript */ |
| 467 | - if( eTranscript>0 ){ | |
| 467 | + if( eTranscript>0 | |
| 468 | + && db_exists("SELECT 1 FROM emailblob WHERE emailid=%d", eTranscript) | |
| 469 | + ){ | |
| 468 | 470 | if( P("ts")==0 ){ |
| 469 | 471 | sqlite3_snprintf(sizeof(zENum), zENum, "%d", emailid); |
| 470 | 472 | style_submenu_element("SMTP Transcript","%s", |
| 471 | 473 | url_render(pUrl, "ts", "1", "id", zENum)); |
| 472 | 474 | }else{ |
| 473 | 475 |
| --- src/webmail.c | |
| +++ src/webmail.c | |
| @@ -462,11 +462,13 @@ | |
| 462 | } |
| 463 | } |
| 464 | db_finalize(&q); |
| 465 | |
| 466 | /* Optionally show the SMTP transcript */ |
| 467 | if( eTranscript>0 ){ |
| 468 | if( P("ts")==0 ){ |
| 469 | sqlite3_snprintf(sizeof(zENum), zENum, "%d", emailid); |
| 470 | style_submenu_element("SMTP Transcript","%s", |
| 471 | url_render(pUrl, "ts", "1", "id", zENum)); |
| 472 | }else{ |
| 473 |
| --- src/webmail.c | |
| +++ src/webmail.c | |
| @@ -462,11 +462,13 @@ | |
| 462 | } |
| 463 | } |
| 464 | db_finalize(&q); |
| 465 | |
| 466 | /* Optionally show the SMTP transcript */ |
| 467 | if( eTranscript>0 |
| 468 | && db_exists("SELECT 1 FROM emailblob WHERE emailid=%d", eTranscript) |
| 469 | ){ |
| 470 | if( P("ts")==0 ){ |
| 471 | sqlite3_snprintf(sizeof(zENum), zENum, "%d", emailid); |
| 472 | style_submenu_element("SMTP Transcript","%s", |
| 473 | url_render(pUrl, "ts", "1", "id", zENum)); |
| 474 | }else{ |
| 475 |