Fossil SCM
Rename AntiSpider to NoBot, for brevity's sake.
Commit
fa27979805f9de24e2a67703257581ced14469f48d3fb8eb59c8c8db646a1696
Parent
91d13592a75a222…
2 files changed
+2
-2
+5
-5
+2
-2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -101,12 +101,12 @@ | ||
| 101 | 101 | #define PT(x) cgi_parameter_trimmed((x),0) |
| 102 | 102 | #define PDT(x,y) cgi_parameter_trimmed((x),(y)) |
| 103 | 103 | #define PB(x) cgi_parameter_boolean(x) |
| 104 | 104 | #define PCK(x) cgi_parameter_checked(x,1) |
| 105 | 105 | #define PIF(x,y) cgi_parameter_checked(x,y) |
| 106 | -#define P_AntiSpider(x) cgi_parameter_nosql((x),0) | |
| 107 | -#define PD_AntiSpider(x,y) cgi_parameter_nosql((x),(y)) | |
| 106 | +#define P_NoBot(x) cgi_parameter_nosql((x),0) | |
| 107 | +#define PD_NoBot(x,y) cgi_parameter_nosql((x),(y)) | |
| 108 | 108 | |
| 109 | 109 | /* |
| 110 | 110 | ** Shortcut for the cgi_printf() routine. Instead of using the |
| 111 | 111 | ** |
| 112 | 112 | ** @ ... |
| 113 | 113 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -101,12 +101,12 @@ | |
| 101 | #define PT(x) cgi_parameter_trimmed((x),0) |
| 102 | #define PDT(x,y) cgi_parameter_trimmed((x),(y)) |
| 103 | #define PB(x) cgi_parameter_boolean(x) |
| 104 | #define PCK(x) cgi_parameter_checked(x,1) |
| 105 | #define PIF(x,y) cgi_parameter_checked(x,y) |
| 106 | #define P_AntiSpider(x) cgi_parameter_nosql((x),0) |
| 107 | #define PD_AntiSpider(x,y) cgi_parameter_nosql((x),(y)) |
| 108 | |
| 109 | /* |
| 110 | ** Shortcut for the cgi_printf() routine. Instead of using the |
| 111 | ** |
| 112 | ** @ ... |
| 113 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -101,12 +101,12 @@ | |
| 101 | #define PT(x) cgi_parameter_trimmed((x),0) |
| 102 | #define PDT(x,y) cgi_parameter_trimmed((x),(y)) |
| 103 | #define PB(x) cgi_parameter_boolean(x) |
| 104 | #define PCK(x) cgi_parameter_checked(x,1) |
| 105 | #define PIF(x,y) cgi_parameter_checked(x,y) |
| 106 | #define P_NoBot(x) cgi_parameter_nosql((x),0) |
| 107 | #define PD_NoBot(x,y) cgi_parameter_nosql((x),(y)) |
| 108 | |
| 109 | /* |
| 110 | ** Shortcut for the cgi_printf() routine. Instead of using the |
| 111 | ** |
| 112 | ** @ ... |
| 113 |
+5
-5
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -453,12 +453,12 @@ | ||
| 453 | 453 | DiffConfig *construct_diff_flags(int diffType, DiffConfig *pCfg){ |
| 454 | 454 | u64 diffFlags = 0; /* Zero means do not show any diff */ |
| 455 | 455 | if( diffType>0 ){ |
| 456 | 456 | int x; |
| 457 | 457 | if( diffType==2 ) diffFlags = DIFF_SIDEBYSIDE; |
| 458 | - if( P_AntiSpider("w") ) diffFlags |= DIFF_IGNORE_ALLWS; | |
| 459 | - if( PD_AntiSpider("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT; | |
| 458 | + if( P_NoBot("w") ) diffFlags |= DIFF_IGNORE_ALLWS; | |
| 459 | + if( PD_NoBot("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT; | |
| 460 | 460 | diffFlags |= DIFF_STRIP_EOLCR; |
| 461 | 461 | diff_config_init(pCfg, diffFlags); |
| 462 | 462 | |
| 463 | 463 | /* "dc" query parameter determines lines of context */ |
| 464 | 464 | x = atoi(PD("dc","7")); |
| @@ -1211,12 +1211,12 @@ | ||
| 1211 | 1211 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 1212 | 1212 | if( pTo==0 ) return; |
| 1213 | 1213 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 1214 | 1214 | if( pFrom==0 ) return; |
| 1215 | 1215 | zGlob = P("glob"); |
| 1216 | - zFrom = P_AntiSpider("from"); | |
| 1217 | - zTo = P_AntiSpider("to"); | |
| 1216 | + zFrom = P_NoBot("from"); | |
| 1217 | + zTo = P_NoBot("to"); | |
| 1218 | 1218 | if( bInvert ){ |
| 1219 | 1219 | Manifest *pTemp = pTo; |
| 1220 | 1220 | const char *zTemp = zTo; |
| 1221 | 1221 | pTo = pFrom; |
| 1222 | 1222 | pFrom = pTemp; |
| @@ -1686,11 +1686,11 @@ | ||
| 1686 | 1686 | dflt = db_get_int("preferred-diff-type",-99); |
| 1687 | 1687 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1688 | 1688 | zDflt[0] = dflt + '0'; |
| 1689 | 1689 | zDflt[1] = 0; |
| 1690 | 1690 | cookie_link_parameter("diff","diff", zDflt); |
| 1691 | - return atoi(PD_AntiSpider("diff",zDflt)); | |
| 1691 | + return atoi(PD_NoBot("diff",zDflt)); | |
| 1692 | 1692 | } |
| 1693 | 1693 | |
| 1694 | 1694 | |
| 1695 | 1695 | /* |
| 1696 | 1696 | ** WEBPAGE: fdiff |
| 1697 | 1697 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -453,12 +453,12 @@ | |
| 453 | DiffConfig *construct_diff_flags(int diffType, DiffConfig *pCfg){ |
| 454 | u64 diffFlags = 0; /* Zero means do not show any diff */ |
| 455 | if( diffType>0 ){ |
| 456 | int x; |
| 457 | if( diffType==2 ) diffFlags = DIFF_SIDEBYSIDE; |
| 458 | if( P_AntiSpider("w") ) diffFlags |= DIFF_IGNORE_ALLWS; |
| 459 | if( PD_AntiSpider("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT; |
| 460 | diffFlags |= DIFF_STRIP_EOLCR; |
| 461 | diff_config_init(pCfg, diffFlags); |
| 462 | |
| 463 | /* "dc" query parameter determines lines of context */ |
| 464 | x = atoi(PD("dc","7")); |
| @@ -1211,12 +1211,12 @@ | |
| 1211 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 1212 | if( pTo==0 ) return; |
| 1213 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 1214 | if( pFrom==0 ) return; |
| 1215 | zGlob = P("glob"); |
| 1216 | zFrom = P_AntiSpider("from"); |
| 1217 | zTo = P_AntiSpider("to"); |
| 1218 | if( bInvert ){ |
| 1219 | Manifest *pTemp = pTo; |
| 1220 | const char *zTemp = zTo; |
| 1221 | pTo = pFrom; |
| 1222 | pFrom = pTemp; |
| @@ -1686,11 +1686,11 @@ | |
| 1686 | dflt = db_get_int("preferred-diff-type",-99); |
| 1687 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1688 | zDflt[0] = dflt + '0'; |
| 1689 | zDflt[1] = 0; |
| 1690 | cookie_link_parameter("diff","diff", zDflt); |
| 1691 | return atoi(PD_AntiSpider("diff",zDflt)); |
| 1692 | } |
| 1693 | |
| 1694 | |
| 1695 | /* |
| 1696 | ** WEBPAGE: fdiff |
| 1697 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -453,12 +453,12 @@ | |
| 453 | DiffConfig *construct_diff_flags(int diffType, DiffConfig *pCfg){ |
| 454 | u64 diffFlags = 0; /* Zero means do not show any diff */ |
| 455 | if( diffType>0 ){ |
| 456 | int x; |
| 457 | if( diffType==2 ) diffFlags = DIFF_SIDEBYSIDE; |
| 458 | if( P_NoBot("w") ) diffFlags |= DIFF_IGNORE_ALLWS; |
| 459 | if( PD_NoBot("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT; |
| 460 | diffFlags |= DIFF_STRIP_EOLCR; |
| 461 | diff_config_init(pCfg, diffFlags); |
| 462 | |
| 463 | /* "dc" query parameter determines lines of context */ |
| 464 | x = atoi(PD("dc","7")); |
| @@ -1211,12 +1211,12 @@ | |
| 1211 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 1212 | if( pTo==0 ) return; |
| 1213 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 1214 | if( pFrom==0 ) return; |
| 1215 | zGlob = P("glob"); |
| 1216 | zFrom = P_NoBot("from"); |
| 1217 | zTo = P_NoBot("to"); |
| 1218 | if( bInvert ){ |
| 1219 | Manifest *pTemp = pTo; |
| 1220 | const char *zTemp = zTo; |
| 1221 | pTo = pFrom; |
| 1222 | pFrom = pTemp; |
| @@ -1686,11 +1686,11 @@ | |
| 1686 | dflt = db_get_int("preferred-diff-type",-99); |
| 1687 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1688 | zDflt[0] = dflt + '0'; |
| 1689 | zDflt[1] = 0; |
| 1690 | cookie_link_parameter("diff","diff", zDflt); |
| 1691 | return atoi(PD_NoBot("diff",zDflt)); |
| 1692 | } |
| 1693 | |
| 1694 | |
| 1695 | /* |
| 1696 | ** WEBPAGE: fdiff |
| 1697 |