Differences From:
File
src/browse.c
part of check-in
[e487b77b1a]
- Add file and directory browsing capabilities to the web interface.
by
drh on
2008-02-04 02:45:55.
[view]
To:
File
src/browse.c
part of check-in
[e81cc91aa4]
- Additional cleanup in the differencing engine. The new "dir" webpage
now uses name= instead of the d= for the query parameter.
by
drh on
2008-02-04 14:24:28.
[view]
@@ -72,12 +72,12 @@
** WEBPAGE: dir
**
** Query parameters:
**
-** d=PATH Directory to display. Required.
+** name=PATH Directory to display. Required.
*/
void page_dir(void){
- const char *zD = P("d");
+ const char *zD = P("name");
int mxLen;
int nCol, nRow;
int cnt, i;
char *zPrefix;
@@ -88,9 +88,9 @@
style_header("File List");
sqlite3_create_function(g.db, "pathelement", 2, SQLITE_UTF8, 0,
pathelementFunc, 0, 0);
- /* If the d= parameter is an empty string, make it a NULL pointer */
+ /* If the name= parameter is an empty string, make it a NULL pointer */
if( zD && strlen(zD)==0 ){ zD = 0; }
/* Compute the title of the page */
if( zD ){
@@ -107,9 +107,9 @@
for(i=0; zD[i]; i=j){
for(j=i; zD[j] && zD[j]!='/'; j++){}
if( zD[j] ){
zCopy[j] = 0;
- blob_appendf(&title, "/<a href=\"%s/dir?d=%T\">%h</a>",
+ blob_appendf(&title, "/<a href=\"%s/dir?name=%T\">%h</a>",
g.zBaseURL, zCopy, &zCopy[i]);
zCopy[j] = '/';
}else{
blob_appendf(&title, "/%h", &zCopy[i]);
@@ -166,9 +166,9 @@
i++;
zFName = db_column_text(&q, 0);
if( zFName[0]=='/' ){
zFName++;
- @ <li><a href="%s(g.zBaseURL)/dir?d=%T(zPrefix)%T(zFName)">
+ @ <li><a href="%s(g.zBaseURL)/dir?name=%T(zPrefix)%T(zFName)">
@ %h(zFName)/</a></li>
}else{
@ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFName)">
@ %h(zFName)</a></li>