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 |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
253795692b31080d7430b2e8dc9a2014 |
| User & Date: | drh 2016-08-21 17:50:19.962 |
Context
|
2016-08-22
| ||
| 15:20 | Fill in SQL parameters in report formats using HTTP query parameter values. ... (check-in: 0ef09dc9cd 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: 253795692b user: drh tags: trunk) | |
| 00:13 | Account for recent 'hr' markup changes in the th1-tcl tests. ... (check-in: 6a73034e71 user: mistachkin tags: trunk) | |
Changes
Changes to src/doc.c.
| ︙ | ︙ | |||
594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
blob_init(&title, 0, 0);
zDfltTitle = isUV ? "" : "Documentation";
db_begin_transaction();
while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){
zName = P("name");
if( isUV ){
i = 0;
}else{
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 && g.localOpen==0 ){
zCheckin = "tip";
| > | 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
blob_init(&title, 0, 0);
zDfltTitle = isUV ? "" : "Documentation";
db_begin_transaction();
while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){
zName = P("name");
if( isUV ){
if( zName==0 ) zName = "";
i = 0;
}else{
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 && g.localOpen==0 ){
zCheckin = "tip";
|
| ︙ | ︙ | |||
723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
if( nMiss>=ArraySize(azSuffix) ) cgi_set_status(404, "Not Found");
db_end_transaction(0);
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
if( fossil_strcmp(zCheckin,"ckout")!=0 ){
@ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
}
style_footer();
| > > > | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
if( nMiss>=ArraySize(azSuffix) ) cgi_set_status(404, "Not Found");
db_end_transaction(0);
return;
/* Jump here when unable to locate the document */
doc_not_found:
db_end_transaction(0);
if( isUV && P("name")==0 ){
return uvstat_page();
}
cgi_set_status(404, "Not Found");
style_header("Not Found");
@ <p>Document %h(zOrigName) not found
if( fossil_strcmp(zCheckin,"ckout")!=0 ){
@ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin)</a>
}
style_footer();
|
| ︙ | ︙ |