Fossil SCM

Change the name of the auto-enable-hyperlinks setting to auto-hyperlink and make it available via the "fossil setting" command. <b>Note:</b> when upgrading through this change, if you formerly had auto-hyperlink turned off, you will have to turn it off again since the name has changed. It defaults to on.

drh 2012-04-28 18:55 trunk
Commit cb5db7598fdf93b37c3c35661c71908b586e6993
3 files changed +6 +1 -1 +1 -1
+6
--- src/db.c
+++ src/db.c
@@ -1869,10 +1869,11 @@
18691869
#endif /* INTERFACE */
18701870
struct stControlSettings const ctrlSettings[] = {
18711871
{ "access-log", 0, 0, 0, "off" },
18721872
{ "allow-symlinks",0, 0, 1, "off" },
18731873
{ "auto-captcha", "autocaptcha", 0, 0, "on" },
1874
+ { "auto-hyperlink",0, 0, 0, "on", },
18741875
{ "auto-shun", 0, 0, 0, "on" },
18751876
{ "autosync", 0, 0, 0, "on" },
18761877
{ "binary-glob", 0, 32, 1, "" },
18771878
{ "clearsign", 0, 0, 0, "off" },
18781879
{ "case-sensitive",0, 0, 0, "on" },
@@ -1933,10 +1934,15 @@
19331934
** Default: off
19341935
**
19351936
** auto-captcha If enabled, the Login page provides a button to
19361937
** fill in the captcha password. Default: on
19371938
**
1939
+** auto-hyperlink Use javascript to enable hyperlinks on web pages
1940
+** for all users (regardless of the "h" privilege) if the
1941
+** User-Agent string in the HTTP header look like it came
1942
+** from real person, not a spider or bot. Default: on
1943
+**
19381944
** auto-shun If enabled, automatically pull the shunning list
19391945
** from a server to which the client autosyncs.
19401946
** Default: on
19411947
**
19421948
** autosync If enabled, automatically pull prior to commit
19431949
--- src/db.c
+++ src/db.c
@@ -1869,10 +1869,11 @@
1869 #endif /* INTERFACE */
1870 struct stControlSettings const ctrlSettings[] = {
1871 { "access-log", 0, 0, 0, "off" },
1872 { "allow-symlinks",0, 0, 1, "off" },
1873 { "auto-captcha", "autocaptcha", 0, 0, "on" },
 
1874 { "auto-shun", 0, 0, 0, "on" },
1875 { "autosync", 0, 0, 0, "on" },
1876 { "binary-glob", 0, 32, 1, "" },
1877 { "clearsign", 0, 0, 0, "off" },
1878 { "case-sensitive",0, 0, 0, "on" },
@@ -1933,10 +1934,15 @@
1933 ** Default: off
1934 **
1935 ** auto-captcha If enabled, the Login page provides a button to
1936 ** fill in the captcha password. Default: on
1937 **
 
 
 
 
 
1938 ** auto-shun If enabled, automatically pull the shunning list
1939 ** from a server to which the client autosyncs.
1940 ** Default: on
1941 **
1942 ** autosync If enabled, automatically pull prior to commit
1943
--- src/db.c
+++ src/db.c
@@ -1869,10 +1869,11 @@
1869 #endif /* INTERFACE */
1870 struct stControlSettings const ctrlSettings[] = {
1871 { "access-log", 0, 0, 0, "off" },
1872 { "allow-symlinks",0, 0, 1, "off" },
1873 { "auto-captcha", "autocaptcha", 0, 0, "on" },
1874 { "auto-hyperlink",0, 0, 0, "on", },
1875 { "auto-shun", 0, 0, 0, "on" },
1876 { "autosync", 0, 0, 0, "on" },
1877 { "binary-glob", 0, 32, 1, "" },
1878 { "clearsign", 0, 0, 0, "off" },
1879 { "case-sensitive",0, 0, 0, "on" },
@@ -1933,10 +1934,15 @@
1934 ** Default: off
1935 **
1936 ** auto-captcha If enabled, the Login page provides a button to
1937 ** fill in the captcha password. Default: on
1938 **
1939 ** auto-hyperlink Use javascript to enable hyperlinks on web pages
1940 ** for all users (regardless of the "h" privilege) if the
1941 ** User-Agent string in the HTTP header look like it came
1942 ** from real person, not a spider or bot. Default: on
1943 **
1944 ** auto-shun If enabled, automatically pull the shunning list
1945 ** from a server to which the client autosyncs.
1946 ** Default: on
1947 **
1948 ** autosync If enabled, automatically pull prior to commit
1949
+1 -1
--- src/login.c
+++ src/login.c
@@ -912,11 +912,11 @@
912912
913913
/* Set the capabilities */
914914
login_replace_capabilities(zCap, 0);
915915
login_set_anon_nobody_capabilities();
916916
if( zCap[0] && !g.perm.Hyperlink
917
- && db_get_boolean("auto-enable-hyperlinks",1)
917
+ && db_get_boolean("auto-hyperlink",1)
918918
&& isHuman(P("HTTP_USER_AGENT")) ){
919919
g.perm.Hyperlink = 1;
920920
g.javascriptHyperlink = 1;
921921
}
922922
923923
--- src/login.c
+++ src/login.c
@@ -912,11 +912,11 @@
912
913 /* Set the capabilities */
914 login_replace_capabilities(zCap, 0);
915 login_set_anon_nobody_capabilities();
916 if( zCap[0] && !g.perm.Hyperlink
917 && db_get_boolean("auto-enable-hyperlinks",1)
918 && isHuman(P("HTTP_USER_AGENT")) ){
919 g.perm.Hyperlink = 1;
920 g.javascriptHyperlink = 1;
921 }
922
923
--- src/login.c
+++ src/login.c
@@ -912,11 +912,11 @@
912
913 /* Set the capabilities */
914 login_replace_capabilities(zCap, 0);
915 login_set_anon_nobody_capabilities();
916 if( zCap[0] && !g.perm.Hyperlink
917 && db_get_boolean("auto-hyperlink",1)
918 && isHuman(P("HTTP_USER_AGENT")) ){
919 g.perm.Hyperlink = 1;
920 g.javascriptHyperlink = 1;
921 }
922
923
+1 -1
--- src/setup.c
+++ src/setup.c
@@ -925,11 +925,11 @@
925925
@ reasonable number.</p>
926926
927927
@ <hr />
928928
onoff_attribute(
929929
"Enable hyperlinks for \"nobody\" based on User-Agent and Javascript",
930
- "auto-enable-hyperlinks", "autohyperlink", 1);
930
+ "auto-hyperlink", "autohyperlink", 1);
931931
@ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users
932932
@ including user "nobody", as long as (1) the User-Agent string in the
933933
@ HTTP header indicates that the request is coming from an actual human
934934
@ being and not a a robot or spider and (2) the user agent is able to
935935
@ run Javascript in order to set the href= attribute of hyperlinks. Bots
936936
--- src/setup.c
+++ src/setup.c
@@ -925,11 +925,11 @@
925 @ reasonable number.</p>
926
927 @ <hr />
928 onoff_attribute(
929 "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript",
930 "auto-enable-hyperlinks", "autohyperlink", 1);
931 @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users
932 @ including user "nobody", as long as (1) the User-Agent string in the
933 @ HTTP header indicates that the request is coming from an actual human
934 @ being and not a a robot or spider and (2) the user agent is able to
935 @ run Javascript in order to set the href= attribute of hyperlinks. Bots
936
--- src/setup.c
+++ src/setup.c
@@ -925,11 +925,11 @@
925 @ reasonable number.</p>
926
927 @ <hr />
928 onoff_attribute(
929 "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript",
930 "auto-hyperlink", "autohyperlink", 1);
931 @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users
932 @ including user "nobody", as long as (1) the User-Agent string in the
933 @ HTTP header indicates that the request is coming from an actual human
934 @ being and not a a robot or spider and (2) the user agent is able to
935 @ run Javascript in order to set the href= attribute of hyperlinks. Bots
936

Keyboard Shortcuts

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