Fossil SCM
Merge old tagview branch into this branch
Commit
070e63db3362346be6782a270135c950434e7518
Parent
3984b1b2c117b7b…
6 files changed
+12
-4
+12
-4
+9
-3
+9
-3
+3
-3
+3
-3
+12
-4
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -200,13 +200,15 @@ | ||
| 200 | 200 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 201 | 201 | ){ |
| 202 | 202 | if( zPath==0 ) zPath = g.zTop; |
| 203 | 203 | if( lifetime>0 ){ |
| 204 | 204 | lifetime += (int)time(0); |
| 205 | + char * zDate = cgi_rfc822_datestamp(lifetime); | |
| 205 | 206 | blob_appendf(&extraHeader, |
| 206 | - "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", | |
| 207 | - zName, zValue, zPath, cgi_rfc822_datestamp(lifetime)); | |
| 207 | + "Set-Cookie: %s=%t; Path=%s; expires=%z; Version=1\r\n", | |
| 208 | + zName, zValue, zPath, zDate); | |
| 209 | + if( zDate[0] ) free( zDate ); | |
| 208 | 210 | }else{ |
| 209 | 211 | blob_appendf(&extraHeader, |
| 210 | 212 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 211 | 213 | zName, zValue, zPath); |
| 212 | 214 | } |
| @@ -286,11 +288,13 @@ | ||
| 286 | 288 | } |
| 287 | 289 | #endif |
| 288 | 290 | |
| 289 | 291 | if( g.fullHttpReply ){ |
| 290 | 292 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | - fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0))); | |
| 293 | + char * zDate = cgi_rfc822_datestamp(time(0)); | |
| 294 | + fprintf(g.httpOut, "Date: %s\r\n", zDate ); | |
| 295 | + if( zDate[0] ) free( zDate ); | |
| 292 | 296 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 293 | 297 | }else{ |
| 294 | 298 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 295 | 299 | } |
| 296 | 300 | |
| @@ -307,11 +311,13 @@ | ||
| 307 | 311 | ** stale cache is the least of the problem. So we provide an Expires |
| 308 | 312 | ** header set to a reasonable period (default: one week). |
| 309 | 313 | */ |
| 310 | 314 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 311 | 315 | time_t expires = time(0) + 604800; |
| 312 | - fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); | |
| 316 | + char * zDate = cgi_rfc822_datestamp(expires); | |
| 317 | + fprintf(g.httpOut, "Expires: %s\r\n", zDate ); | |
| 318 | + if( zDate[0] ) free( zDate ); | |
| 313 | 319 | } |
| 314 | 320 | |
| 315 | 321 | /* Content intended for logged in users should only be cached in |
| 316 | 322 | ** the browser, not some shared location. |
| 317 | 323 | */ |
| @@ -1267,10 +1273,12 @@ | ||
| 1267 | 1273 | |
| 1268 | 1274 | /* |
| 1269 | 1275 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1270 | 1276 | ** other things. |
| 1271 | 1277 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1278 | +** The returned string is allocated with malloc() and must be freed | |
| 1279 | +** with free(). | |
| 1272 | 1280 | ** |
| 1273 | 1281 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1274 | 1282 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1275 | 1283 | */ |
| 1276 | 1284 | char *cgi_rfc822_datestamp(time_t now){ |
| 1277 | 1285 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -200,13 +200,15 @@ | |
| 200 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 201 | ){ |
| 202 | if( zPath==0 ) zPath = g.zTop; |
| 203 | if( lifetime>0 ){ |
| 204 | lifetime += (int)time(0); |
| 205 | blob_appendf(&extraHeader, |
| 206 | "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", |
| 207 | zName, zValue, zPath, cgi_rfc822_datestamp(lifetime)); |
| 208 | }else{ |
| 209 | blob_appendf(&extraHeader, |
| 210 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 211 | zName, zValue, zPath); |
| 212 | } |
| @@ -286,11 +288,13 @@ | |
| 286 | } |
| 287 | #endif |
| 288 | |
| 289 | if( g.fullHttpReply ){ |
| 290 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0))); |
| 292 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 293 | }else{ |
| 294 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 295 | } |
| 296 | |
| @@ -307,11 +311,13 @@ | |
| 307 | ** stale cache is the least of the problem. So we provide an Expires |
| 308 | ** header set to a reasonable period (default: one week). |
| 309 | */ |
| 310 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 311 | time_t expires = time(0) + 604800; |
| 312 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 313 | } |
| 314 | |
| 315 | /* Content intended for logged in users should only be cached in |
| 316 | ** the browser, not some shared location. |
| 317 | */ |
| @@ -1267,10 +1273,12 @@ | |
| 1267 | |
| 1268 | /* |
| 1269 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1270 | ** other things. |
| 1271 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1272 | ** |
| 1273 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1274 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1275 | */ |
| 1276 | char *cgi_rfc822_datestamp(time_t now){ |
| 1277 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -200,13 +200,15 @@ | |
| 200 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 201 | ){ |
| 202 | if( zPath==0 ) zPath = g.zTop; |
| 203 | if( lifetime>0 ){ |
| 204 | lifetime += (int)time(0); |
| 205 | char * zDate = cgi_rfc822_datestamp(lifetime); |
| 206 | blob_appendf(&extraHeader, |
| 207 | "Set-Cookie: %s=%t; Path=%s; expires=%z; Version=1\r\n", |
| 208 | zName, zValue, zPath, zDate); |
| 209 | if( zDate[0] ) free( zDate ); |
| 210 | }else{ |
| 211 | blob_appendf(&extraHeader, |
| 212 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 213 | zName, zValue, zPath); |
| 214 | } |
| @@ -286,11 +288,13 @@ | |
| 288 | } |
| 289 | #endif |
| 290 | |
| 291 | if( g.fullHttpReply ){ |
| 292 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 293 | char * zDate = cgi_rfc822_datestamp(time(0)); |
| 294 | fprintf(g.httpOut, "Date: %s\r\n", zDate ); |
| 295 | if( zDate[0] ) free( zDate ); |
| 296 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 297 | }else{ |
| 298 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 299 | } |
| 300 | |
| @@ -307,11 +311,13 @@ | |
| 311 | ** stale cache is the least of the problem. So we provide an Expires |
| 312 | ** header set to a reasonable period (default: one week). |
| 313 | */ |
| 314 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 315 | time_t expires = time(0) + 604800; |
| 316 | char * zDate = cgi_rfc822_datestamp(expires); |
| 317 | fprintf(g.httpOut, "Expires: %s\r\n", zDate ); |
| 318 | if( zDate[0] ) free( zDate ); |
| 319 | } |
| 320 | |
| 321 | /* Content intended for logged in users should only be cached in |
| 322 | ** the browser, not some shared location. |
| 323 | */ |
| @@ -1267,10 +1273,12 @@ | |
| 1273 | |
| 1274 | /* |
| 1275 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1276 | ** other things. |
| 1277 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1278 | ** The returned string is allocated with malloc() and must be freed |
| 1279 | ** with free(). |
| 1280 | ** |
| 1281 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1282 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1283 | */ |
| 1284 | char *cgi_rfc822_datestamp(time_t now){ |
| 1285 |
+12
-4
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -200,13 +200,15 @@ | ||
| 200 | 200 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 201 | 201 | ){ |
| 202 | 202 | if( zPath==0 ) zPath = g.zTop; |
| 203 | 203 | if( lifetime>0 ){ |
| 204 | 204 | lifetime += (int)time(0); |
| 205 | + char * zDate = cgi_rfc822_datestamp(lifetime); | |
| 205 | 206 | blob_appendf(&extraHeader, |
| 206 | - "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", | |
| 207 | - zName, zValue, zPath, cgi_rfc822_datestamp(lifetime)); | |
| 207 | + "Set-Cookie: %s=%t; Path=%s; expires=%z; Version=1\r\n", | |
| 208 | + zName, zValue, zPath, zDate); | |
| 209 | + if( zDate[0] ) free( zDate ); | |
| 208 | 210 | }else{ |
| 209 | 211 | blob_appendf(&extraHeader, |
| 210 | 212 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 211 | 213 | zName, zValue, zPath); |
| 212 | 214 | } |
| @@ -286,11 +288,13 @@ | ||
| 286 | 288 | } |
| 287 | 289 | #endif |
| 288 | 290 | |
| 289 | 291 | if( g.fullHttpReply ){ |
| 290 | 292 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | - fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0))); | |
| 293 | + char * zDate = cgi_rfc822_datestamp(time(0)); | |
| 294 | + fprintf(g.httpOut, "Date: %s\r\n", zDate ); | |
| 295 | + if( zDate[0] ) free( zDate ); | |
| 292 | 296 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 293 | 297 | }else{ |
| 294 | 298 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 295 | 299 | } |
| 296 | 300 | |
| @@ -307,11 +311,13 @@ | ||
| 307 | 311 | ** stale cache is the least of the problem. So we provide an Expires |
| 308 | 312 | ** header set to a reasonable period (default: one week). |
| 309 | 313 | */ |
| 310 | 314 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 311 | 315 | time_t expires = time(0) + 604800; |
| 312 | - fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); | |
| 316 | + char * zDate = cgi_rfc822_datestamp(expires); | |
| 317 | + fprintf(g.httpOut, "Expires: %s\r\n", zDate ); | |
| 318 | + if( zDate[0] ) free( zDate ); | |
| 313 | 319 | } |
| 314 | 320 | |
| 315 | 321 | /* Content intended for logged in users should only be cached in |
| 316 | 322 | ** the browser, not some shared location. |
| 317 | 323 | */ |
| @@ -1267,10 +1273,12 @@ | ||
| 1267 | 1273 | |
| 1268 | 1274 | /* |
| 1269 | 1275 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1270 | 1276 | ** other things. |
| 1271 | 1277 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1278 | +** The returned string is allocated with malloc() and must be freed | |
| 1279 | +** with free(). | |
| 1272 | 1280 | ** |
| 1273 | 1281 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1274 | 1282 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1275 | 1283 | */ |
| 1276 | 1284 | char *cgi_rfc822_datestamp(time_t now){ |
| 1277 | 1285 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -200,13 +200,15 @@ | |
| 200 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 201 | ){ |
| 202 | if( zPath==0 ) zPath = g.zTop; |
| 203 | if( lifetime>0 ){ |
| 204 | lifetime += (int)time(0); |
| 205 | blob_appendf(&extraHeader, |
| 206 | "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", |
| 207 | zName, zValue, zPath, cgi_rfc822_datestamp(lifetime)); |
| 208 | }else{ |
| 209 | blob_appendf(&extraHeader, |
| 210 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 211 | zName, zValue, zPath); |
| 212 | } |
| @@ -286,11 +288,13 @@ | |
| 286 | } |
| 287 | #endif |
| 288 | |
| 289 | if( g.fullHttpReply ){ |
| 290 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0))); |
| 292 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 293 | }else{ |
| 294 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 295 | } |
| 296 | |
| @@ -307,11 +311,13 @@ | |
| 307 | ** stale cache is the least of the problem. So we provide an Expires |
| 308 | ** header set to a reasonable period (default: one week). |
| 309 | */ |
| 310 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 311 | time_t expires = time(0) + 604800; |
| 312 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 313 | } |
| 314 | |
| 315 | /* Content intended for logged in users should only be cached in |
| 316 | ** the browser, not some shared location. |
| 317 | */ |
| @@ -1267,10 +1273,12 @@ | |
| 1267 | |
| 1268 | /* |
| 1269 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1270 | ** other things. |
| 1271 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1272 | ** |
| 1273 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1274 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1275 | */ |
| 1276 | char *cgi_rfc822_datestamp(time_t now){ |
| 1277 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -200,13 +200,15 @@ | |
| 200 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 201 | ){ |
| 202 | if( zPath==0 ) zPath = g.zTop; |
| 203 | if( lifetime>0 ){ |
| 204 | lifetime += (int)time(0); |
| 205 | char * zDate = cgi_rfc822_datestamp(lifetime); |
| 206 | blob_appendf(&extraHeader, |
| 207 | "Set-Cookie: %s=%t; Path=%s; expires=%z; Version=1\r\n", |
| 208 | zName, zValue, zPath, zDate); |
| 209 | if( zDate[0] ) free( zDate ); |
| 210 | }else{ |
| 211 | blob_appendf(&extraHeader, |
| 212 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 213 | zName, zValue, zPath); |
| 214 | } |
| @@ -286,11 +288,13 @@ | |
| 288 | } |
| 289 | #endif |
| 290 | |
| 291 | if( g.fullHttpReply ){ |
| 292 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 293 | char * zDate = cgi_rfc822_datestamp(time(0)); |
| 294 | fprintf(g.httpOut, "Date: %s\r\n", zDate ); |
| 295 | if( zDate[0] ) free( zDate ); |
| 296 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 297 | }else{ |
| 298 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 299 | } |
| 300 | |
| @@ -307,11 +311,13 @@ | |
| 311 | ** stale cache is the least of the problem. So we provide an Expires |
| 312 | ** header set to a reasonable period (default: one week). |
| 313 | */ |
| 314 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 315 | time_t expires = time(0) + 604800; |
| 316 | char * zDate = cgi_rfc822_datestamp(expires); |
| 317 | fprintf(g.httpOut, "Expires: %s\r\n", zDate ); |
| 318 | if( zDate[0] ) free( zDate ); |
| 319 | } |
| 320 | |
| 321 | /* Content intended for logged in users should only be cached in |
| 322 | ** the browser, not some shared location. |
| 323 | */ |
| @@ -1267,10 +1273,12 @@ | |
| 1273 | |
| 1274 | /* |
| 1275 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1276 | ** other things. |
| 1277 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1278 | ** The returned string is allocated with malloc() and must be freed |
| 1279 | ** with free(). |
| 1280 | ** |
| 1281 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1282 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1283 | */ |
| 1284 | char *cgi_rfc822_datestamp(time_t now){ |
| 1285 |
+9
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -82,11 +82,11 @@ | ||
| 82 | 82 | void style_header(const char *zTitleFormat, ...){ |
| 83 | 83 | va_list ap; |
| 84 | 84 | char *zTitle; |
| 85 | 85 | const char *zHeader = db_get("header", (char*)zDefaultHeader); |
| 86 | 86 | login_check_credentials(); |
| 87 | - | |
| 87 | + | |
| 88 | 88 | va_start(ap, zTitleFormat); |
| 89 | 89 | zTitle = vmprintf(zTitleFormat, ap); |
| 90 | 90 | va_end(ap); |
| 91 | 91 | |
| 92 | 92 | cgi_destination(CGI_HEADER); |
| @@ -112,13 +112,13 @@ | ||
| 112 | 112 | /* |
| 113 | 113 | ** Draw the footer at the bottom of the page. |
| 114 | 114 | */ |
| 115 | 115 | void style_footer(void){ |
| 116 | 116 | const char *zFooter; |
| 117 | - | |
| 117 | + | |
| 118 | 118 | if( !headerHasBeenGenerated ) return; |
| 119 | - | |
| 119 | + | |
| 120 | 120 | /* Go back and put the submenu at the top of the page. We delay the |
| 121 | 121 | ** creation of the submenu until the end so that we can add elements |
| 122 | 122 | ** to the submenu while generating page text. |
| 123 | 123 | */ |
| 124 | 124 | cgi_destination(CGI_HEADER); |
| @@ -326,10 +326,16 @@ | ||
| 326 | 326 | @ padding: 5px 10px 5px 10px; |
| 327 | 327 | @ text-align: right; |
| 328 | 328 | @ background-color: #558195; |
| 329 | 329 | @ color: white; |
| 330 | 330 | @ } |
| 331 | +@ | |
| 332 | +@ /* Make the links in the footer less ugly... */ | |
| 333 | +@ div.footer a { color: white; } | |
| 334 | +@ div.footer a:link { color: white; } | |
| 335 | +@ div.footer a:visited { color: white; } | |
| 336 | +@ div.footer a:hover { background-color: white; color: #558195; } | |
| 331 | 337 | @ |
| 332 | 338 | @ /* <verbatim> blocks */ |
| 333 | 339 | @ pre.verbatim { |
| 334 | 340 | @ background-color: #f5f5f5; |
| 335 | 341 | @ padding: 0.5em; |
| 336 | 342 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -82,11 +82,11 @@ | |
| 82 | void style_header(const char *zTitleFormat, ...){ |
| 83 | va_list ap; |
| 84 | char *zTitle; |
| 85 | const char *zHeader = db_get("header", (char*)zDefaultHeader); |
| 86 | login_check_credentials(); |
| 87 | |
| 88 | va_start(ap, zTitleFormat); |
| 89 | zTitle = vmprintf(zTitleFormat, ap); |
| 90 | va_end(ap); |
| 91 | |
| 92 | cgi_destination(CGI_HEADER); |
| @@ -112,13 +112,13 @@ | |
| 112 | /* |
| 113 | ** Draw the footer at the bottom of the page. |
| 114 | */ |
| 115 | void style_footer(void){ |
| 116 | const char *zFooter; |
| 117 | |
| 118 | if( !headerHasBeenGenerated ) return; |
| 119 | |
| 120 | /* Go back and put the submenu at the top of the page. We delay the |
| 121 | ** creation of the submenu until the end so that we can add elements |
| 122 | ** to the submenu while generating page text. |
| 123 | */ |
| 124 | cgi_destination(CGI_HEADER); |
| @@ -326,10 +326,16 @@ | |
| 326 | @ padding: 5px 10px 5px 10px; |
| 327 | @ text-align: right; |
| 328 | @ background-color: #558195; |
| 329 | @ color: white; |
| 330 | @ } |
| 331 | @ |
| 332 | @ /* <verbatim> blocks */ |
| 333 | @ pre.verbatim { |
| 334 | @ background-color: #f5f5f5; |
| 335 | @ padding: 0.5em; |
| 336 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -82,11 +82,11 @@ | |
| 82 | void style_header(const char *zTitleFormat, ...){ |
| 83 | va_list ap; |
| 84 | char *zTitle; |
| 85 | const char *zHeader = db_get("header", (char*)zDefaultHeader); |
| 86 | login_check_credentials(); |
| 87 | |
| 88 | va_start(ap, zTitleFormat); |
| 89 | zTitle = vmprintf(zTitleFormat, ap); |
| 90 | va_end(ap); |
| 91 | |
| 92 | cgi_destination(CGI_HEADER); |
| @@ -112,13 +112,13 @@ | |
| 112 | /* |
| 113 | ** Draw the footer at the bottom of the page. |
| 114 | */ |
| 115 | void style_footer(void){ |
| 116 | const char *zFooter; |
| 117 | |
| 118 | if( !headerHasBeenGenerated ) return; |
| 119 | |
| 120 | /* Go back and put the submenu at the top of the page. We delay the |
| 121 | ** creation of the submenu until the end so that we can add elements |
| 122 | ** to the submenu while generating page text. |
| 123 | */ |
| 124 | cgi_destination(CGI_HEADER); |
| @@ -326,10 +326,16 @@ | |
| 326 | @ padding: 5px 10px 5px 10px; |
| 327 | @ text-align: right; |
| 328 | @ background-color: #558195; |
| 329 | @ color: white; |
| 330 | @ } |
| 331 | @ |
| 332 | @ /* Make the links in the footer less ugly... */ |
| 333 | @ div.footer a { color: white; } |
| 334 | @ div.footer a:link { color: white; } |
| 335 | @ div.footer a:visited { color: white; } |
| 336 | @ div.footer a:hover { background-color: white; color: #558195; } |
| 337 | @ |
| 338 | @ /* <verbatim> blocks */ |
| 339 | @ pre.verbatim { |
| 340 | @ background-color: #f5f5f5; |
| 341 | @ padding: 0.5em; |
| 342 |
+9
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -82,11 +82,11 @@ | ||
| 82 | 82 | void style_header(const char *zTitleFormat, ...){ |
| 83 | 83 | va_list ap; |
| 84 | 84 | char *zTitle; |
| 85 | 85 | const char *zHeader = db_get("header", (char*)zDefaultHeader); |
| 86 | 86 | login_check_credentials(); |
| 87 | - | |
| 87 | + | |
| 88 | 88 | va_start(ap, zTitleFormat); |
| 89 | 89 | zTitle = vmprintf(zTitleFormat, ap); |
| 90 | 90 | va_end(ap); |
| 91 | 91 | |
| 92 | 92 | cgi_destination(CGI_HEADER); |
| @@ -112,13 +112,13 @@ | ||
| 112 | 112 | /* |
| 113 | 113 | ** Draw the footer at the bottom of the page. |
| 114 | 114 | */ |
| 115 | 115 | void style_footer(void){ |
| 116 | 116 | const char *zFooter; |
| 117 | - | |
| 117 | + | |
| 118 | 118 | if( !headerHasBeenGenerated ) return; |
| 119 | - | |
| 119 | + | |
| 120 | 120 | /* Go back and put the submenu at the top of the page. We delay the |
| 121 | 121 | ** creation of the submenu until the end so that we can add elements |
| 122 | 122 | ** to the submenu while generating page text. |
| 123 | 123 | */ |
| 124 | 124 | cgi_destination(CGI_HEADER); |
| @@ -326,10 +326,16 @@ | ||
| 326 | 326 | @ padding: 5px 10px 5px 10px; |
| 327 | 327 | @ text-align: right; |
| 328 | 328 | @ background-color: #558195; |
| 329 | 329 | @ color: white; |
| 330 | 330 | @ } |
| 331 | +@ | |
| 332 | +@ /* Make the links in the footer less ugly... */ | |
| 333 | +@ div.footer a { color: white; } | |
| 334 | +@ div.footer a:link { color: white; } | |
| 335 | +@ div.footer a:visited { color: white; } | |
| 336 | +@ div.footer a:hover { background-color: white; color: #558195; } | |
| 331 | 337 | @ |
| 332 | 338 | @ /* <verbatim> blocks */ |
| 333 | 339 | @ pre.verbatim { |
| 334 | 340 | @ background-color: #f5f5f5; |
| 335 | 341 | @ padding: 0.5em; |
| 336 | 342 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -82,11 +82,11 @@ | |
| 82 | void style_header(const char *zTitleFormat, ...){ |
| 83 | va_list ap; |
| 84 | char *zTitle; |
| 85 | const char *zHeader = db_get("header", (char*)zDefaultHeader); |
| 86 | login_check_credentials(); |
| 87 | |
| 88 | va_start(ap, zTitleFormat); |
| 89 | zTitle = vmprintf(zTitleFormat, ap); |
| 90 | va_end(ap); |
| 91 | |
| 92 | cgi_destination(CGI_HEADER); |
| @@ -112,13 +112,13 @@ | |
| 112 | /* |
| 113 | ** Draw the footer at the bottom of the page. |
| 114 | */ |
| 115 | void style_footer(void){ |
| 116 | const char *zFooter; |
| 117 | |
| 118 | if( !headerHasBeenGenerated ) return; |
| 119 | |
| 120 | /* Go back and put the submenu at the top of the page. We delay the |
| 121 | ** creation of the submenu until the end so that we can add elements |
| 122 | ** to the submenu while generating page text. |
| 123 | */ |
| 124 | cgi_destination(CGI_HEADER); |
| @@ -326,10 +326,16 @@ | |
| 326 | @ padding: 5px 10px 5px 10px; |
| 327 | @ text-align: right; |
| 328 | @ background-color: #558195; |
| 329 | @ color: white; |
| 330 | @ } |
| 331 | @ |
| 332 | @ /* <verbatim> blocks */ |
| 333 | @ pre.verbatim { |
| 334 | @ background-color: #f5f5f5; |
| 335 | @ padding: 0.5em; |
| 336 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -82,11 +82,11 @@ | |
| 82 | void style_header(const char *zTitleFormat, ...){ |
| 83 | va_list ap; |
| 84 | char *zTitle; |
| 85 | const char *zHeader = db_get("header", (char*)zDefaultHeader); |
| 86 | login_check_credentials(); |
| 87 | |
| 88 | va_start(ap, zTitleFormat); |
| 89 | zTitle = vmprintf(zTitleFormat, ap); |
| 90 | va_end(ap); |
| 91 | |
| 92 | cgi_destination(CGI_HEADER); |
| @@ -112,13 +112,13 @@ | |
| 112 | /* |
| 113 | ** Draw the footer at the bottom of the page. |
| 114 | */ |
| 115 | void style_footer(void){ |
| 116 | const char *zFooter; |
| 117 | |
| 118 | if( !headerHasBeenGenerated ) return; |
| 119 | |
| 120 | /* Go back and put the submenu at the top of the page. We delay the |
| 121 | ** creation of the submenu until the end so that we can add elements |
| 122 | ** to the submenu while generating page text. |
| 123 | */ |
| 124 | cgi_destination(CGI_HEADER); |
| @@ -326,10 +326,16 @@ | |
| 326 | @ padding: 5px 10px 5px 10px; |
| 327 | @ text-align: right; |
| 328 | @ background-color: #558195; |
| 329 | @ color: white; |
| 330 | @ } |
| 331 | @ |
| 332 | @ /* Make the links in the footer less ugly... */ |
| 333 | @ div.footer a { color: white; } |
| 334 | @ div.footer a:link { color: white; } |
| 335 | @ div.footer a:visited { color: white; } |
| 336 | @ div.footer a:hover { background-color: white; color: #558195; } |
| 337 | @ |
| 338 | @ /* <verbatim> blocks */ |
| 339 | @ pre.verbatim { |
| 340 | @ background-color: #f5f5f5; |
| 341 | @ padding: 0.5em; |
| 342 |
+3
-3
| --- src/tagview.c | ||
| +++ src/tagview.c | ||
| @@ -60,11 +60,11 @@ | ||
| 60 | 60 | " linktagid(t.tagid) AS 'Tag ID'," |
| 61 | 61 | " linktagname(t.tagname) AS 'Name'," |
| 62 | 62 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 63 | 63 | " linkuuid(b.uuid) AS 'Version'" |
| 64 | 64 | " FROM tag t, tagxref tx, blob b " |
| 65 | - " WHERE t.tagid=tx.tagid AND tx.srcid=b.rid" | |
| 65 | + " WHERE t.tagid=tx.tagid AND tx.rid=b.rid" | |
| 66 | 66 | " AND tx.tagtype!=0 %s " |
| 67 | 67 | TAGVIEW_DEFAULT_FILTER |
| 68 | 68 | " ORDER BY tx.mtime DESC %s", |
| 69 | 69 | zLikeClause, zLimit |
| 70 | 70 | ); |
| @@ -105,11 +105,11 @@ | ||
| 105 | 105 | "SELECT DISTINCT" |
| 106 | 106 | " linktagname(t.tagname) AS 'Tag Name'," |
| 107 | 107 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 108 | 108 | " linkuuid(b.uuid) AS 'Version'" |
| 109 | 109 | " FROM tag t, tagxref tx, blob b" |
| 110 | - " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.srcid=b.rid " | |
| 110 | + " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.rid=b.rid " | |
| 111 | 111 | TAGVIEW_DEFAULT_FILTER |
| 112 | 112 | " ORDER BY tx.mtime DESC", |
| 113 | 113 | tagid |
| 114 | 114 | ); |
| 115 | 115 | db_generic_query_view(zSql, 1); |
| @@ -126,11 +126,11 @@ | ||
| 126 | 126 | "SELECT DISTINCT" |
| 127 | 127 | " linktagid(t.tagid) AS 'Tag ID'," |
| 128 | 128 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 129 | 129 | " linkuuid(b.uuid) AS 'Version'" |
| 130 | 130 | " FROM tag t, tagxref tx, blob b " |
| 131 | - " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.srcid=b.rid " | |
| 131 | + " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.rid=b.rid " | |
| 132 | 132 | TAGVIEW_DEFAULT_FILTER |
| 133 | 133 | " ORDER BY tx.mtime DESC", |
| 134 | 134 | tagname); |
| 135 | 135 | db_generic_query_view(zSql, 1); |
| 136 | 136 | free(zSql); |
| 137 | 137 |
| --- src/tagview.c | |
| +++ src/tagview.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | " linktagid(t.tagid) AS 'Tag ID'," |
| 61 | " linktagname(t.tagname) AS 'Name'," |
| 62 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 63 | " linkuuid(b.uuid) AS 'Version'" |
| 64 | " FROM tag t, tagxref tx, blob b " |
| 65 | " WHERE t.tagid=tx.tagid AND tx.srcid=b.rid" |
| 66 | " AND tx.tagtype!=0 %s " |
| 67 | TAGVIEW_DEFAULT_FILTER |
| 68 | " ORDER BY tx.mtime DESC %s", |
| 69 | zLikeClause, zLimit |
| 70 | ); |
| @@ -105,11 +105,11 @@ | |
| 105 | "SELECT DISTINCT" |
| 106 | " linktagname(t.tagname) AS 'Tag Name'," |
| 107 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 108 | " linkuuid(b.uuid) AS 'Version'" |
| 109 | " FROM tag t, tagxref tx, blob b" |
| 110 | " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.srcid=b.rid " |
| 111 | TAGVIEW_DEFAULT_FILTER |
| 112 | " ORDER BY tx.mtime DESC", |
| 113 | tagid |
| 114 | ); |
| 115 | db_generic_query_view(zSql, 1); |
| @@ -126,11 +126,11 @@ | |
| 126 | "SELECT DISTINCT" |
| 127 | " linktagid(t.tagid) AS 'Tag ID'," |
| 128 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 129 | " linkuuid(b.uuid) AS 'Version'" |
| 130 | " FROM tag t, tagxref tx, blob b " |
| 131 | " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.srcid=b.rid " |
| 132 | TAGVIEW_DEFAULT_FILTER |
| 133 | " ORDER BY tx.mtime DESC", |
| 134 | tagname); |
| 135 | db_generic_query_view(zSql, 1); |
| 136 | free(zSql); |
| 137 |
| --- src/tagview.c | |
| +++ src/tagview.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | " linktagid(t.tagid) AS 'Tag ID'," |
| 61 | " linktagname(t.tagname) AS 'Name'," |
| 62 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 63 | " linkuuid(b.uuid) AS 'Version'" |
| 64 | " FROM tag t, tagxref tx, blob b " |
| 65 | " WHERE t.tagid=tx.tagid AND tx.rid=b.rid" |
| 66 | " AND tx.tagtype!=0 %s " |
| 67 | TAGVIEW_DEFAULT_FILTER |
| 68 | " ORDER BY tx.mtime DESC %s", |
| 69 | zLikeClause, zLimit |
| 70 | ); |
| @@ -105,11 +105,11 @@ | |
| 105 | "SELECT DISTINCT" |
| 106 | " linktagname(t.tagname) AS 'Tag Name'," |
| 107 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 108 | " linkuuid(b.uuid) AS 'Version'" |
| 109 | " FROM tag t, tagxref tx, blob b" |
| 110 | " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.rid=b.rid " |
| 111 | TAGVIEW_DEFAULT_FILTER |
| 112 | " ORDER BY tx.mtime DESC", |
| 113 | tagid |
| 114 | ); |
| 115 | db_generic_query_view(zSql, 1); |
| @@ -126,11 +126,11 @@ | |
| 126 | "SELECT DISTINCT" |
| 127 | " linktagid(t.tagid) AS 'Tag ID'," |
| 128 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 129 | " linkuuid(b.uuid) AS 'Version'" |
| 130 | " FROM tag t, tagxref tx, blob b " |
| 131 | " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.rid=b.rid " |
| 132 | TAGVIEW_DEFAULT_FILTER |
| 133 | " ORDER BY tx.mtime DESC", |
| 134 | tagname); |
| 135 | db_generic_query_view(zSql, 1); |
| 136 | free(zSql); |
| 137 |
+3
-3
| --- src/tagview.c | ||
| +++ src/tagview.c | ||
| @@ -60,11 +60,11 @@ | ||
| 60 | 60 | " linktagid(t.tagid) AS 'Tag ID'," |
| 61 | 61 | " linktagname(t.tagname) AS 'Name'," |
| 62 | 62 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 63 | 63 | " linkuuid(b.uuid) AS 'Version'" |
| 64 | 64 | " FROM tag t, tagxref tx, blob b " |
| 65 | - " WHERE t.tagid=tx.tagid AND tx.srcid=b.rid" | |
| 65 | + " WHERE t.tagid=tx.tagid AND tx.rid=b.rid" | |
| 66 | 66 | " AND tx.tagtype!=0 %s " |
| 67 | 67 | TAGVIEW_DEFAULT_FILTER |
| 68 | 68 | " ORDER BY tx.mtime DESC %s", |
| 69 | 69 | zLikeClause, zLimit |
| 70 | 70 | ); |
| @@ -105,11 +105,11 @@ | ||
| 105 | 105 | "SELECT DISTINCT" |
| 106 | 106 | " linktagname(t.tagname) AS 'Tag Name'," |
| 107 | 107 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 108 | 108 | " linkuuid(b.uuid) AS 'Version'" |
| 109 | 109 | " FROM tag t, tagxref tx, blob b" |
| 110 | - " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.srcid=b.rid " | |
| 110 | + " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.rid=b.rid " | |
| 111 | 111 | TAGVIEW_DEFAULT_FILTER |
| 112 | 112 | " ORDER BY tx.mtime DESC", |
| 113 | 113 | tagid |
| 114 | 114 | ); |
| 115 | 115 | db_generic_query_view(zSql, 1); |
| @@ -126,11 +126,11 @@ | ||
| 126 | 126 | "SELECT DISTINCT" |
| 127 | 127 | " linktagid(t.tagid) AS 'Tag ID'," |
| 128 | 128 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 129 | 129 | " linkuuid(b.uuid) AS 'Version'" |
| 130 | 130 | " FROM tag t, tagxref tx, blob b " |
| 131 | - " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.srcid=b.rid " | |
| 131 | + " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.rid=b.rid " | |
| 132 | 132 | TAGVIEW_DEFAULT_FILTER |
| 133 | 133 | " ORDER BY tx.mtime DESC", |
| 134 | 134 | tagname); |
| 135 | 135 | db_generic_query_view(zSql, 1); |
| 136 | 136 | free(zSql); |
| 137 | 137 |
| --- src/tagview.c | |
| +++ src/tagview.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | " linktagid(t.tagid) AS 'Tag ID'," |
| 61 | " linktagname(t.tagname) AS 'Name'," |
| 62 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 63 | " linkuuid(b.uuid) AS 'Version'" |
| 64 | " FROM tag t, tagxref tx, blob b " |
| 65 | " WHERE t.tagid=tx.tagid AND tx.srcid=b.rid" |
| 66 | " AND tx.tagtype!=0 %s " |
| 67 | TAGVIEW_DEFAULT_FILTER |
| 68 | " ORDER BY tx.mtime DESC %s", |
| 69 | zLikeClause, zLimit |
| 70 | ); |
| @@ -105,11 +105,11 @@ | |
| 105 | "SELECT DISTINCT" |
| 106 | " linktagname(t.tagname) AS 'Tag Name'," |
| 107 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 108 | " linkuuid(b.uuid) AS 'Version'" |
| 109 | " FROM tag t, tagxref tx, blob b" |
| 110 | " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.srcid=b.rid " |
| 111 | TAGVIEW_DEFAULT_FILTER |
| 112 | " ORDER BY tx.mtime DESC", |
| 113 | tagid |
| 114 | ); |
| 115 | db_generic_query_view(zSql, 1); |
| @@ -126,11 +126,11 @@ | |
| 126 | "SELECT DISTINCT" |
| 127 | " linktagid(t.tagid) AS 'Tag ID'," |
| 128 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 129 | " linkuuid(b.uuid) AS 'Version'" |
| 130 | " FROM tag t, tagxref tx, blob b " |
| 131 | " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.srcid=b.rid " |
| 132 | TAGVIEW_DEFAULT_FILTER |
| 133 | " ORDER BY tx.mtime DESC", |
| 134 | tagname); |
| 135 | db_generic_query_view(zSql, 1); |
| 136 | free(zSql); |
| 137 |
| --- src/tagview.c | |
| +++ src/tagview.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | " linktagid(t.tagid) AS 'Tag ID'," |
| 61 | " linktagname(t.tagname) AS 'Name'," |
| 62 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 63 | " linkuuid(b.uuid) AS 'Version'" |
| 64 | " FROM tag t, tagxref tx, blob b " |
| 65 | " WHERE t.tagid=tx.tagid AND tx.rid=b.rid" |
| 66 | " AND tx.tagtype!=0 %s " |
| 67 | TAGVIEW_DEFAULT_FILTER |
| 68 | " ORDER BY tx.mtime DESC %s", |
| 69 | zLikeClause, zLimit |
| 70 | ); |
| @@ -105,11 +105,11 @@ | |
| 105 | "SELECT DISTINCT" |
| 106 | " linktagname(t.tagname) AS 'Tag Name'," |
| 107 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 108 | " linkuuid(b.uuid) AS 'Version'" |
| 109 | " FROM tag t, tagxref tx, blob b" |
| 110 | " WHERE t.tagid=%d AND t.tagid=tx.tagid AND tx.rid=b.rid " |
| 111 | TAGVIEW_DEFAULT_FILTER |
| 112 | " ORDER BY tx.mtime DESC", |
| 113 | tagid |
| 114 | ); |
| 115 | db_generic_query_view(zSql, 1); |
| @@ -126,11 +126,11 @@ | |
| 126 | "SELECT DISTINCT" |
| 127 | " linktagid(t.tagid) AS 'Tag ID'," |
| 128 | " DATETIME(tx.mtime) AS 'Timestamp'," |
| 129 | " linkuuid(b.uuid) AS 'Version'" |
| 130 | " FROM tag t, tagxref tx, blob b " |
| 131 | " WHERE t.tagname='%q' AND t.tagid=tx.tagid AND tx.rid=b.rid " |
| 132 | TAGVIEW_DEFAULT_FILTER |
| 133 | " ORDER BY tx.mtime DESC", |
| 134 | tagname); |
| 135 | db_generic_query_view(zSql, 1); |
| 136 | free(zSql); |
| 137 |