Fossil SCM
'skin:' CGI config directive now accepts an empty value for consistency with the --skin CLI flag.
Commit
6362a98fa67e1d7dddab2872aab419f657be3ae05ab563103c16b630c7a194ea
Parent
816f6c040d0739b…
1 file changed
+4
-2
+4
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2450,20 +2450,22 @@ | ||
| 2450 | 2450 | */ |
| 2451 | 2451 | cgi_setenv("HOME", blob_str(&value)); |
| 2452 | 2452 | blob_reset(&value); |
| 2453 | 2453 | continue; |
| 2454 | 2454 | } |
| 2455 | - if( blob_eq(&key, "skin:") && blob_token(&line, &value) ){ | |
| 2455 | + if( blob_eq(&key, "skin:") ){ | |
| 2456 | 2456 | /* skin: LABEL |
| 2457 | 2457 | ** |
| 2458 | 2458 | ** Use one of the built-in skins defined by LABEL. LABEL is the |
| 2459 | 2459 | ** name of the subdirectory under the skins/ directory that holds |
| 2460 | 2460 | ** the elements of the built-in skin. If LABEL does not match, |
| 2461 | 2461 | ** this directive is a silent no-op. It may alternately be |
| 2462 | 2462 | ** an absolute path to a directory which holds skin definition |
| 2463 | - ** files (header.txt, footer.txt, etc.). | |
| 2463 | + ** files (header.txt, footer.txt, etc.). If LABEL is empty, | |
| 2464 | + ** the skin stored in the CONFIG db table is used. | |
| 2464 | 2465 | */ |
| 2466 | + blob_token(&line, &value); | |
| 2465 | 2467 | fossil_free(skin_use_alternative(blob_str(&value), 1)); |
| 2466 | 2468 | blob_reset(&value); |
| 2467 | 2469 | continue; |
| 2468 | 2470 | } |
| 2469 | 2471 | if( blob_eq(&key, "jsmode:") && blob_token(&line, &value) ){ |
| 2470 | 2472 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2450,20 +2450,22 @@ | |
| 2450 | */ |
| 2451 | cgi_setenv("HOME", blob_str(&value)); |
| 2452 | blob_reset(&value); |
| 2453 | continue; |
| 2454 | } |
| 2455 | if( blob_eq(&key, "skin:") && blob_token(&line, &value) ){ |
| 2456 | /* skin: LABEL |
| 2457 | ** |
| 2458 | ** Use one of the built-in skins defined by LABEL. LABEL is the |
| 2459 | ** name of the subdirectory under the skins/ directory that holds |
| 2460 | ** the elements of the built-in skin. If LABEL does not match, |
| 2461 | ** this directive is a silent no-op. It may alternately be |
| 2462 | ** an absolute path to a directory which holds skin definition |
| 2463 | ** files (header.txt, footer.txt, etc.). |
| 2464 | */ |
| 2465 | fossil_free(skin_use_alternative(blob_str(&value), 1)); |
| 2466 | blob_reset(&value); |
| 2467 | continue; |
| 2468 | } |
| 2469 | if( blob_eq(&key, "jsmode:") && blob_token(&line, &value) ){ |
| 2470 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2450,20 +2450,22 @@ | |
| 2450 | */ |
| 2451 | cgi_setenv("HOME", blob_str(&value)); |
| 2452 | blob_reset(&value); |
| 2453 | continue; |
| 2454 | } |
| 2455 | if( blob_eq(&key, "skin:") ){ |
| 2456 | /* skin: LABEL |
| 2457 | ** |
| 2458 | ** Use one of the built-in skins defined by LABEL. LABEL is the |
| 2459 | ** name of the subdirectory under the skins/ directory that holds |
| 2460 | ** the elements of the built-in skin. If LABEL does not match, |
| 2461 | ** this directive is a silent no-op. It may alternately be |
| 2462 | ** an absolute path to a directory which holds skin definition |
| 2463 | ** files (header.txt, footer.txt, etc.). If LABEL is empty, |
| 2464 | ** the skin stored in the CONFIG db table is used. |
| 2465 | */ |
| 2466 | blob_token(&line, &value); |
| 2467 | fossil_free(skin_use_alternative(blob_str(&value), 1)); |
| 2468 | blob_reset(&value); |
| 2469 | continue; |
| 2470 | } |
| 2471 | if( blob_eq(&key, "jsmode:") && blob_token(&line, &value) ){ |
| 2472 |