Differences From:
File
src/wiki.c
part of check-in
[32c06fd65b]
- fixed a used-the-wrong-var bug from that last commit
by
stephan on
2008-05-15 22:11:47.
Also file
src/wiki.c
part of check-in
[f94f7e5f49]
- Merge the fork back together.
by
drh on
2008-05-16 00:27:49.
[view]
To:
File
src/wiki.c
part of check-in
[c51dd3058c]
- Back out the "Home Page" configuration option added by 29374daa0d
by
drh on
2008-05-16 01:09:08.
[view]
@@ -78,40 +78,20 @@
** 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>