Fossil SCM
Only call db_get_do_versionable() after checking that it's a boolean versionable setting.
Commit
a60df3be4468a3d6a5ae0cfc6a55c48793ec2549
Parent
3cba68a83ee9966…
1 file changed
+2
-1
+2
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1209,12 +1209,13 @@ | ||
| 1209 | 1209 | @ the meaning of each setting.</p><hr /> |
| 1210 | 1210 | @ <form action="%s(g.zTop)/setup_settings" method="post"><div> |
| 1211 | 1211 | @ <table border="0"><tr><td valign="top"> |
| 1212 | 1212 | login_insert_csrf_secret(); |
| 1213 | 1213 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 1214 | - int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0; | |
| 1215 | 1214 | if( pSet->width==0 ){ |
| 1215 | + int hasVersionableValue = pSet->versionable && | |
| 1216 | + (db_get_do_versionable(pSet->name, NULL)!=0); | |
| 1216 | 1217 | onoff_attribute(pSet->name, pSet->name, |
| 1217 | 1218 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1218 | 1219 | is_truth(pSet->def), hasVersionableValue); |
| 1219 | 1220 | if( pSet->versionable ){ |
| 1220 | 1221 | @ (v)<br /> |
| 1221 | 1222 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1209,12 +1209,13 @@ | |
| 1209 | @ the meaning of each setting.</p><hr /> |
| 1210 | @ <form action="%s(g.zTop)/setup_settings" method="post"><div> |
| 1211 | @ <table border="0"><tr><td valign="top"> |
| 1212 | login_insert_csrf_secret(); |
| 1213 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 1214 | int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0; |
| 1215 | if( pSet->width==0 ){ |
| 1216 | onoff_attribute(pSet->name, pSet->name, |
| 1217 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1218 | is_truth(pSet->def), hasVersionableValue); |
| 1219 | if( pSet->versionable ){ |
| 1220 | @ (v)<br /> |
| 1221 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1209,12 +1209,13 @@ | |
| 1209 | @ the meaning of each setting.</p><hr /> |
| 1210 | @ <form action="%s(g.zTop)/setup_settings" method="post"><div> |
| 1211 | @ <table border="0"><tr><td valign="top"> |
| 1212 | login_insert_csrf_secret(); |
| 1213 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 1214 | if( pSet->width==0 ){ |
| 1215 | int hasVersionableValue = pSet->versionable && |
| 1216 | (db_get_do_versionable(pSet->name, NULL)!=0); |
| 1217 | onoff_attribute(pSet->name, pSet->name, |
| 1218 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1219 | is_truth(pSet->def), hasVersionableValue); |
| 1220 | if( pSet->versionable ){ |
| 1221 | @ (v)<br /> |
| 1222 |