Fossil SCM
Honor the show-only-if-changed flag for boolean settings on the /setup_settings page in addition to in the "settings" command.
Commit
3ba0763bfcbffba484e27446be63dfe618636f335287f99b6b48ee117d2deda5
Parent
8f4aedcf849a1a6…
1 file changed
+4
+4
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1158,10 +1158,14 @@ | ||
| 1158 | 1158 | login_insert_csrf_secret(); |
| 1159 | 1159 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1160 | 1160 | if( pSet->width==0 ){ |
| 1161 | 1161 | int hasVersionableValue = pSet->versionable && |
| 1162 | 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 | + } | |
| 1163 | 1167 | onoff_attribute("", pSet->name, |
| 1164 | 1168 | pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/, |
| 1165 | 1169 | is_truth(pSet->def), hasVersionableValue); |
| 1166 | 1170 | @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> |
| 1167 | 1171 | if( pSet->versionable ){ |
| 1168 | 1172 |
| --- 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 |