Fossil SCM
When checking the 'th1-hooks' setting value, refer to the repository settings as well.
Commit
3fb8e171b354d30819769f874e30c220655a5ec0
Parent
79533e2b31ec5bd…
1 file changed
+8
-8
+8
-8
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -1260,15 +1260,15 @@ | ||
| 1260 | 1260 | int Th_CommandHook( |
| 1261 | 1261 | const char *zName, |
| 1262 | 1262 | char cmdFlags |
| 1263 | 1263 | ){ |
| 1264 | 1264 | int rc = TH_OK; |
| 1265 | - Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ | |
| 1265 | + Th_OpenConfig(1); | |
| 1266 | 1266 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1267 | 1267 | return rc; |
| 1268 | 1268 | } |
| 1269 | - Th_CloseConfig(0); | |
| 1269 | + Th_CloseConfig(1); | |
| 1270 | 1270 | Th_FossilInit(TH_INIT_HOOK); |
| 1271 | 1271 | Th_Store("cmd_name", zName); |
| 1272 | 1272 | Th_StoreList("cmd_args", g.argv, g.argc); |
| 1273 | 1273 | Th_StoreInt("cmd_flags", cmdFlags); |
| 1274 | 1274 | rc = Th_Eval(g.interp, 0, "command_hook", -1); |
| @@ -1307,15 +1307,15 @@ | ||
| 1307 | 1307 | int Th_CommandNotify( |
| 1308 | 1308 | const char *zName, |
| 1309 | 1309 | char cmdFlags |
| 1310 | 1310 | ){ |
| 1311 | 1311 | int rc = TH_OK; |
| 1312 | - Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ | |
| 1312 | + Th_OpenConfig(1); | |
| 1313 | 1313 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1314 | 1314 | return rc; |
| 1315 | 1315 | } |
| 1316 | - Th_CloseConfig(0); | |
| 1316 | + Th_CloseConfig(1); | |
| 1317 | 1317 | Th_FossilInit(TH_INIT_HOOK); |
| 1318 | 1318 | Th_Store("cmd_name", zName); |
| 1319 | 1319 | Th_StoreList("cmd_args", g.argv, g.argc); |
| 1320 | 1320 | Th_StoreInt("cmd_flags", cmdFlags); |
| 1321 | 1321 | rc = Th_Eval(g.interp, 0, "command_notify", -1); |
| @@ -1335,15 +1335,15 @@ | ||
| 1335 | 1335 | int Th_WebpageHook( |
| 1336 | 1336 | const char *zName, |
| 1337 | 1337 | char cmdFlags |
| 1338 | 1338 | ){ |
| 1339 | 1339 | int rc = TH_OK; |
| 1340 | - Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ | |
| 1340 | + Th_OpenConfig(1); | |
| 1341 | 1341 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1342 | 1342 | return rc; |
| 1343 | 1343 | } |
| 1344 | - Th_CloseConfig(0); | |
| 1344 | + Th_CloseConfig(1); | |
| 1345 | 1345 | Th_FossilInit(TH_INIT_HOOK); |
| 1346 | 1346 | Th_Store("web_name", zName); |
| 1347 | 1347 | Th_StoreList("web_args", g.argv, g.argc); |
| 1348 | 1348 | Th_StoreInt("web_flags", cmdFlags); |
| 1349 | 1349 | rc = Th_Eval(g.interp, 0, "webpage_hook", -1); |
| @@ -1382,15 +1382,15 @@ | ||
| 1382 | 1382 | int Th_WebpageNotify( |
| 1383 | 1383 | const char *zName, |
| 1384 | 1384 | char cmdFlags |
| 1385 | 1385 | ){ |
| 1386 | 1386 | int rc = TH_OK; |
| 1387 | - Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ | |
| 1387 | + Th_OpenConfig(1); | |
| 1388 | 1388 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1389 | 1389 | return rc; |
| 1390 | 1390 | } |
| 1391 | - Th_CloseConfig(0); | |
| 1391 | + Th_CloseConfig(1); | |
| 1392 | 1392 | Th_FossilInit(TH_INIT_HOOK); |
| 1393 | 1393 | Th_Store("web_name", zName); |
| 1394 | 1394 | Th_StoreList("web_args", g.argv, g.argc); |
| 1395 | 1395 | Th_StoreInt("web_flags", cmdFlags); |
| 1396 | 1396 | rc = Th_Eval(g.interp, 0, "webpage_notify", -1); |
| 1397 | 1397 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -1260,15 +1260,15 @@ | |
| 1260 | int Th_CommandHook( |
| 1261 | const char *zName, |
| 1262 | char cmdFlags |
| 1263 | ){ |
| 1264 | int rc = TH_OK; |
| 1265 | Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ |
| 1266 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1267 | return rc; |
| 1268 | } |
| 1269 | Th_CloseConfig(0); |
| 1270 | Th_FossilInit(TH_INIT_HOOK); |
| 1271 | Th_Store("cmd_name", zName); |
| 1272 | Th_StoreList("cmd_args", g.argv, g.argc); |
| 1273 | Th_StoreInt("cmd_flags", cmdFlags); |
| 1274 | rc = Th_Eval(g.interp, 0, "command_hook", -1); |
| @@ -1307,15 +1307,15 @@ | |
| 1307 | int Th_CommandNotify( |
| 1308 | const char *zName, |
| 1309 | char cmdFlags |
| 1310 | ){ |
| 1311 | int rc = TH_OK; |
| 1312 | Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ |
| 1313 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1314 | return rc; |
| 1315 | } |
| 1316 | Th_CloseConfig(0); |
| 1317 | Th_FossilInit(TH_INIT_HOOK); |
| 1318 | Th_Store("cmd_name", zName); |
| 1319 | Th_StoreList("cmd_args", g.argv, g.argc); |
| 1320 | Th_StoreInt("cmd_flags", cmdFlags); |
| 1321 | rc = Th_Eval(g.interp, 0, "command_notify", -1); |
| @@ -1335,15 +1335,15 @@ | |
| 1335 | int Th_WebpageHook( |
| 1336 | const char *zName, |
| 1337 | char cmdFlags |
| 1338 | ){ |
| 1339 | int rc = TH_OK; |
| 1340 | Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ |
| 1341 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1342 | return rc; |
| 1343 | } |
| 1344 | Th_CloseConfig(0); |
| 1345 | Th_FossilInit(TH_INIT_HOOK); |
| 1346 | Th_Store("web_name", zName); |
| 1347 | Th_StoreList("web_args", g.argv, g.argc); |
| 1348 | Th_StoreInt("web_flags", cmdFlags); |
| 1349 | rc = Th_Eval(g.interp, 0, "webpage_hook", -1); |
| @@ -1382,15 +1382,15 @@ | |
| 1382 | int Th_WebpageNotify( |
| 1383 | const char *zName, |
| 1384 | char cmdFlags |
| 1385 | ){ |
| 1386 | int rc = TH_OK; |
| 1387 | Th_OpenConfig(0); /* NOTE: Minimum needed to check "th1-hooks" setting. */ |
| 1388 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1389 | return rc; |
| 1390 | } |
| 1391 | Th_CloseConfig(0); |
| 1392 | Th_FossilInit(TH_INIT_HOOK); |
| 1393 | Th_Store("web_name", zName); |
| 1394 | Th_StoreList("web_args", g.argv, g.argc); |
| 1395 | Th_StoreInt("web_flags", cmdFlags); |
| 1396 | rc = Th_Eval(g.interp, 0, "webpage_notify", -1); |
| 1397 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -1260,15 +1260,15 @@ | |
| 1260 | int Th_CommandHook( |
| 1261 | const char *zName, |
| 1262 | char cmdFlags |
| 1263 | ){ |
| 1264 | int rc = TH_OK; |
| 1265 | Th_OpenConfig(1); |
| 1266 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1267 | return rc; |
| 1268 | } |
| 1269 | Th_CloseConfig(1); |
| 1270 | Th_FossilInit(TH_INIT_HOOK); |
| 1271 | Th_Store("cmd_name", zName); |
| 1272 | Th_StoreList("cmd_args", g.argv, g.argc); |
| 1273 | Th_StoreInt("cmd_flags", cmdFlags); |
| 1274 | rc = Th_Eval(g.interp, 0, "command_hook", -1); |
| @@ -1307,15 +1307,15 @@ | |
| 1307 | int Th_CommandNotify( |
| 1308 | const char *zName, |
| 1309 | char cmdFlags |
| 1310 | ){ |
| 1311 | int rc = TH_OK; |
| 1312 | Th_OpenConfig(1); |
| 1313 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1314 | return rc; |
| 1315 | } |
| 1316 | Th_CloseConfig(1); |
| 1317 | Th_FossilInit(TH_INIT_HOOK); |
| 1318 | Th_Store("cmd_name", zName); |
| 1319 | Th_StoreList("cmd_args", g.argv, g.argc); |
| 1320 | Th_StoreInt("cmd_flags", cmdFlags); |
| 1321 | rc = Th_Eval(g.interp, 0, "command_notify", -1); |
| @@ -1335,15 +1335,15 @@ | |
| 1335 | int Th_WebpageHook( |
| 1336 | const char *zName, |
| 1337 | char cmdFlags |
| 1338 | ){ |
| 1339 | int rc = TH_OK; |
| 1340 | Th_OpenConfig(1); |
| 1341 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1342 | return rc; |
| 1343 | } |
| 1344 | Th_CloseConfig(1); |
| 1345 | Th_FossilInit(TH_INIT_HOOK); |
| 1346 | Th_Store("web_name", zName); |
| 1347 | Th_StoreList("web_args", g.argv, g.argc); |
| 1348 | Th_StoreInt("web_flags", cmdFlags); |
| 1349 | rc = Th_Eval(g.interp, 0, "webpage_hook", -1); |
| @@ -1382,15 +1382,15 @@ | |
| 1382 | int Th_WebpageNotify( |
| 1383 | const char *zName, |
| 1384 | char cmdFlags |
| 1385 | ){ |
| 1386 | int rc = TH_OK; |
| 1387 | Th_OpenConfig(1); |
| 1388 | if( fossil_getenv("TH1_ENABLE_HOOKS")==0 && !db_get_boolean("th1-hooks", 0) ){ |
| 1389 | return rc; |
| 1390 | } |
| 1391 | Th_CloseConfig(1); |
| 1392 | Th_FossilInit(TH_INIT_HOOK); |
| 1393 | Th_Store("web_name", zName); |
| 1394 | Th_StoreList("web_args", g.argv, g.argc); |
| 1395 | Th_StoreInt("web_flags", cmdFlags); |
| 1396 | rc = Th_Eval(g.interp, 0, "webpage_notify", -1); |
| 1397 |