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.
Commit
cb5db7598fdf93b37c3c35661c71908b586e6993
Parent
0ea8ed34a1b8e60…
3 files changed
+6
+1
-1
+1
-1
M
src/db.c
+6
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1869,10 +1869,11 @@ | ||
| 1869 | 1869 | #endif /* INTERFACE */ |
| 1870 | 1870 | struct stControlSettings const ctrlSettings[] = { |
| 1871 | 1871 | { "access-log", 0, 0, 0, "off" }, |
| 1872 | 1872 | { "allow-symlinks",0, 0, 1, "off" }, |
| 1873 | 1873 | { "auto-captcha", "autocaptcha", 0, 0, "on" }, |
| 1874 | + { "auto-hyperlink",0, 0, 0, "on", }, | |
| 1874 | 1875 | { "auto-shun", 0, 0, 0, "on" }, |
| 1875 | 1876 | { "autosync", 0, 0, 0, "on" }, |
| 1876 | 1877 | { "binary-glob", 0, 32, 1, "" }, |
| 1877 | 1878 | { "clearsign", 0, 0, 0, "off" }, |
| 1878 | 1879 | { "case-sensitive",0, 0, 0, "on" }, |
| @@ -1933,10 +1934,15 @@ | ||
| 1933 | 1934 | ** Default: off |
| 1934 | 1935 | ** |
| 1935 | 1936 | ** auto-captcha If enabled, the Login page provides a button to |
| 1936 | 1937 | ** fill in the captcha password. Default: on |
| 1937 | 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 | +** | |
| 1938 | 1944 | ** auto-shun If enabled, automatically pull the shunning list |
| 1939 | 1945 | ** from a server to which the client autosyncs. |
| 1940 | 1946 | ** Default: on |
| 1941 | 1947 | ** |
| 1942 | 1948 | ** autosync If enabled, automatically pull prior to commit |
| 1943 | 1949 |
| --- 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 @@ | ||
| 912 | 912 | |
| 913 | 913 | /* Set the capabilities */ |
| 914 | 914 | login_replace_capabilities(zCap, 0); |
| 915 | 915 | login_set_anon_nobody_capabilities(); |
| 916 | 916 | if( zCap[0] && !g.perm.Hyperlink |
| 917 | - && db_get_boolean("auto-enable-hyperlinks",1) | |
| 917 | + && db_get_boolean("auto-hyperlink",1) | |
| 918 | 918 | && isHuman(P("HTTP_USER_AGENT")) ){ |
| 919 | 919 | g.perm.Hyperlink = 1; |
| 920 | 920 | g.javascriptHyperlink = 1; |
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 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-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 @@ | ||
| 925 | 925 | @ reasonable number.</p> |
| 926 | 926 | |
| 927 | 927 | @ <hr /> |
| 928 | 928 | onoff_attribute( |
| 929 | 929 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 930 | - "auto-enable-hyperlinks", "autohyperlink", 1); | |
| 930 | + "auto-hyperlink", "autohyperlink", 1); | |
| 931 | 931 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| 932 | 932 | @ including user "nobody", as long as (1) the User-Agent string in the |
| 933 | 933 | @ HTTP header indicates that the request is coming from an actual human |
| 934 | 934 | @ being and not a a robot or spider and (2) the user agent is able to |
| 935 | 935 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 936 | 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-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 |