Fossil SCM
Improvements to the skin_id() routine.
Commit
56ad55415fb2d3e66805736ccd445805e350036286b3f15a38c1b0c0bbec3b6d
Parent
7dd07b2e0120156…
1 file changed
+4
-1
+4
-1
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -281,10 +281,13 @@ | ||
| 281 | 281 | ** Return an identifier that is (probably) different for every skin |
| 282 | 282 | ** but that is (probably) the same if the skin is unchanged. This |
| 283 | 283 | ** identifier can be attached to resource URLs to force reloading when |
| 284 | 284 | ** the resources change but allow the resources to be read from cache |
| 285 | 285 | ** as long as they are unchanged. |
| 286 | +** | |
| 287 | +** The zResource argument is the name of a CONFIG setting that | |
| 288 | +** defines the resource. Examples: "css", "logo", "background". | |
| 286 | 289 | */ |
| 287 | 290 | unsigned int skin_id(const char *zResource){ |
| 288 | 291 | unsigned int h = 0; |
| 289 | 292 | if( zAltSkinDir ){ |
| 290 | 293 | h = skin_hash(0, zAltSkinDir); |
| @@ -293,11 +296,11 @@ | ||
| 293 | 296 | }else{ |
| 294 | 297 | char *zMTime = db_get_mtime(zResource, 0, 0); |
| 295 | 298 | h = skin_hash(0, zMTime); |
| 296 | 299 | fossil_free(zMTime); |
| 297 | 300 | } |
| 298 | - h = skin_hash(h, MANIFEST_UUID); | |
| 301 | + h = skin_hash(h, fossil_exe_id()); | |
| 299 | 302 | return h; |
| 300 | 303 | } |
| 301 | 304 | |
| 302 | 305 | /* |
| 303 | 306 | ** For a skin named zSkinName, compute the name of the CONFIG table |
| 304 | 307 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -281,10 +281,13 @@ | |
| 281 | ** Return an identifier that is (probably) different for every skin |
| 282 | ** but that is (probably) the same if the skin is unchanged. This |
| 283 | ** identifier can be attached to resource URLs to force reloading when |
| 284 | ** the resources change but allow the resources to be read from cache |
| 285 | ** as long as they are unchanged. |
| 286 | */ |
| 287 | unsigned int skin_id(const char *zResource){ |
| 288 | unsigned int h = 0; |
| 289 | if( zAltSkinDir ){ |
| 290 | h = skin_hash(0, zAltSkinDir); |
| @@ -293,11 +296,11 @@ | |
| 293 | }else{ |
| 294 | char *zMTime = db_get_mtime(zResource, 0, 0); |
| 295 | h = skin_hash(0, zMTime); |
| 296 | fossil_free(zMTime); |
| 297 | } |
| 298 | h = skin_hash(h, MANIFEST_UUID); |
| 299 | return h; |
| 300 | } |
| 301 | |
| 302 | /* |
| 303 | ** For a skin named zSkinName, compute the name of the CONFIG table |
| 304 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -281,10 +281,13 @@ | |
| 281 | ** Return an identifier that is (probably) different for every skin |
| 282 | ** but that is (probably) the same if the skin is unchanged. This |
| 283 | ** identifier can be attached to resource URLs to force reloading when |
| 284 | ** the resources change but allow the resources to be read from cache |
| 285 | ** as long as they are unchanged. |
| 286 | ** |
| 287 | ** The zResource argument is the name of a CONFIG setting that |
| 288 | ** defines the resource. Examples: "css", "logo", "background". |
| 289 | */ |
| 290 | unsigned int skin_id(const char *zResource){ |
| 291 | unsigned int h = 0; |
| 292 | if( zAltSkinDir ){ |
| 293 | h = skin_hash(0, zAltSkinDir); |
| @@ -293,11 +296,11 @@ | |
| 296 | }else{ |
| 297 | char *zMTime = db_get_mtime(zResource, 0, 0); |
| 298 | h = skin_hash(0, zMTime); |
| 299 | fossil_free(zMTime); |
| 300 | } |
| 301 | h = skin_hash(h, fossil_exe_id()); |
| 302 | return h; |
| 303 | } |
| 304 | |
| 305 | /* |
| 306 | ** For a skin named zSkinName, compute the name of the CONFIG table |
| 307 |