Fossil

Check-in [c99b4e34dd]
Login

Check-in [c99b4e34dd]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the /doc page so that it correctly handles an empty document name in the same way that it handles a NULL document name.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c99b4e34dd1db2cc1a7135f6b1684993e8dd8ae5
User & Date: drh 2015-07-15 10:31:33.736
Context
2015-07-15
10:33
Fix a typo in a comment. No changes to code. ... (check-in: d1a8238783 user: drh tags: trunk)
10:31
Fix the /doc page so that it correctly handles an empty document name in the same way that it handles a NULL document name. ... (check-in: c99b4e34dd user: drh tags: trunk)
00:54
Add 'double' and 'integer' classes to the 'string is' command in TH1. ... (check-in: 5e9c7a4a78 user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/doc.c.
545
546
547
548
549
550
551

552
553
554
555
556
557
558
559
  };

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  blob_init(&title, 0, 0);
  db_begin_transaction();
  while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){

    zName = PD("name", "tip/index.wiki");
    for(i=0; zName[i] && zName[i]!='/'; i++){}
    zCheckin = mprintf("%.*s", i, zName);
    if( fossil_strcmp(zCheckin,"ckout")==0 && db_open_local(0)==0 ){
      zCheckin = "tip";
    }
    if( nMiss==ArraySize(azSuffix) ){
      zName = "404.md";







>
|







545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
  };

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  blob_init(&title, 0, 0);
  db_begin_transaction();
  while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){
    zName = P("name");
    if( zName==0 || zName[0]==0 ) zName = "tip/index.wiki";
    for(i=0; zName[i] && zName[i]!='/'; i++){}
    zCheckin = mprintf("%.*s", i, zName);
    if( fossil_strcmp(zCheckin,"ckout")==0 && db_open_local(0)==0 ){
      zCheckin = "tip";
    }
    if( nMiss==ArraySize(azSuffix) ){
      zName = "404.md";