Fossil SCM
Accidentally omitted the --skin option processing from the previous check-in.
Commit
5ce5ff5765202f7ec9aad04e709651ebb53e3e9e
Parent
ed36e2eb510fbd2…
2 files changed
+4
+12
+4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2026,10 +2026,11 @@ | ||
| 2026 | 2026 | ** --nossl signal that no SSL connections are available |
| 2027 | 2027 | ** --notfound URL use URL as "HTTP 404, object not found" page. |
| 2028 | 2028 | ** --files GLOB comma-separate glob patterns for static file to serve |
| 2029 | 2029 | ** --baseurl URL base URL (useful with reverse proxies) |
| 2030 | 2030 | ** --scgi Interpret input as SCGI rather than HTTP |
| 2031 | +** --skin LABEL Use override skin LABEL | |
| 2031 | 2032 | ** |
| 2032 | 2033 | ** See also: cgi, server, winsrv |
| 2033 | 2034 | */ |
| 2034 | 2035 | void cmd_http(void){ |
| 2035 | 2036 | const char *zIpAddr = 0; |
| @@ -2049,10 +2050,11 @@ | ||
| 2049 | 2050 | dehttpize(z); |
| 2050 | 2051 | zFileGlob = z; |
| 2051 | 2052 | }else{ |
| 2052 | 2053 | zFileGlob = find_option("files",0,1); |
| 2053 | 2054 | } |
| 2055 | + skin_override(); | |
| 2054 | 2056 | zNotFound = find_option("notfound", 0, 1); |
| 2055 | 2057 | g.useLocalauth = find_option("localauth", 0, 0)!=0; |
| 2056 | 2058 | g.sslNotAvailable = find_option("nossl", 0, 0)!=0; |
| 2057 | 2059 | useSCGI = find_option("scgi", 0, 0)!=0; |
| 2058 | 2060 | zAltBase = find_option("baseurl", 0, 1); |
| @@ -2212,10 +2214,11 @@ | ||
| 2212 | 2214 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2213 | 2215 | ** --baseurl URL Use URL as the base (useful for reverse proxies) |
| 2214 | 2216 | ** --notfound URL Redirect |
| 2215 | 2217 | ** --files GLOBLIST Comma-separated list of glob patterns for static files |
| 2216 | 2218 | ** --scgi Accept SCGI rather than HTTP |
| 2219 | +** --skin LABEL Use override skin LABEL | |
| 2217 | 2220 | ** |
| 2218 | 2221 | ** See also: cgi, http, winsrv |
| 2219 | 2222 | */ |
| 2220 | 2223 | void cmd_webserver(void){ |
| 2221 | 2224 | int iPort, mxPort; /* Range of TCP ports allowed */ |
| @@ -2240,10 +2243,11 @@ | ||
| 2240 | 2243 | dehttpize(z); |
| 2241 | 2244 | zFileGlob = z; |
| 2242 | 2245 | }else{ |
| 2243 | 2246 | zFileGlob = find_option("files",0,1); |
| 2244 | 2247 | } |
| 2248 | + skin_override(); | |
| 2245 | 2249 | g.useLocalauth = find_option("localauth", 0, 0)!=0; |
| 2246 | 2250 | Th_InitTraceLog(); |
| 2247 | 2251 | zPort = find_option("port", "P", 1); |
| 2248 | 2252 | zNotFound = find_option("notfound", 0, 1); |
| 2249 | 2253 | zAltBase = find_option("baseurl", 0, 1); |
| 2250 | 2254 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2026,10 +2026,11 @@ | |
| 2026 | ** --nossl signal that no SSL connections are available |
| 2027 | ** --notfound URL use URL as "HTTP 404, object not found" page. |
| 2028 | ** --files GLOB comma-separate glob patterns for static file to serve |
| 2029 | ** --baseurl URL base URL (useful with reverse proxies) |
| 2030 | ** --scgi Interpret input as SCGI rather than HTTP |
| 2031 | ** |
| 2032 | ** See also: cgi, server, winsrv |
| 2033 | */ |
| 2034 | void cmd_http(void){ |
| 2035 | const char *zIpAddr = 0; |
| @@ -2049,10 +2050,11 @@ | |
| 2049 | dehttpize(z); |
| 2050 | zFileGlob = z; |
| 2051 | }else{ |
| 2052 | zFileGlob = find_option("files",0,1); |
| 2053 | } |
| 2054 | zNotFound = find_option("notfound", 0, 1); |
| 2055 | g.useLocalauth = find_option("localauth", 0, 0)!=0; |
| 2056 | g.sslNotAvailable = find_option("nossl", 0, 0)!=0; |
| 2057 | useSCGI = find_option("scgi", 0, 0)!=0; |
| 2058 | zAltBase = find_option("baseurl", 0, 1); |
| @@ -2212,10 +2214,11 @@ | |
| 2212 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2213 | ** --baseurl URL Use URL as the base (useful for reverse proxies) |
| 2214 | ** --notfound URL Redirect |
| 2215 | ** --files GLOBLIST Comma-separated list of glob patterns for static files |
| 2216 | ** --scgi Accept SCGI rather than HTTP |
| 2217 | ** |
| 2218 | ** See also: cgi, http, winsrv |
| 2219 | */ |
| 2220 | void cmd_webserver(void){ |
| 2221 | int iPort, mxPort; /* Range of TCP ports allowed */ |
| @@ -2240,10 +2243,11 @@ | |
| 2240 | dehttpize(z); |
| 2241 | zFileGlob = z; |
| 2242 | }else{ |
| 2243 | zFileGlob = find_option("files",0,1); |
| 2244 | } |
| 2245 | g.useLocalauth = find_option("localauth", 0, 0)!=0; |
| 2246 | Th_InitTraceLog(); |
| 2247 | zPort = find_option("port", "P", 1); |
| 2248 | zNotFound = find_option("notfound", 0, 1); |
| 2249 | zAltBase = find_option("baseurl", 0, 1); |
| 2250 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2026,10 +2026,11 @@ | |
| 2026 | ** --nossl signal that no SSL connections are available |
| 2027 | ** --notfound URL use URL as "HTTP 404, object not found" page. |
| 2028 | ** --files GLOB comma-separate glob patterns for static file to serve |
| 2029 | ** --baseurl URL base URL (useful with reverse proxies) |
| 2030 | ** --scgi Interpret input as SCGI rather than HTTP |
| 2031 | ** --skin LABEL Use override skin LABEL |
| 2032 | ** |
| 2033 | ** See also: cgi, server, winsrv |
| 2034 | */ |
| 2035 | void cmd_http(void){ |
| 2036 | const char *zIpAddr = 0; |
| @@ -2049,10 +2050,11 @@ | |
| 2050 | dehttpize(z); |
| 2051 | zFileGlob = z; |
| 2052 | }else{ |
| 2053 | zFileGlob = find_option("files",0,1); |
| 2054 | } |
| 2055 | skin_override(); |
| 2056 | zNotFound = find_option("notfound", 0, 1); |
| 2057 | g.useLocalauth = find_option("localauth", 0, 0)!=0; |
| 2058 | g.sslNotAvailable = find_option("nossl", 0, 0)!=0; |
| 2059 | useSCGI = find_option("scgi", 0, 0)!=0; |
| 2060 | zAltBase = find_option("baseurl", 0, 1); |
| @@ -2212,10 +2214,11 @@ | |
| 2214 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2215 | ** --baseurl URL Use URL as the base (useful for reverse proxies) |
| 2216 | ** --notfound URL Redirect |
| 2217 | ** --files GLOBLIST Comma-separated list of glob patterns for static files |
| 2218 | ** --scgi Accept SCGI rather than HTTP |
| 2219 | ** --skin LABEL Use override skin LABEL |
| 2220 | ** |
| 2221 | ** See also: cgi, http, winsrv |
| 2222 | */ |
| 2223 | void cmd_webserver(void){ |
| 2224 | int iPort, mxPort; /* Range of TCP ports allowed */ |
| @@ -2240,10 +2243,11 @@ | |
| 2243 | dehttpize(z); |
| 2244 | zFileGlob = z; |
| 2245 | }else{ |
| 2246 | zFileGlob = find_option("files",0,1); |
| 2247 | } |
| 2248 | skin_override(); |
| 2249 | g.useLocalauth = find_option("localauth", 0, 0)!=0; |
| 2250 | Th_InitTraceLog(); |
| 2251 | zPort = find_option("port", "P", 1); |
| 2252 | zNotFound = find_option("notfound", 0, 1); |
| 2253 | zAltBase = find_option("baseurl", 0, 1); |
| 2254 |
+12
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -84,10 +84,22 @@ | ||
| 84 | 84 | blob_append(&err, " ", 1); |
| 85 | 85 | blob_append(&err, aBuiltinSkin[i].zLabel, -1); |
| 86 | 86 | } |
| 87 | 87 | return blob_str(&err); |
| 88 | 88 | } |
| 89 | + | |
| 90 | +/* | |
| 91 | +** Look for the --skin command-line option and process it. Or | |
| 92 | +** call fossil_fatal() if an unknown skin is specified. | |
| 93 | +*/ | |
| 94 | +void skin_override(void){ | |
| 95 | + const char *zSkin = find_option("skin",0,1); | |
| 96 | + if( zSkin ){ | |
| 97 | + char *zErr = skin_use_alternative(zSkin); | |
| 98 | + if( zErr ) fossil_fatal("available skins: %s", zErr); | |
| 99 | + } | |
| 100 | +} | |
| 89 | 101 | |
| 90 | 102 | /* |
| 91 | 103 | ** The following routines return the various components of the skin |
| 92 | 104 | ** that should be used for the current run. |
| 93 | 105 | */ |
| 94 | 106 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -84,10 +84,22 @@ | |
| 84 | blob_append(&err, " ", 1); |
| 85 | blob_append(&err, aBuiltinSkin[i].zLabel, -1); |
| 86 | } |
| 87 | return blob_str(&err); |
| 88 | } |
| 89 | |
| 90 | /* |
| 91 | ** The following routines return the various components of the skin |
| 92 | ** that should be used for the current run. |
| 93 | */ |
| 94 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -84,10 +84,22 @@ | |
| 84 | blob_append(&err, " ", 1); |
| 85 | blob_append(&err, aBuiltinSkin[i].zLabel, -1); |
| 86 | } |
| 87 | return blob_str(&err); |
| 88 | } |
| 89 | |
| 90 | /* |
| 91 | ** Look for the --skin command-line option and process it. Or |
| 92 | ** call fossil_fatal() if an unknown skin is specified. |
| 93 | */ |
| 94 | void skin_override(void){ |
| 95 | const char *zSkin = find_option("skin",0,1); |
| 96 | if( zSkin ){ |
| 97 | char *zErr = skin_use_alternative(zSkin); |
| 98 | if( zErr ) fossil_fatal("available skins: %s", zErr); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | /* |
| 103 | ** The following routines return the various components of the skin |
| 104 | ** that should be used for the current run. |
| 105 | */ |
| 106 |