Fossil

Diff
Login

Differences From Artifact [7252277a58]:

To Artifact [513d29aeb5]:


376
377
378
379
380
381
382
383

384
385
386
387
388
389
390
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;            /* Original document name */
  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
528

529
530
531
532
533
534
535
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) 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;
}