Fossil SCM

Back out the "Home Page" configuration option added by [29374daa0d]

drh 2008-05-16 01:09 trunk
Commit c51dd3058c54e2cd5cdfc57f8f9a77314ec860b9
2 files changed -12 +10 -30
-12
--- src/setup.c
+++ src/setup.c
@@ -601,22 +601,10 @@
601601
textarea_attribute("Project Description", 5, 60,
602602
"project-description", "pd", "");
603603
@ <p>Describe your project. This will be used in page headers for search
604604
@ engines as well as a short RSS description.</p>
605605
@ <hr />
606
- entry_attribute("Home page", 60, "project-home", "phome", "");
607
- @ <p>This sets the content source for the Home page ([/home]).
608
- @ Enter a wiki page name (as wiki/PageName) or another URL relative to
609
- @ this server's root (%s(g.zBaseURL)/).
610
- @ The default is to use wiki/ProjectName. Make sure to use a valid name,
611
- @ or your /home link will likely crash! (If that happens, simply come back
612
- @ to this page and set it to a good (or empty) value.)
613
- @ To use .wiki or .html files in your source tree as content, use a URL
614
- @ in the form <tt>doc/VERSION/path/to/doc.wiki</tt>, where VERSION is either
615
- @ the UUID of a version of that page or the word 'tip' to get the most recent
616
- @ version.</p>
617
- @ <hr />
618606
@ <p><input type="submit" name="submit" value="Apply Changes"></p>
619607
@ </form>
620608
db_end_transaction(0);
621609
style_footer();
622610
}
623611
--- src/setup.c
+++ src/setup.c
@@ -601,22 +601,10 @@
601 textarea_attribute("Project Description", 5, 60,
602 "project-description", "pd", "");
603 @ <p>Describe your project. This will be used in page headers for search
604 @ engines as well as a short RSS description.</p>
605 @ <hr />
606 entry_attribute("Home page", 60, "project-home", "phome", "");
607 @ <p>This sets the content source for the Home page ([/home]).
608 @ Enter a wiki page name (as wiki/PageName) or another URL relative to
609 @ this server's root (%s(g.zBaseURL)/).
610 @ The default is to use wiki/ProjectName. Make sure to use a valid name,
611 @ or your /home link will likely crash! (If that happens, simply come back
612 @ to this page and set it to a good (or empty) value.)
613 @ To use .wiki or .html files in your source tree as content, use a URL
614 @ in the form <tt>doc/VERSION/path/to/doc.wiki</tt>, where VERSION is either
615 @ the UUID of a version of that page or the word 'tip' to get the most recent
616 @ version.</p>
617 @ <hr />
618 @ <p><input type="submit" name="submit" value="Apply Changes"></p>
619 @ </form>
620 db_end_transaction(0);
621 style_footer();
622 }
623
--- src/setup.c
+++ src/setup.c
@@ -601,22 +601,10 @@
601 textarea_attribute("Project Description", 5, 60,
602 "project-description", "pd", "");
603 @ <p>Describe your project. This will be used in page headers for search
604 @ engines as well as a short RSS description.</p>
605 @ <hr />
 
 
 
 
 
 
 
 
 
 
 
 
606 @ <p><input type="submit" name="submit" value="Apply Changes"></p>
607 @ </form>
608 db_end_transaction(0);
609 style_footer();
610 }
611
+10 -30
--- src/wiki.c
+++ src/wiki.c
@@ -77,42 +77,22 @@
7777
** WEBPAGE: home
7878
** WEBPAGE: index
7979
** WEBPAGE: not_found
8080
*/
8181
void home_page(void){
82
- char *zHomePage; /* name of home page */
83
- char *zProjName; /* name of project */
84
- zProjName = db_get("project-name",0);
85
- zHomePage = db_get("project-home", zProjName );
86
- if( zProjName && zProjName[0] ){
87
- /* beware: this code causes cyclic redirects on a 404 because
88
- not_found is directed here.
89
- */
90
- int lenP; /* strncmp() bounder */
91
- int lenH; /* length of zProjName */
92
- if( zHomePage && ! zHomePage[0] ){
93
- zHomePage = zProjName;
94
- }
95
- lenP = strlen(zProjName);
96
- lenH = strlen(zHomePage);
97
- if( lenP < lenH ) lenP = lenH;
98
- if( (zProjName == zHomePage) || (0==strncmp(zProjName,zHomePage,lenP)) ||
99
- (0==strncmp(zHomePage,"home",lenP)/*avoid endless loop*/) ){
100
- login_check_credentials();
101
- g.zExtra = zHomePage;
102
- cgi_set_parameter_nocopy("name", g.zExtra);
103
- g.okRdWiki = 1;
104
- g.okApndWiki = 0;
105
- g.okWrWiki = 0;
106
- g.okHistory = 0;
107
- wiki_page();
108
- }else{
109
- cgi_redirect( zHomePage );
110
- }
82
+ char *zPageName = db_get("project-name",0);
83
+ if( zPageName ){
84
+ login_check_credentials();
85
+ g.zExtra = zPageName;
86
+ cgi_set_parameter_nocopy("name", g.zExtra);
87
+ g.okRdWiki = 1;
88
+ g.okApndWiki = 0;
89
+ g.okWrWiki = 0;
90
+ g.okHistory = 0;
91
+ wiki_page();
11192
return;
11293
}
113
-
11494
style_header("Home");
11595
@ <p>This is a stub home-page for the project.
11696
@ To fill in this page, first go to
11797
@ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
11898
@ and establish a "Project Name". Then create a
11999
--- src/wiki.c
+++ src/wiki.c
@@ -77,42 +77,22 @@
77 ** WEBPAGE: home
78 ** WEBPAGE: index
79 ** WEBPAGE: not_found
80 */
81 void home_page(void){
82 char *zHomePage; /* name of home page */
83 char *zProjName; /* name of project */
84 zProjName = db_get("project-name",0);
85 zHomePage = db_get("project-home", zProjName );
86 if( zProjName && zProjName[0] ){
87 /* beware: this code causes cyclic redirects on a 404 because
88 not_found is directed here.
89 */
90 int lenP; /* strncmp() bounder */
91 int lenH; /* length of zProjName */
92 if( zHomePage && ! zHomePage[0] ){
93 zHomePage = zProjName;
94 }
95 lenP = strlen(zProjName);
96 lenH = strlen(zHomePage);
97 if( lenP < lenH ) lenP = lenH;
98 if( (zProjName == zHomePage) || (0==strncmp(zProjName,zHomePage,lenP)) ||
99 (0==strncmp(zHomePage,"home",lenP)/*avoid endless loop*/) ){
100 login_check_credentials();
101 g.zExtra = zHomePage;
102 cgi_set_parameter_nocopy("name", g.zExtra);
103 g.okRdWiki = 1;
104 g.okApndWiki = 0;
105 g.okWrWiki = 0;
106 g.okHistory = 0;
107 wiki_page();
108 }else{
109 cgi_redirect( zHomePage );
110 }
111 return;
112 }
113
114 style_header("Home");
115 @ <p>This is a stub home-page for the project.
116 @ To fill in this page, first go to
117 @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
118 @ and establish a "Project Name". Then create a
119
--- src/wiki.c
+++ src/wiki.c
@@ -77,42 +77,22 @@
77 ** WEBPAGE: home
78 ** WEBPAGE: index
79 ** WEBPAGE: not_found
80 */
81 void home_page(void){
82 char *zPageName = db_get("project-name",0);
83 if( zPageName ){
84 login_check_credentials();
85 g.zExtra = zPageName;
86 cgi_set_parameter_nocopy("name", g.zExtra);
87 g.okRdWiki = 1;
88 g.okApndWiki = 0;
89 g.okWrWiki = 0;
90 g.okHistory = 0;
91 wiki_page();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92 return;
93 }
 
94 style_header("Home");
95 @ <p>This is a stub home-page for the project.
96 @ To fill in this page, first go to
97 @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
98 @ and establish a "Project Name". Then create a
99

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button