Differences From:
File
src/db.c
part of check-in
[387cbeda3f]
- Honor the http_proxy environment variable as another source for the
URL of the HTTP proxy if the "proxy" setting is undefined or is "off".
by
drh on
2008-05-05 17:30:12.
[view]
To:
File
src/db.c
part of check-in
[d57de28756]
- The "h" capability is now used to enable hyperlinks to non-wiki pages.
When "h" is missing, many pages give a hyperlink to the login page and
automatically fill in "anonymous" as the user name. The login page
jumps back to the target page after a successful login.
by
drh on
2008-05-05 23:15:29.
[view]
@@ -1152,13 +1152,15 @@
const char *zUuid; /* The UUID to render */
char *z; /* Rendered HTML text */
zUuid = (const char*)sqlite3_value_text(argv[0]);
- if( zUuid && strlen(zUuid)>=10 ){
+ if( g.okHistory && zUuid && strlen(zUuid)>=10 ){
z = mprintf("<tt><a href='%s/vinfo/%t'><span style='font-size:1.5em'>"
"%#h</span>%h</a></tt>",
g.zBaseURL, zUuid, 10, zUuid, &zUuid[10]);
sqlite3_result_text(pCxt, z, -1, free);
+ }else{
+ sqlite3_result_text(pCxt, zUuid, -1, SQLITE_TRANSIENT);
}
}
/*
@@ -1173,10 +1175,14 @@
int tagid; /* The tagid to render */
char *z; /* rendered html text */
tagid = sqlite3_value_int(argv[0]);
- z = mprintf("<a href='%s/tagview?tagid=%d'>%d</a>",
- g.zBaseURL, tagid, tagid);
+ if( g.okHistory ){
+ z = mprintf("<a href='%s/tagview?tagid=%d'>%d</a>",
+ g.zBaseURL, tagid, tagid);
+ }else{
+ z = mprintf("%d", tagid);
+ }
sqlite3_result_text(pCxt, z, -1, free);
}
/*
@@ -1191,10 +1197,14 @@
const char *zTag; /* The tag to render */
char *z; /* rendered html text */
zTag = (const char*)sqlite3_value_text(argv[0]);
- z = mprintf("<a href='%s/tagview?name=%T'>%h</a>",
- g.zBaseURL, zTag, zTag);
+ if( g.okHistory ){
+ z = mprintf("<a href='%s/tagview?name=%T'>%h</a>",
+ g.zBaseURL, zTag, zTag);
+ }else{
+ z = mprintf("%h", zTag);
+ }
sqlite3_result_text(pCxt, z, -1, free);
}
/*