Overview
SHA1 Hash: | c51dd3058c54e2cd5cdfc57f8f9a77314ec860b9 |
---|---|
Date: | 2008-05-16 01:09:08 |
User: | drh |
Comment: | Back out the "Home Page" configuration option added by 29374daa0d |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/setup.c from [ba00230314] to [ccb6e89143].
@@ -600,22 +600,10 @@ @ <hr /> textarea_attribute("Project Description", 5, 60, "project-description", "pd", ""); @ <p>Describe your project. This will be used in page headers for search @ engines as well as a short RSS description.</p> - @ <hr /> - entry_attribute("Home page", 60, "project-home", "phome", ""); - @ <p>This sets the content source for the Home page ([/home]). - @ Enter a wiki page name (as wiki/PageName) or another URL relative to - @ this server's root (%s(g.zBaseURL)/). - @ The default is to use wiki/ProjectName. Make sure to use a valid name, - @ or your /home link will likely crash! (If that happens, simply come back - @ to this page and set it to a good (or empty) value.) - @ To use .wiki or .html files in your source tree as content, use a URL - @ in the form <tt>doc/VERSION/path/to/doc.wiki</tt>, where VERSION is either - @ the UUID of a version of that page or the word 'tip' to get the most recent - @ version.</p> @ <hr /> @ <p><input type="submit" name="submit" value="Apply Changes"></p> @ </form> db_end_transaction(0); style_footer();
Modified src/wiki.c from [97d9b1ab7c] to [a910310888].
@@ -77,42 +77,22 @@ ** WEBPAGE: home ** WEBPAGE: index ** WEBPAGE: not_found */ void home_page(void){ - char *zHomePage; /* name of home page */ - char *zProjName; /* name of project */ - zProjName = db_get("project-name",0); - zHomePage = db_get("project-home", zProjName ); - if( zProjName && zProjName[0] ){ - /* beware: this code causes cyclic redirects on a 404 because - not_found is directed here. - */ - int lenP; /* strncmp() bounder */ - int lenH; /* length of zProjName */ - if( zHomePage && ! zHomePage[0] ){ - zHomePage = zProjName; - } - lenP = strlen(zProjName); - lenH = strlen(zHomePage); - if( lenP < lenH ) lenP = lenH; - if( (zProjName == zHomePage) || (0==strncmp(zProjName,zHomePage,lenP)) || - (0==strncmp(zHomePage,"home",lenP)/*avoid endless loop*/) ){ - login_check_credentials(); - g.zExtra = zHomePage; - cgi_set_parameter_nocopy("name", g.zExtra); - g.okRdWiki = 1; - g.okApndWiki = 0; - g.okWrWiki = 0; - g.okHistory = 0; - wiki_page(); - }else{ - cgi_redirect( zHomePage ); - } + char *zPageName = db_get("project-name",0); + if( zPageName ){ + login_check_credentials(); + g.zExtra = zPageName; + cgi_set_parameter_nocopy("name", g.zExtra); + g.okRdWiki = 1; + g.okApndWiki = 0; + g.okWrWiki = 0; + g.okHistory = 0; + wiki_page(); return; } - style_header("Home"); @ <p>This is a stub home-page for the project. @ To fill in this page, first go to @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a> @ and establish a "Project Name". Then create a