Differences From:
File
src/wiki.c
part of check-in
[c963a7763d]
- Much improved wiki rendering. Automatic paragraph tags now match
correctly. All tags should balance.
by
drh on
2007-10-13 01:18:52.
[view]
To:
File
src/wiki.c
part of check-in
[f40230a7e8]
- The "wiki" URI without a page name argument now gives you a list of
existing wiki pages. This works fine as long as there are a reasonable
number (no more than a few hundred) wiki pages. We need to think of
something better for large wikis. We also need to think of ways to give
users better guidance for creating new wiki pages.
by
drh on
2007-10-28 21:26:07.
[view]
@@ -113,9 +113,13 @@
char *zBody = mprintf("%s","<i>Empty Page</i>");
login_check_credentials();
if( !g.okRdWiki ){ login_needed(); return; }
- zPageName = PD("name","");
+ zPageName = P("name");
+ if( zPageName==0 ){
+ wcontent_page();
+ return;
+ }
if( check_name(zPageName) ) return;
zTag = mprintf("wiki-%s", zPageName);
rid = db_int(0,
"SELECT rid FROM tagxref"
@@ -155,9 +159,9 @@
}
/*
** WEBPAGE: wikiedit
-** URL: /wikiedit?page=PAGENAME
+** URL: /wikiedit?name=PAGENAME
*/
void wikiedit_page(void){
char *zTag;
int rid;
@@ -431,9 +435,10 @@
" ORDER BY lower(tagname)"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
- @ <li><a href="%s(g.zBaseURL)/wiki?page=%T(zName)">%h(zName)</a></li>
+ @ <li><a href="%s(g.zBaseURL)/wiki?name=%T(zName)">%h(zName)</a></li>
}
db_finalize(&q);
+ @ </ul>
style_footer();
}