Fossil SCM

Honor the show-only-if-changed flag for boolean settings on the /setup_settings page in addition to in the "settings" command.

drh 2025-03-16 22:44 trunk
Commit 3ba0763bfcbffba484e27446be63dfe618636f335287f99b6b48ee117d2deda5
1 file changed +4
--- src/setup.c
+++ src/setup.c
@@ -1158,10 +1158,14 @@
11581158
login_insert_csrf_secret();
11591159
for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
11601160
if( pSet->width==0 ){
11611161
int hasVersionableValue = pSet->versionable &&
11621162
(db_get_versioned(pSet->name, NULL, NULL)!=0);
1163
+ if( pSet->bIfChng ){
1164
+ const char *zVal = db_get(pSet->name, 0);
1165
+ if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue;
1166
+ }
11631167
onoff_attribute("", pSet->name,
11641168
pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/,
11651169
is_truth(pSet->def), hasVersionableValue);
11661170
@ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
11671171
if( pSet->versionable ){
11681172
--- src/setup.c
+++ src/setup.c
@@ -1158,10 +1158,14 @@
1158 login_insert_csrf_secret();
1159 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1160 if( pSet->width==0 ){
1161 int hasVersionableValue = pSet->versionable &&
1162 (db_get_versioned(pSet->name, NULL, NULL)!=0);
 
 
 
 
1163 onoff_attribute("", pSet->name,
1164 pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/,
1165 is_truth(pSet->def), hasVersionableValue);
1166 @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
1167 if( pSet->versionable ){
1168
--- src/setup.c
+++ src/setup.c
@@ -1158,10 +1158,14 @@
1158 login_insert_csrf_secret();
1159 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1160 if( pSet->width==0 ){
1161 int hasVersionableValue = pSet->versionable &&
1162 (db_get_versioned(pSet->name, NULL, NULL)!=0);
1163 if( pSet->bIfChng ){
1164 const char *zVal = db_get(pSet->name, 0);
1165 if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue;
1166 }
1167 onoff_attribute("", pSet->name,
1168 pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/,
1169 is_truth(pSet->def), hasVersionableValue);
1170 @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
1171 if( pSet->versionable ){
1172

Keyboard Shortcuts

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