Fossil SCM
Simplify new setting names and some internal names.
Commit
e6a3112f76f0e26b2287c5299b8d767897623fd3ec05addc552ed744273cc85b
Parent
3352c1c290388d4…
4 files changed
+2
-2
+12
-12
+2
-2
+6
-6
+2
-2
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -94,12 +94,12 @@ | ||
| 94 | 94 | { "js", CONFIGSET_SKIN }, |
| 95 | 95 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 96 | 96 | { "logo-image", CONFIGSET_SKIN }, |
| 97 | 97 | { "background-mimetype", CONFIGSET_SKIN }, |
| 98 | 98 | { "background-image", CONFIGSET_SKIN }, |
| 99 | - { "favicon-mimetype", CONFIGSET_SKIN }, | |
| 100 | - { "favicon-image", CONFIGSET_SKIN }, | |
| 99 | + { "icon-mimetype", CONFIGSET_SKIN }, | |
| 100 | + { "icon-image", CONFIGSET_SKIN }, | |
| 101 | 101 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 102 | 102 | { "timeline-date-format", CONFIGSET_SKIN }, |
| 103 | 103 | { "timeline-default-style", CONFIGSET_SKIN }, |
| 104 | 104 | { "timeline-dwelltime", CONFIGSET_SKIN }, |
| 105 | 105 | { "timeline-closetime", CONFIGSET_SKIN }, |
| 106 | 106 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -94,12 +94,12 @@ | |
| 94 | { "js", CONFIGSET_SKIN }, |
| 95 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 96 | { "logo-image", CONFIGSET_SKIN }, |
| 97 | { "background-mimetype", CONFIGSET_SKIN }, |
| 98 | { "background-image", CONFIGSET_SKIN }, |
| 99 | { "favicon-mimetype", CONFIGSET_SKIN }, |
| 100 | { "favicon-image", CONFIGSET_SKIN }, |
| 101 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 102 | { "timeline-date-format", CONFIGSET_SKIN }, |
| 103 | { "timeline-default-style", CONFIGSET_SKIN }, |
| 104 | { "timeline-dwelltime", CONFIGSET_SKIN }, |
| 105 | { "timeline-closetime", CONFIGSET_SKIN }, |
| 106 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -94,12 +94,12 @@ | |
| 94 | { "js", CONFIGSET_SKIN }, |
| 95 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 96 | { "logo-image", CONFIGSET_SKIN }, |
| 97 | { "background-mimetype", CONFIGSET_SKIN }, |
| 98 | { "background-image", CONFIGSET_SKIN }, |
| 99 | { "icon-mimetype", CONFIGSET_SKIN }, |
| 100 | { "icon-image", CONFIGSET_SKIN }, |
| 101 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 102 | { "timeline-date-format", CONFIGSET_SKIN }, |
| 103 | { "timeline-default-style", CONFIGSET_SKIN }, |
| 104 | { "timeline-dwelltime", CONFIGSET_SKIN }, |
| 105 | { "timeline-closetime", CONFIGSET_SKIN }, |
| 106 |
+12
-12
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -1132,34 +1132,34 @@ | ||
| 1132 | 1132 | |
| 1133 | 1133 | |
| 1134 | 1134 | /* |
| 1135 | 1135 | ** WEBPAGE: favicon.ico |
| 1136 | 1136 | ** |
| 1137 | -** Return the configured favicon.ico image. If no favicon.ico image is | |
| 1138 | -** defined, the returned image is for the Fossil lizard icon. | |
| 1137 | +** Return the configured "favicon.ico" image. If no "favicon.ico" image | |
| 1138 | +** is defined, the returned image is for the Fossil lizard icon. | |
| 1139 | 1139 | ** |
| 1140 | -** The intended use case here is to supply a favicon for the "fossil ui" | |
| 1140 | +** The intended use case here is to supply an icon for the "fossil ui" | |
| 1141 | 1141 | ** command. For a permanent website, the recommended process is for |
| 1142 | -** the admin to set up a project-specific favicon and reference that | |
| 1143 | -** icon in the HTML header using a line like: | |
| 1142 | +** the admin to set up a project-specific icon and reference that icon | |
| 1143 | +** in the HTML header using a line like: | |
| 1144 | 1144 | ** |
| 1145 | 1145 | ** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/> |
| 1146 | 1146 | ** |
| 1147 | 1147 | */ |
| 1148 | 1148 | void favicon_page(void){ |
| 1149 | - Blob favicon; | |
| 1149 | + Blob icon; | |
| 1150 | 1150 | char *zMime; |
| 1151 | 1151 | |
| 1152 | 1152 | etag_check(ETAG_CONFIG, 0); |
| 1153 | - zMime = db_get("favicon-mimetype", "image/gif"); | |
| 1154 | - blob_zero(&favicon); | |
| 1155 | - db_blob(&favicon, "SELECT value FROM config WHERE name='favicon-image'"); | |
| 1156 | - if( blob_size(&favicon)==0 ){ | |
| 1157 | - blob_init(&favicon, (char*)aLogo, sizeof(aLogo)); | |
| 1153 | + zMime = db_get("icon-mimetype", "image/gif"); | |
| 1154 | + blob_zero(&icon); | |
| 1155 | + db_blob(&icon, "SELECT value FROM config WHERE name='icon-image'"); | |
| 1156 | + if( blob_size(&icon)==0 ){ | |
| 1157 | + blob_init(&icon, (char*)aLogo, sizeof(aLogo)); | |
| 1158 | 1158 | } |
| 1159 | 1159 | cgi_set_content_type(zMime); |
| 1160 | - cgi_set_content(&favicon); | |
| 1160 | + cgi_set_content(&icon); | |
| 1161 | 1161 | } |
| 1162 | 1162 | |
| 1163 | 1163 | /* |
| 1164 | 1164 | ** WEBPAGE: docsrch |
| 1165 | 1165 | ** |
| 1166 | 1166 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -1132,34 +1132,34 @@ | |
| 1132 | |
| 1133 | |
| 1134 | /* |
| 1135 | ** WEBPAGE: favicon.ico |
| 1136 | ** |
| 1137 | ** Return the configured favicon.ico image. If no favicon.ico image is |
| 1138 | ** defined, the returned image is for the Fossil lizard icon. |
| 1139 | ** |
| 1140 | ** The intended use case here is to supply a favicon for the "fossil ui" |
| 1141 | ** command. For a permanent website, the recommended process is for |
| 1142 | ** the admin to set up a project-specific favicon and reference that |
| 1143 | ** icon in the HTML header using a line like: |
| 1144 | ** |
| 1145 | ** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/> |
| 1146 | ** |
| 1147 | */ |
| 1148 | void favicon_page(void){ |
| 1149 | Blob favicon; |
| 1150 | char *zMime; |
| 1151 | |
| 1152 | etag_check(ETAG_CONFIG, 0); |
| 1153 | zMime = db_get("favicon-mimetype", "image/gif"); |
| 1154 | blob_zero(&favicon); |
| 1155 | db_blob(&favicon, "SELECT value FROM config WHERE name='favicon-image'"); |
| 1156 | if( blob_size(&favicon)==0 ){ |
| 1157 | blob_init(&favicon, (char*)aLogo, sizeof(aLogo)); |
| 1158 | } |
| 1159 | cgi_set_content_type(zMime); |
| 1160 | cgi_set_content(&favicon); |
| 1161 | } |
| 1162 | |
| 1163 | /* |
| 1164 | ** WEBPAGE: docsrch |
| 1165 | ** |
| 1166 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -1132,34 +1132,34 @@ | |
| 1132 | |
| 1133 | |
| 1134 | /* |
| 1135 | ** WEBPAGE: favicon.ico |
| 1136 | ** |
| 1137 | ** Return the configured "favicon.ico" image. If no "favicon.ico" image |
| 1138 | ** is defined, the returned image is for the Fossil lizard icon. |
| 1139 | ** |
| 1140 | ** The intended use case here is to supply an icon for the "fossil ui" |
| 1141 | ** command. For a permanent website, the recommended process is for |
| 1142 | ** the admin to set up a project-specific icon and reference that icon |
| 1143 | ** in the HTML header using a line like: |
| 1144 | ** |
| 1145 | ** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/> |
| 1146 | ** |
| 1147 | */ |
| 1148 | void favicon_page(void){ |
| 1149 | Blob icon; |
| 1150 | char *zMime; |
| 1151 | |
| 1152 | etag_check(ETAG_CONFIG, 0); |
| 1153 | zMime = db_get("icon-mimetype", "image/gif"); |
| 1154 | blob_zero(&icon); |
| 1155 | db_blob(&icon, "SELECT value FROM config WHERE name='icon-image'"); |
| 1156 | if( blob_size(&icon)==0 ){ |
| 1157 | blob_init(&icon, (char*)aLogo, sizeof(aLogo)); |
| 1158 | } |
| 1159 | cgi_set_content_type(zMime); |
| 1160 | cgi_set_content(&icon); |
| 1161 | } |
| 1162 | |
| 1163 | /* |
| 1164 | ** WEBPAGE: docsrch |
| 1165 | ** |
| 1166 |
+2
-2
| --- src/json_config.c | ||
| +++ src/json_config.c | ||
| @@ -61,12 +61,12 @@ | ||
| 61 | 61 | { "details", CONFIGSET_SKIN }, |
| 62 | 62 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 63 | 63 | { "logo-image", CONFIGSET_SKIN }, |
| 64 | 64 | { "background-mimetype", CONFIGSET_SKIN }, |
| 65 | 65 | { "background-image", CONFIGSET_SKIN }, |
| 66 | -{ "favicon-mimetype", CONFIGSET_SKIN }, | |
| 67 | -{ "favicon-image", CONFIGSET_SKIN }, | |
| 66 | +{ "icon-mimetype", CONFIGSET_SKIN }, | |
| 67 | +{ "icon-image", CONFIGSET_SKIN }, | |
| 68 | 68 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 69 | 69 | { "timeline-max-comment", CONFIGSET_SKIN }, |
| 70 | 70 | { "timeline-plaintext", CONFIGSET_SKIN }, |
| 71 | 71 | { "adunit", CONFIGSET_SKIN }, |
| 72 | 72 | { "adunit-omit-if-admin", CONFIGSET_SKIN }, |
| 73 | 73 |
| --- src/json_config.c | |
| +++ src/json_config.c | |
| @@ -61,12 +61,12 @@ | |
| 61 | { "details", CONFIGSET_SKIN }, |
| 62 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 63 | { "logo-image", CONFIGSET_SKIN }, |
| 64 | { "background-mimetype", CONFIGSET_SKIN }, |
| 65 | { "background-image", CONFIGSET_SKIN }, |
| 66 | { "favicon-mimetype", CONFIGSET_SKIN }, |
| 67 | { "favicon-image", CONFIGSET_SKIN }, |
| 68 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 69 | { "timeline-max-comment", CONFIGSET_SKIN }, |
| 70 | { "timeline-plaintext", CONFIGSET_SKIN }, |
| 71 | { "adunit", CONFIGSET_SKIN }, |
| 72 | { "adunit-omit-if-admin", CONFIGSET_SKIN }, |
| 73 |
| --- src/json_config.c | |
| +++ src/json_config.c | |
| @@ -61,12 +61,12 @@ | |
| 61 | { "details", CONFIGSET_SKIN }, |
| 62 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 63 | { "logo-image", CONFIGSET_SKIN }, |
| 64 | { "background-mimetype", CONFIGSET_SKIN }, |
| 65 | { "background-image", CONFIGSET_SKIN }, |
| 66 | { "icon-mimetype", CONFIGSET_SKIN }, |
| 67 | { "icon-image", CONFIGSET_SKIN }, |
| 68 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 69 | { "timeline-max-comment", CONFIGSET_SKIN }, |
| 70 | { "timeline-plaintext", CONFIGSET_SKIN }, |
| 71 | { "adunit", CONFIGSET_SKIN }, |
| 72 | { "adunit-omit-if-admin", CONFIGSET_SKIN }, |
| 73 |
+6
-6
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1246,12 +1246,12 @@ | ||
| 1246 | 1246 | int szLogoImg = atoi(PD("logoim:bytes","0")); |
| 1247 | 1247 | const char *zBgMtime = db_get_mtime("background-image", 0, 0); |
| 1248 | 1248 | const char *zBgMime = db_get("background-mimetype","image/gif"); |
| 1249 | 1249 | const char *aBgImg = P("bgim"); |
| 1250 | 1250 | int szBgImg = atoi(PD("bgim:bytes","0")); |
| 1251 | - const char *zIconMtime = db_get_mtime("favicon-image", 0, 0); | |
| 1252 | - const char *zIconMime = db_get("favicon-mimetype","image/gif"); | |
| 1251 | + const char *zIconMtime = db_get_mtime("icon-image", 0, 0); | |
| 1252 | + const char *zIconMime = db_get("icon-mimetype","image/gif"); | |
| 1253 | 1253 | const char *aIconImg = P("iconim"); |
| 1254 | 1254 | int szIconImg = atoi(PD("iconim:bytes","0")); |
| 1255 | 1255 | if( szLogoImg>0 ){ |
| 1256 | 1256 | zLogoMime = PD("logoim:mimetype","image/gif"); |
| 1257 | 1257 | } |
| @@ -1322,26 +1322,26 @@ | ||
| 1322 | 1322 | Blob img; |
| 1323 | 1323 | Stmt ins; |
| 1324 | 1324 | blob_init(&img, aIconImg, szIconImg); |
| 1325 | 1325 | db_prepare(&ins, |
| 1326 | 1326 | "REPLACE INTO config(name,value,mtime)" |
| 1327 | - " VALUES('favicon-image',:bytes,now())" | |
| 1327 | + " VALUES('icon-image',:bytes,now())" | |
| 1328 | 1328 | ); |
| 1329 | 1329 | db_bind_blob(&ins, ":bytes", &img); |
| 1330 | 1330 | db_step(&ins); |
| 1331 | 1331 | db_finalize(&ins); |
| 1332 | 1332 | db_multi_exec( |
| 1333 | 1333 | "REPLACE INTO config(name,value,mtime)" |
| 1334 | - " VALUES('favicon-mimetype',%Q,now())", | |
| 1334 | + " VALUES('icon-mimetype',%Q,now())", | |
| 1335 | 1335 | zIconMime |
| 1336 | 1336 | ); |
| 1337 | 1337 | db_end_transaction(0); |
| 1338 | 1338 | cgi_redirect("setup_logo"); |
| 1339 | 1339 | }else if( P("clricon")!=0 ){ |
| 1340 | 1340 | db_multi_exec( |
| 1341 | 1341 | "DELETE FROM config WHERE name IN " |
| 1342 | - "('favicon-image','favicon-mimetype')" | |
| 1342 | + "('icon-image','icon-mimetype')" | |
| 1343 | 1343 | ); |
| 1344 | 1344 | db_end_transaction(0); |
| 1345 | 1345 | cgi_redirect("setup_logo"); |
| 1346 | 1346 | } |
| 1347 | 1347 | style_header("Edit Project Logo And Background"); |
| @@ -1412,11 +1412,11 @@ | ||
| 1412 | 1412 | @ <input type="file" name="iconim" size="60" accept="image/*" /> |
| 1413 | 1413 | @ <p align="center"> |
| 1414 | 1414 | @ <input type="submit" name="seticon" value="Change Icon" /> |
| 1415 | 1415 | @ <input type="submit" name="clricon" value="Revert To Default" /></p> |
| 1416 | 1416 | @ </div></form> |
| 1417 | - @ <p>(Properties: "favicon-image" and "favicon-mimetype") | |
| 1417 | + @ <p>(Properties: "icon-image" and "icon-mimetype") | |
| 1418 | 1418 | @ <hr /> |
| 1419 | 1419 | @ |
| 1420 | 1420 | @ <p><span class="note">Note:</span> Your browser has probably cached these |
| 1421 | 1421 | @ images, so you may need to press the Reload button before changes will |
| 1422 | 1422 | @ take effect. </p> |
| 1423 | 1423 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1246,12 +1246,12 @@ | |
| 1246 | int szLogoImg = atoi(PD("logoim:bytes","0")); |
| 1247 | const char *zBgMtime = db_get_mtime("background-image", 0, 0); |
| 1248 | const char *zBgMime = db_get("background-mimetype","image/gif"); |
| 1249 | const char *aBgImg = P("bgim"); |
| 1250 | int szBgImg = atoi(PD("bgim:bytes","0")); |
| 1251 | const char *zIconMtime = db_get_mtime("favicon-image", 0, 0); |
| 1252 | const char *zIconMime = db_get("favicon-mimetype","image/gif"); |
| 1253 | const char *aIconImg = P("iconim"); |
| 1254 | int szIconImg = atoi(PD("iconim:bytes","0")); |
| 1255 | if( szLogoImg>0 ){ |
| 1256 | zLogoMime = PD("logoim:mimetype","image/gif"); |
| 1257 | } |
| @@ -1322,26 +1322,26 @@ | |
| 1322 | Blob img; |
| 1323 | Stmt ins; |
| 1324 | blob_init(&img, aIconImg, szIconImg); |
| 1325 | db_prepare(&ins, |
| 1326 | "REPLACE INTO config(name,value,mtime)" |
| 1327 | " VALUES('favicon-image',:bytes,now())" |
| 1328 | ); |
| 1329 | db_bind_blob(&ins, ":bytes", &img); |
| 1330 | db_step(&ins); |
| 1331 | db_finalize(&ins); |
| 1332 | db_multi_exec( |
| 1333 | "REPLACE INTO config(name,value,mtime)" |
| 1334 | " VALUES('favicon-mimetype',%Q,now())", |
| 1335 | zIconMime |
| 1336 | ); |
| 1337 | db_end_transaction(0); |
| 1338 | cgi_redirect("setup_logo"); |
| 1339 | }else if( P("clricon")!=0 ){ |
| 1340 | db_multi_exec( |
| 1341 | "DELETE FROM config WHERE name IN " |
| 1342 | "('favicon-image','favicon-mimetype')" |
| 1343 | ); |
| 1344 | db_end_transaction(0); |
| 1345 | cgi_redirect("setup_logo"); |
| 1346 | } |
| 1347 | style_header("Edit Project Logo And Background"); |
| @@ -1412,11 +1412,11 @@ | |
| 1412 | @ <input type="file" name="iconim" size="60" accept="image/*" /> |
| 1413 | @ <p align="center"> |
| 1414 | @ <input type="submit" name="seticon" value="Change Icon" /> |
| 1415 | @ <input type="submit" name="clricon" value="Revert To Default" /></p> |
| 1416 | @ </div></form> |
| 1417 | @ <p>(Properties: "favicon-image" and "favicon-mimetype") |
| 1418 | @ <hr /> |
| 1419 | @ |
| 1420 | @ <p><span class="note">Note:</span> Your browser has probably cached these |
| 1421 | @ images, so you may need to press the Reload button before changes will |
| 1422 | @ take effect. </p> |
| 1423 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1246,12 +1246,12 @@ | |
| 1246 | int szLogoImg = atoi(PD("logoim:bytes","0")); |
| 1247 | const char *zBgMtime = db_get_mtime("background-image", 0, 0); |
| 1248 | const char *zBgMime = db_get("background-mimetype","image/gif"); |
| 1249 | const char *aBgImg = P("bgim"); |
| 1250 | int szBgImg = atoi(PD("bgim:bytes","0")); |
| 1251 | const char *zIconMtime = db_get_mtime("icon-image", 0, 0); |
| 1252 | const char *zIconMime = db_get("icon-mimetype","image/gif"); |
| 1253 | const char *aIconImg = P("iconim"); |
| 1254 | int szIconImg = atoi(PD("iconim:bytes","0")); |
| 1255 | if( szLogoImg>0 ){ |
| 1256 | zLogoMime = PD("logoim:mimetype","image/gif"); |
| 1257 | } |
| @@ -1322,26 +1322,26 @@ | |
| 1322 | Blob img; |
| 1323 | Stmt ins; |
| 1324 | blob_init(&img, aIconImg, szIconImg); |
| 1325 | db_prepare(&ins, |
| 1326 | "REPLACE INTO config(name,value,mtime)" |
| 1327 | " VALUES('icon-image',:bytes,now())" |
| 1328 | ); |
| 1329 | db_bind_blob(&ins, ":bytes", &img); |
| 1330 | db_step(&ins); |
| 1331 | db_finalize(&ins); |
| 1332 | db_multi_exec( |
| 1333 | "REPLACE INTO config(name,value,mtime)" |
| 1334 | " VALUES('icon-mimetype',%Q,now())", |
| 1335 | zIconMime |
| 1336 | ); |
| 1337 | db_end_transaction(0); |
| 1338 | cgi_redirect("setup_logo"); |
| 1339 | }else if( P("clricon")!=0 ){ |
| 1340 | db_multi_exec( |
| 1341 | "DELETE FROM config WHERE name IN " |
| 1342 | "('icon-image','icon-mimetype')" |
| 1343 | ); |
| 1344 | db_end_transaction(0); |
| 1345 | cgi_redirect("setup_logo"); |
| 1346 | } |
| 1347 | style_header("Edit Project Logo And Background"); |
| @@ -1412,11 +1412,11 @@ | |
| 1412 | @ <input type="file" name="iconim" size="60" accept="image/*" /> |
| 1413 | @ <p align="center"> |
| 1414 | @ <input type="submit" name="seticon" value="Change Icon" /> |
| 1415 | @ <input type="submit" name="clricon" value="Revert To Default" /></p> |
| 1416 | @ </div></form> |
| 1417 | @ <p>(Properties: "icon-image" and "icon-mimetype") |
| 1418 | @ <hr /> |
| 1419 | @ |
| 1420 | @ <p><span class="note">Note:</span> Your browser has probably cached these |
| 1421 | @ images, so you may need to press the Reload button before changes will |
| 1422 | @ take effect. </p> |
| 1423 |