Fossil SCM
Do not change the /info diff-type to 0 if robot-restrict is turned off. [forum:/forumpost/1bef6821de|Forum post 1bef6821de].
Commit
879deeda66191d9d4a81a5ea791bacd0f87972362d305f18632e8ebd771aad71
Parent
cb4d17078f83b8f…
1 file changed
+1
-1
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1948,11 +1948,11 @@ | ||
| 1948 | 1948 | int dflt; |
| 1949 | 1949 | int res; |
| 1950 | 1950 | int isBot; |
| 1951 | 1951 | static char zDflt[2] |
| 1952 | 1952 | /*static b/c cookie_link_parameter() does not copy it!*/; |
| 1953 | - if( client_might_be_a_robot() ){ | |
| 1953 | + if( client_might_be_a_robot() && robot_restrict_has_tag("diff") ){ | |
| 1954 | 1954 | dflt = 0; |
| 1955 | 1955 | isBot = 1; |
| 1956 | 1956 | }else{ |
| 1957 | 1957 | dflt = db_get_int("preferred-diff-type",-99); |
| 1958 | 1958 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1959 | 1959 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1948,11 +1948,11 @@ | |
| 1948 | int dflt; |
| 1949 | int res; |
| 1950 | int isBot; |
| 1951 | static char zDflt[2] |
| 1952 | /*static b/c cookie_link_parameter() does not copy it!*/; |
| 1953 | if( client_might_be_a_robot() ){ |
| 1954 | dflt = 0; |
| 1955 | isBot = 1; |
| 1956 | }else{ |
| 1957 | dflt = db_get_int("preferred-diff-type",-99); |
| 1958 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1959 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1948,11 +1948,11 @@ | |
| 1948 | int dflt; |
| 1949 | int res; |
| 1950 | int isBot; |
| 1951 | static char zDflt[2] |
| 1952 | /*static b/c cookie_link_parameter() does not copy it!*/; |
| 1953 | if( client_might_be_a_robot() && robot_restrict_has_tag("diff") ){ |
| 1954 | dflt = 0; |
| 1955 | isBot = 1; |
| 1956 | }else{ |
| 1957 | dflt = db_get_int("preferred-diff-type",-99); |
| 1958 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1959 |