Fossil SCM

Do not change the /info diff-type to 0 if robot-restrict is turned off. [forum:/forumpost/1bef6821de|Forum post 1bef6821de].

drh 2025-08-21 16:21 trunk
Commit 879deeda66191d9d4a81a5ea791bacd0f87972362d305f18632e8ebd771aad71
1 file changed +1 -1
+1 -1
--- src/info.c
+++ src/info.c
@@ -1948,11 +1948,11 @@
19481948
int dflt;
19491949
int res;
19501950
int isBot;
19511951
static char zDflt[2]
19521952
/*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") ){
19541954
dflt = 0;
19551955
isBot = 1;
19561956
}else{
19571957
dflt = db_get_int("preferred-diff-type",-99);
19581958
if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2;
19591959
--- 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

Keyboard Shortcuts

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