Fossil SCM

Only show the SMTP transcript button if the transcript actually exists.

drh 2018-07-17 17:14 trunk
Commit 0a6898b030444f7ea6dba36111761407c2454a2e41ef74541bb67e87e77a55e1
1 file changed +3 -1
+3 -1
--- src/webmail.c
+++ src/webmail.c
@@ -462,11 +462,13 @@
462462
}
463463
}
464464
db_finalize(&q);
465465
466466
/* 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
+ ){
468470
if( P("ts")==0 ){
469471
sqlite3_snprintf(sizeof(zENum), zENum, "%d", emailid);
470472
style_submenu_element("SMTP Transcript","%s",
471473
url_render(pUrl, "ts", "1", "id", zENum));
472474
}else{
473475
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button