Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch docVarWarn Excluding Merge-Ins
This is equivalent to a diff from 4c247512a8 to aed9971ddb
2015-01-23
| ||
13:50 | Make sure the zOrigName variable in the /doc page implementation is always initialized, even for early errors. check-in: f5165dd05b user: drh tags: trunk | |
07:03 | Fix compiler warning for 'zOrigName' variable. If unable to locate a document, fallback on 'zName' if 'zOrigName' is zero. Closed-Leaf check-in: aed9971ddb user: mistachkin tags: docVarWarn | |
05:49 | Fix build issue for MinGW due to missing 'ws2tcpip.h' functions. check-in: 4c247512a8 user: mistachkin tags: trunk | |
04:26 | Clean up the /doc webpage. Use newer interfaces that were created since that page was original written. Set the HTTP status to 404 on not found. Try to find a "404.md" page to display and use it if found instead of the default 404 page. check-in: cfcd9b87dc user: drh tags: trunk | |
Changes to src/doc.c.
︙ | ︙ | |||
376 377 378 379 380 381 382 | ** for looking at what a file will look like using the /doc webpage after ** it gets checked in. ** ** The file extension is used to decide how to render the file. */ void doc_page(void){ const char *zName; /* Argument to the /doc page */ | | | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | ** for looking at what a file will look like using the /doc webpage after ** it gets checked in. ** ** The file extension is used to decide how to render the file. */ void doc_page(void){ const char *zName; /* Argument to the /doc page */ const char *zOrigName = 0; /* Original document name */ const char *zMime; /* Document MIME type */ char *zCheckin; /* The checkin holding the document */ int vid = 0; /* Artifact of checkin */ int rid = 0; /* Artifact of file */ int i; /* Loop counter */ Blob filebody; /* Content of the documentation file */ int nMiss = 0; /* Failed attempts to find the document */ |
︙ | ︙ | |||
521 522 523 524 525 526 527 | return; /* Jump here when unable to locate the document */ doc_not_found: db_end_transaction(0); cgi_set_status(404, "Not Found"); style_header("Not Found"); | | | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | return; /* Jump here when unable to locate the document */ doc_not_found: db_end_transaction(0); cgi_set_status(404, "Not Found"); style_header("Not Found"); @ <p>Document %h(zOrigName ? zOrigName : zName) not found if( fossil_strcmp(zCheckin,"ckout")!=0 ){ @ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a> } style_footer(); return; } |
︙ | ︙ |