Fossil SCM

Remove the "default-skin" setting that was added by [24e015de71cfdc79].

drh 2024-02-23 17:30 trunk
Commit 1975bfd279759471d7aac8c83bf72500911b27f1e11b98f66ddd4e2966dd9f6f
1 file changed +5 -37
+5 -37
--- src/skins.c
+++ src/skins.c
@@ -19,17 +19,10 @@
1919
*/
2020
#include "config.h"
2121
#include <assert.h>
2222
#include "skins.h"
2323
24
-/*
25
-** SETTING: default-skin width=16
26
-**
27
-** If the text value if this setting is the name of a built-in skin
28
-** then the named skin becomes the default skin for the repository.
29
-*/
30
-
3124
/*
3225
** An array of available built-in skins.
3326
**
3427
** To add new built-in skins:
3528
**
@@ -94,16 +87,14 @@
9487
#define SKIN_FROM_DRAFT 0 /* The "draftN" prefix on the PATH_INFO */
9588
#define SKIN_FROM_CMDLINE 1 /* --skin option to server command-line */
9689
#define SKIN_FROM_CGI 2 /* skin: parameter in CGI script */
9790
#define SKIN_FROM_QPARAM 3 /* skin= query parameter */
9891
#define SKIN_FROM_COOKIE 4 /* skin= from fossil_display_settings cookie*/
99
-#define SKIN_FROM_SETTING 5 /* Built-in named by "default-skin" setting */
100
-#define SKIN_FROM_CUSTOM 6 /* Skin values in CONFIG table */
101
-#define SKIN_FROM_DEFAULT 7 /* The built-in named "default" */
102
-#define SKIN_FROM_UNKNOWN 8 /* Do not yet know which skin to use */
92
+#define SKIN_FROM_CUSTOM 5 /* Skin values in CONFIG table */
93
+#define SKIN_FROM_DEFAULT 6 /* The built-in named "default" */
10394
#endif /* INTERFACE */
104
-static int iSkinSource = SKIN_FROM_UNKNOWN;
95
+static int iSkinSource = SKIN_FROM_DEFAULT;
10596
10697
10798
/*
10899
** Skin details are a set of key/value pairs that define display
109100
** attributes of the skin that cannot be easily specified using CSS
@@ -162,17 +153,14 @@
162153
** 2) The "skin" display setting cookie or URL argument, in that
163154
** order. If the "skin" URL argument is provided and refers to a legal
164155
** skin then that will update the display cookie. If the skin name is
165156
** illegal it is silently ignored.
166157
**
167
-** 3) The built-in skin identfied by the "default-skin" setting, if such
168
-** a setting exists and matches one of the built-in skin names.
169
-**
170
-** 4) Skin properties (settings "css", "details", "footer", "header",
158
+** 3) Skin properties (settings "css", "details", "footer", "header",
171159
** and "js") from the CONFIG db table
172160
**
173
-** 5) The built-in skin named "default"
161
+** 4) The built-in skin named "default"
174162
**
175163
** The iSource integer privides additional detail about where the skin
176164
**
177165
** As a special case, a NULL or empty name resets zAltSkinDir and
178166
** pAltSkin to 0 to indicate that the current config-side skin should
@@ -259,24 +247,10 @@
259247
fossil_free(z);
260248
return blob_str(&x);
261249
}
262250
fossil_free(z);
263251
}
264
- if( iSkinSource==SKIN_FROM_UNKNOWN ){
265
- const char *zDflt = db_get("default-skin", 0);
266
- iSkinSource = SKIN_FROM_DEFAULT;
267
- if( zDflt!=0 ){
268
- int i;
269
- for(i=0; i<count(aBuiltinSkin); i++){
270
- if( fossil_strcmp(aBuiltinSkin[i].zLabel, zDflt)==0 ){
271
- pAltSkin = &aBuiltinSkin[i];
272
- iSkinSource = SKIN_FROM_SETTING;
273
- break;
274
- }
275
- }
276
- }
277
- }
278252
if( pAltSkin ){
279253
z = mprintf("skins/%s/%s.txt", pAltSkin->zLabel, zWhat);
280254
zOut = builtin_text(z);
281255
fossil_free(z);
282256
}else{
@@ -718,13 +692,10 @@
718692
break;
719693
case SKIN_FROM_COOKIE:
720694
@ the "skin" value of the
721695
@ <a href='./fdscookie'>fossil_display_setting</a> cookie.
722696
break;
723
- case SKIN_FROM_SETTING:
724
- @ the "default-skin" setting.
725
- break;
726697
default:
727698
@ reasons unknown. (Fix me!)
728699
break;
729700
}
730701
@ </tr>
@@ -1360,13 +1331,10 @@
13601331
break;
13611332
case SKIN_FROM_COOKIE:
13621333
@ the "skin" property in the
13631334
@ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie.
13641335
break;
1365
- case SKIN_FROM_SETTING:
1366
- @ the "default-skin" setting on the repository.
1367
- break;
13681336
}
13691337
}
13701338
style_finish_page();
13711339
fossil_free(zBase);
13721340
}
13731341
--- src/skins.c
+++ src/skins.c
@@ -19,17 +19,10 @@
19 */
20 #include "config.h"
21 #include <assert.h>
22 #include "skins.h"
23
24 /*
25 ** SETTING: default-skin width=16
26 **
27 ** If the text value if this setting is the name of a built-in skin
28 ** then the named skin becomes the default skin for the repository.
29 */
30
31 /*
32 ** An array of available built-in skins.
33 **
34 ** To add new built-in skins:
35 **
@@ -94,16 +87,14 @@
94 #define SKIN_FROM_DRAFT 0 /* The "draftN" prefix on the PATH_INFO */
95 #define SKIN_FROM_CMDLINE 1 /* --skin option to server command-line */
96 #define SKIN_FROM_CGI 2 /* skin: parameter in CGI script */
97 #define SKIN_FROM_QPARAM 3 /* skin= query parameter */
98 #define SKIN_FROM_COOKIE 4 /* skin= from fossil_display_settings cookie*/
99 #define SKIN_FROM_SETTING 5 /* Built-in named by "default-skin" setting */
100 #define SKIN_FROM_CUSTOM 6 /* Skin values in CONFIG table */
101 #define SKIN_FROM_DEFAULT 7 /* The built-in named "default" */
102 #define SKIN_FROM_UNKNOWN 8 /* Do not yet know which skin to use */
103 #endif /* INTERFACE */
104 static int iSkinSource = SKIN_FROM_UNKNOWN;
105
106
107 /*
108 ** Skin details are a set of key/value pairs that define display
109 ** attributes of the skin that cannot be easily specified using CSS
@@ -162,17 +153,14 @@
162 ** 2) The "skin" display setting cookie or URL argument, in that
163 ** order. If the "skin" URL argument is provided and refers to a legal
164 ** skin then that will update the display cookie. If the skin name is
165 ** illegal it is silently ignored.
166 **
167 ** 3) The built-in skin identfied by the "default-skin" setting, if such
168 ** a setting exists and matches one of the built-in skin names.
169 **
170 ** 4) Skin properties (settings "css", "details", "footer", "header",
171 ** and "js") from the CONFIG db table
172 **
173 ** 5) The built-in skin named "default"
174 **
175 ** The iSource integer privides additional detail about where the skin
176 **
177 ** As a special case, a NULL or empty name resets zAltSkinDir and
178 ** pAltSkin to 0 to indicate that the current config-side skin should
@@ -259,24 +247,10 @@
259 fossil_free(z);
260 return blob_str(&x);
261 }
262 fossil_free(z);
263 }
264 if( iSkinSource==SKIN_FROM_UNKNOWN ){
265 const char *zDflt = db_get("default-skin", 0);
266 iSkinSource = SKIN_FROM_DEFAULT;
267 if( zDflt!=0 ){
268 int i;
269 for(i=0; i<count(aBuiltinSkin); i++){
270 if( fossil_strcmp(aBuiltinSkin[i].zLabel, zDflt)==0 ){
271 pAltSkin = &aBuiltinSkin[i];
272 iSkinSource = SKIN_FROM_SETTING;
273 break;
274 }
275 }
276 }
277 }
278 if( pAltSkin ){
279 z = mprintf("skins/%s/%s.txt", pAltSkin->zLabel, zWhat);
280 zOut = builtin_text(z);
281 fossil_free(z);
282 }else{
@@ -718,13 +692,10 @@
718 break;
719 case SKIN_FROM_COOKIE:
720 @ the "skin" value of the
721 @ <a href='./fdscookie'>fossil_display_setting</a> cookie.
722 break;
723 case SKIN_FROM_SETTING:
724 @ the "default-skin" setting.
725 break;
726 default:
727 @ reasons unknown. (Fix me!)
728 break;
729 }
730 @ </tr>
@@ -1360,13 +1331,10 @@
1360 break;
1361 case SKIN_FROM_COOKIE:
1362 @ the "skin" property in the
1363 @ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie.
1364 break;
1365 case SKIN_FROM_SETTING:
1366 @ the "default-skin" setting on the repository.
1367 break;
1368 }
1369 }
1370 style_finish_page();
1371 fossil_free(zBase);
1372 }
1373
--- src/skins.c
+++ src/skins.c
@@ -19,17 +19,10 @@
19 */
20 #include "config.h"
21 #include <assert.h>
22 #include "skins.h"
23
 
 
 
 
 
 
 
24 /*
25 ** An array of available built-in skins.
26 **
27 ** To add new built-in skins:
28 **
@@ -94,16 +87,14 @@
87 #define SKIN_FROM_DRAFT 0 /* The "draftN" prefix on the PATH_INFO */
88 #define SKIN_FROM_CMDLINE 1 /* --skin option to server command-line */
89 #define SKIN_FROM_CGI 2 /* skin: parameter in CGI script */
90 #define SKIN_FROM_QPARAM 3 /* skin= query parameter */
91 #define SKIN_FROM_COOKIE 4 /* skin= from fossil_display_settings cookie*/
92 #define SKIN_FROM_CUSTOM 5 /* Skin values in CONFIG table */
93 #define SKIN_FROM_DEFAULT 6 /* The built-in named "default" */
 
 
94 #endif /* INTERFACE */
95 static int iSkinSource = SKIN_FROM_DEFAULT;
96
97
98 /*
99 ** Skin details are a set of key/value pairs that define display
100 ** attributes of the skin that cannot be easily specified using CSS
@@ -162,17 +153,14 @@
153 ** 2) The "skin" display setting cookie or URL argument, in that
154 ** order. If the "skin" URL argument is provided and refers to a legal
155 ** skin then that will update the display cookie. If the skin name is
156 ** illegal it is silently ignored.
157 **
158 ** 3) Skin properties (settings "css", "details", "footer", "header",
 
 
 
159 ** and "js") from the CONFIG db table
160 **
161 ** 4) The built-in skin named "default"
162 **
163 ** The iSource integer privides additional detail about where the skin
164 **
165 ** As a special case, a NULL or empty name resets zAltSkinDir and
166 ** pAltSkin to 0 to indicate that the current config-side skin should
@@ -259,24 +247,10 @@
247 fossil_free(z);
248 return blob_str(&x);
249 }
250 fossil_free(z);
251 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252 if( pAltSkin ){
253 z = mprintf("skins/%s/%s.txt", pAltSkin->zLabel, zWhat);
254 zOut = builtin_text(z);
255 fossil_free(z);
256 }else{
@@ -718,13 +692,10 @@
692 break;
693 case SKIN_FROM_COOKIE:
694 @ the "skin" value of the
695 @ <a href='./fdscookie'>fossil_display_setting</a> cookie.
696 break;
 
 
 
697 default:
698 @ reasons unknown. (Fix me!)
699 break;
700 }
701 @ </tr>
@@ -1360,13 +1331,10 @@
1331 break;
1332 case SKIN_FROM_COOKIE:
1333 @ the "skin" property in the
1334 @ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie.
1335 break;
 
 
 
1336 }
1337 }
1338 style_finish_page();
1339 fossil_free(zBase);
1340 }
1341

Keyboard Shortcuts

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