Fossil

Check-in [25379569]
Login

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

Overview
Comment:Fix the /uv page so that it correctly handles a missing "name". First it looks for "index.html", "index.wiki", "index.md" and "index.th1", then if none of those documents are found, it does the equivalent of /uvlist.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:253795692b31080d7430b2e8dc9a2014930eeec6
User & Date: drh 2016-08-21 17:50:19
Context
2016-08-22
15:20
Fill in SQL parameters in report formats using HTTP query parameter values. check-in: 0ef09dc9 user: drh tags: trunk
2016-08-21
17:50
Fix the /uv page so that it correctly handles a missing "name". First it looks for "index.html", "index.wiki", "index.md" and "index.th1", then if none of those documents are found, it does the equivalent of /uvlist. check-in: 25379569 user: drh tags: trunk
00:13
Account for recent 'hr' markup changes in the th1-tcl tests. check-in: 6a73034e user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/doc.c.

   594    594     if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
   595    595     blob_init(&title, 0, 0);
   596    596     zDfltTitle = isUV ? "" : "Documentation";
   597    597     db_begin_transaction();
   598    598     while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){
   599    599       zName = P("name");
   600    600       if( isUV ){
          601  +      if( zName==0 ) zName = "";
   601    602         i = 0;
   602    603       }else{
   603    604         if( zName==0 || zName[0]==0 ) zName = "tip/index.wiki";
   604    605         for(i=0; zName[i] && zName[i]!='/'; i++){}
   605    606         zCheckin = mprintf("%.*s", i, zName);
   606    607         if( fossil_strcmp(zCheckin,"ckout")==0 && g.localOpen==0 ){
   607    608           zCheckin = "tip";
................................................................................
   723    724     if( nMiss>=ArraySize(azSuffix) ) cgi_set_status(404, "Not Found");
   724    725     db_end_transaction(0);
   725    726     return;
   726    727   
   727    728     /* Jump here when unable to locate the document */
   728    729   doc_not_found:
   729    730     db_end_transaction(0);
          731  +  if( isUV && P("name")==0 ){
          732  +    return uvstat_page();
          733  +  }
   730    734     cgi_set_status(404, "Not Found");
   731    735     style_header("Not Found");
   732    736     @ <p>Document %h(zOrigName) not found
   733    737     if( fossil_strcmp(zCheckin,"ckout")!=0 ){
   734    738       @ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
   735    739     }
   736    740     style_footer();