Fossil SCM
Pull in the latest changes from trunk.
Commit
1942d581bb18956ea34c7532fcb8836351a94852
Parent
390b4146053df5a…
15 files changed
+2
-1
+2
-1
+1
+3
-2
+1
-1
+1
-1
+5
-5
+17
+17
+1
+5
-3
+3
-3
+1
-1
+4
-1
+1
-1
+2
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -304,16 +304,17 @@ | ||
| 304 | 304 | ** header set to a reasonable period (default: one week). |
| 305 | 305 | */ |
| 306 | 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | 307 | time_t expires = time(0) + 604800; |
| 308 | 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | + }else{ | |
| 310 | + fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 309 | 311 | } |
| 310 | 312 | |
| 311 | 313 | /* Content intended for logged in users should only be cached in |
| 312 | 314 | ** the browser, not some shared location. |
| 313 | 315 | */ |
| 314 | - fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 315 | 316 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 316 | 317 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 317 | 318 | cgi_combine_header_and_body(); |
| 318 | 319 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 319 | 320 | } |
| 320 | 321 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -304,16 +304,17 @@ | |
| 304 | ** header set to a reasonable period (default: one week). |
| 305 | */ |
| 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | time_t expires = time(0) + 604800; |
| 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | } |
| 310 | |
| 311 | /* Content intended for logged in users should only be cached in |
| 312 | ** the browser, not some shared location. |
| 313 | */ |
| 314 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 315 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 316 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 317 | cgi_combine_header_and_body(); |
| 318 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 319 | } |
| 320 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -304,16 +304,17 @@ | |
| 304 | ** header set to a reasonable period (default: one week). |
| 305 | */ |
| 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | time_t expires = time(0) + 604800; |
| 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | }else{ |
| 310 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 311 | } |
| 312 | |
| 313 | /* Content intended for logged in users should only be cached in |
| 314 | ** the browser, not some shared location. |
| 315 | */ |
| 316 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 317 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 318 | cgi_combine_header_and_body(); |
| 319 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 320 | } |
| 321 |
+2
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -304,16 +304,17 @@ | ||
| 304 | 304 | ** header set to a reasonable period (default: one week). |
| 305 | 305 | */ |
| 306 | 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | 307 | time_t expires = time(0) + 604800; |
| 308 | 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | + }else{ | |
| 310 | + fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 309 | 311 | } |
| 310 | 312 | |
| 311 | 313 | /* Content intended for logged in users should only be cached in |
| 312 | 314 | ** the browser, not some shared location. |
| 313 | 315 | */ |
| 314 | - fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 315 | 316 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 316 | 317 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 317 | 318 | cgi_combine_header_and_body(); |
| 318 | 319 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 319 | 320 | } |
| 320 | 321 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -304,16 +304,17 @@ | |
| 304 | ** header set to a reasonable period (default: one week). |
| 305 | */ |
| 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | time_t expires = time(0) + 604800; |
| 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | } |
| 310 | |
| 311 | /* Content intended for logged in users should only be cached in |
| 312 | ** the browser, not some shared location. |
| 313 | */ |
| 314 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 315 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 316 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 317 | cgi_combine_header_and_body(); |
| 318 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 319 | } |
| 320 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -304,16 +304,17 @@ | |
| 304 | ** header set to a reasonable period (default: one week). |
| 305 | */ |
| 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | time_t expires = time(0) + 604800; |
| 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | }else{ |
| 310 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 311 | } |
| 312 | |
| 313 | /* Content intended for logged in users should only be cached in |
| 314 | ** the browser, not some shared location. |
| 315 | */ |
| 316 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 317 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 318 | cgi_combine_header_and_body(); |
| 319 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 320 | } |
| 321 |
+1
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -561,6 +561,7 @@ | ||
| 561 | 561 | if( blob_size(&logo)==0 ){ |
| 562 | 562 | blob_init(&logo, (char*)aLogo, sizeof(aLogo)); |
| 563 | 563 | } |
| 564 | 564 | cgi_set_content_type(zMime); |
| 565 | 565 | cgi_set_content(&logo); |
| 566 | + g.isConst = 1; | |
| 566 | 567 | } |
| 567 | 568 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -561,6 +561,7 @@ | |
| 561 | if( blob_size(&logo)==0 ){ |
| 562 | blob_init(&logo, (char*)aLogo, sizeof(aLogo)); |
| 563 | } |
| 564 | cgi_set_content_type(zMime); |
| 565 | cgi_set_content(&logo); |
| 566 | } |
| 567 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -561,6 +561,7 @@ | |
| 561 | if( blob_size(&logo)==0 ){ |
| 562 | blob_init(&logo, (char*)aLogo, sizeof(aLogo)); |
| 563 | } |
| 564 | cgi_set_content_type(zMime); |
| 565 | cgi_set_content(&logo); |
| 566 | g.isConst = 1; |
| 567 | } |
| 568 |
+3
-2
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -125,11 +125,11 @@ | ||
| 125 | 125 | ** |
| 126 | 126 | ** The server address is contain in the "g" global structure. The |
| 127 | 127 | ** url_parse() routine should have been called prior to this routine |
| 128 | 128 | ** in order to fill this structure appropriately. |
| 129 | 129 | */ |
| 130 | -void http_exchange(Blob *pSend, Blob *pReply){ | |
| 130 | +void http_exchange(Blob *pSend, Blob *pReply, int useLogin){ | |
| 131 | 131 | Blob login; /* The login card */ |
| 132 | 132 | Blob payload; /* The complete payload including login card */ |
| 133 | 133 | Blob hdr; /* The HTTP request header */ |
| 134 | 134 | int closeConnection; /* True to close the connection when done */ |
| 135 | 135 | int iLength; /* Length of the reply payload */ |
| @@ -141,11 +141,12 @@ | ||
| 141 | 141 | if( transport_open() ){ |
| 142 | 142 | fossil_fatal(transport_errmsg()); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /* Construct the login card and prepare the complete payload */ |
| 146 | - http_build_login_card(pSend, &login); | |
| 146 | + blob_zero(&login); | |
| 147 | + if( useLogin ) http_build_login_card(pSend, &login); | |
| 147 | 148 | if( g.fHttpTrace ){ |
| 148 | 149 | payload = login; |
| 149 | 150 | blob_append(&payload, blob_buffer(pSend), blob_size(pSend)); |
| 150 | 151 | }else{ |
| 151 | 152 | blob_compress2(&login, pSend, &payload); |
| 152 | 153 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | ** |
| 126 | ** The server address is contain in the "g" global structure. The |
| 127 | ** url_parse() routine should have been called prior to this routine |
| 128 | ** in order to fill this structure appropriately. |
| 129 | */ |
| 130 | void http_exchange(Blob *pSend, Blob *pReply){ |
| 131 | Blob login; /* The login card */ |
| 132 | Blob payload; /* The complete payload including login card */ |
| 133 | Blob hdr; /* The HTTP request header */ |
| 134 | int closeConnection; /* True to close the connection when done */ |
| 135 | int iLength; /* Length of the reply payload */ |
| @@ -141,11 +141,12 @@ | |
| 141 | if( transport_open() ){ |
| 142 | fossil_fatal(transport_errmsg()); |
| 143 | } |
| 144 | |
| 145 | /* Construct the login card and prepare the complete payload */ |
| 146 | http_build_login_card(pSend, &login); |
| 147 | if( g.fHttpTrace ){ |
| 148 | payload = login; |
| 149 | blob_append(&payload, blob_buffer(pSend), blob_size(pSend)); |
| 150 | }else{ |
| 151 | blob_compress2(&login, pSend, &payload); |
| 152 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | ** |
| 126 | ** The server address is contain in the "g" global structure. The |
| 127 | ** url_parse() routine should have been called prior to this routine |
| 128 | ** in order to fill this structure appropriately. |
| 129 | */ |
| 130 | void http_exchange(Blob *pSend, Blob *pReply, int useLogin){ |
| 131 | Blob login; /* The login card */ |
| 132 | Blob payload; /* The complete payload including login card */ |
| 133 | Blob hdr; /* The HTTP request header */ |
| 134 | int closeConnection; /* True to close the connection when done */ |
| 135 | int iLength; /* Length of the reply payload */ |
| @@ -141,11 +141,12 @@ | |
| 141 | if( transport_open() ){ |
| 142 | fossil_fatal(transport_errmsg()); |
| 143 | } |
| 144 | |
| 145 | /* Construct the login card and prepare the complete payload */ |
| 146 | blob_zero(&login); |
| 147 | if( useLogin ) http_build_login_card(pSend, &login); |
| 148 | if( g.fHttpTrace ){ |
| 149 | payload = login; |
| 150 | blob_append(&payload, blob_buffer(pSend), blob_size(pSend)); |
| 151 | }else{ |
| 152 | blob_compress2(&login, pSend, &payload); |
| 153 |
+1
-1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -472,11 +472,11 @@ | ||
| 472 | 472 | static char *zUser = 0; |
| 473 | 473 | int i; |
| 474 | 474 | for(i=0; zCap[i]; i++){ |
| 475 | 475 | switch( zCap[i] ){ |
| 476 | 476 | case 's': g.okSetup = 1; /* Fall thru into Admin */ |
| 477 | - case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = | |
| 477 | + case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okZip = | |
| 478 | 478 | g.okRdWiki = g.okWrWiki = g.okNewWiki = |
| 479 | 479 | g.okApndWiki = g.okHistory = g.okClone = |
| 480 | 480 | g.okNewTkt = g.okPassword = g.okRdAddr = |
| 481 | 481 | g.okTktFmt = 1; /* Fall thru into Read/Write */ |
| 482 | 482 | case 'i': g.okRead = g.okWrite = 1; break; |
| 483 | 483 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -472,11 +472,11 @@ | |
| 472 | static char *zUser = 0; |
| 473 | int i; |
| 474 | for(i=0; zCap[i]; i++){ |
| 475 | switch( zCap[i] ){ |
| 476 | case 's': g.okSetup = 1; /* Fall thru into Admin */ |
| 477 | case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = |
| 478 | g.okRdWiki = g.okWrWiki = g.okNewWiki = |
| 479 | g.okApndWiki = g.okHistory = g.okClone = |
| 480 | g.okNewTkt = g.okPassword = g.okRdAddr = |
| 481 | g.okTktFmt = 1; /* Fall thru into Read/Write */ |
| 482 | case 'i': g.okRead = g.okWrite = 1; break; |
| 483 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -472,11 +472,11 @@ | |
| 472 | static char *zUser = 0; |
| 473 | int i; |
| 474 | for(i=0; zCap[i]; i++){ |
| 475 | switch( zCap[i] ){ |
| 476 | case 's': g.okSetup = 1; /* Fall thru into Admin */ |
| 477 | case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okZip = |
| 478 | g.okRdWiki = g.okWrWiki = g.okNewWiki = |
| 479 | g.okApndWiki = g.okHistory = g.okClone = |
| 480 | g.okNewTkt = g.okPassword = g.okRdAddr = |
| 481 | g.okTktFmt = 1; /* Fall thru into Read/Write */ |
| 482 | case 'i': g.okRead = g.okWrite = 1; break; |
| 483 |
+1
-1
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -386,11 +386,11 @@ | ||
| 386 | 386 | if( p->zWikiTitle!=0 ) goto manifest_syntax_error; |
| 387 | 387 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 388 | 388 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 389 | 389 | p->zWikiTitle = blob_terminate(&a1); |
| 390 | 390 | defossilize(p->zWikiTitle); |
| 391 | - if( !wiki_name_is_wellformed(p->zWikiTitle) ){ | |
| 391 | + if( !wiki_name_is_wellformed((const unsigned char *)p->zWikiTitle) ){ | |
| 392 | 392 | goto manifest_syntax_error; |
| 393 | 393 | } |
| 394 | 394 | break; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -386,11 +386,11 @@ | |
| 386 | if( p->zWikiTitle!=0 ) goto manifest_syntax_error; |
| 387 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 388 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 389 | p->zWikiTitle = blob_terminate(&a1); |
| 390 | defossilize(p->zWikiTitle); |
| 391 | if( !wiki_name_is_wellformed(p->zWikiTitle) ){ |
| 392 | goto manifest_syntax_error; |
| 393 | } |
| 394 | break; |
| 395 | } |
| 396 | |
| 397 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -386,11 +386,11 @@ | |
| 386 | if( p->zWikiTitle!=0 ) goto manifest_syntax_error; |
| 387 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 388 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 389 | p->zWikiTitle = blob_terminate(&a1); |
| 390 | defossilize(p->zWikiTitle); |
| 391 | if( !wiki_name_is_wellformed((const unsigned char *)p->zWikiTitle) ){ |
| 392 | goto manifest_syntax_error; |
| 393 | } |
| 394 | break; |
| 395 | } |
| 396 | |
| 397 |
+5
-5
| --- src/rss.c | ||
| +++ src/rss.c | ||
| @@ -73,13 +73,13 @@ | ||
| 73 | 73 | zPubDate = cgi_rfc822_datestamp(time(NULL)); |
| 74 | 74 | |
| 75 | 75 | @ <?xml version="1.0"?> |
| 76 | 76 | @ <rss version="2.0"> |
| 77 | 77 | @ <channel> |
| 78 | - @ <title>%s(zProjectName)</title> | |
| 78 | + @ <title>%h(zProjectName)</title> | |
| 79 | 79 | @ <link>%s(g.zBaseURL)</link> |
| 80 | - @ <description>%s(zProjectDescr)</description> | |
| 80 | + @ <description>%h(zProjectDescr)</description> | |
| 81 | 81 | @ <pubDate>%s(zPubDate)</pubDate> |
| 82 | 82 | @ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator> |
| 83 | 83 | db_prepare(&q, blob_buffer(&bSQL)); |
| 84 | 84 | blob_reset( &bSQL ); |
| 85 | 85 | while( db_step(&q)==SQLITE_ROW && nLine<=20 ){ |
| @@ -102,15 +102,15 @@ | ||
| 102 | 102 | }else if( nChild>1 ){ |
| 103 | 103 | zPrefix = "*FORK* "; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | @ <item> |
| 107 | - @ <title>%s(zPrefix)%s(zCom)</title> | |
| 107 | + @ <title>%h(zPrefix)%s(zCom)</title> | |
| 108 | 108 | @ <link>%s(g.zBaseURL)/ci/%s(zId)</link> |
| 109 | - @ <description>%s(zPrefix)%s(zCom)</description> | |
| 109 | + @ <description>%s(zPrefix)%h(zCom)</description> | |
| 110 | 110 | @ <pubDate>%s(zDate)</pubDate> |
| 111 | - @ <author>%s(zAuthor)</author> | |
| 111 | + @ <author>%h(zAuthor)</author> | |
| 112 | 112 | @ <guid>%s(g.zBaseURL)/ci/%s(zId)</guid> |
| 113 | 113 | @ </item> |
| 114 | 114 | free(zDate); |
| 115 | 115 | nLine++; |
| 116 | 116 | } |
| 117 | 117 |
| --- src/rss.c | |
| +++ src/rss.c | |
| @@ -73,13 +73,13 @@ | |
| 73 | zPubDate = cgi_rfc822_datestamp(time(NULL)); |
| 74 | |
| 75 | @ <?xml version="1.0"?> |
| 76 | @ <rss version="2.0"> |
| 77 | @ <channel> |
| 78 | @ <title>%s(zProjectName)</title> |
| 79 | @ <link>%s(g.zBaseURL)</link> |
| 80 | @ <description>%s(zProjectDescr)</description> |
| 81 | @ <pubDate>%s(zPubDate)</pubDate> |
| 82 | @ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator> |
| 83 | db_prepare(&q, blob_buffer(&bSQL)); |
| 84 | blob_reset( &bSQL ); |
| 85 | while( db_step(&q)==SQLITE_ROW && nLine<=20 ){ |
| @@ -102,15 +102,15 @@ | |
| 102 | }else if( nChild>1 ){ |
| 103 | zPrefix = "*FORK* "; |
| 104 | } |
| 105 | |
| 106 | @ <item> |
| 107 | @ <title>%s(zPrefix)%s(zCom)</title> |
| 108 | @ <link>%s(g.zBaseURL)/ci/%s(zId)</link> |
| 109 | @ <description>%s(zPrefix)%s(zCom)</description> |
| 110 | @ <pubDate>%s(zDate)</pubDate> |
| 111 | @ <author>%s(zAuthor)</author> |
| 112 | @ <guid>%s(g.zBaseURL)/ci/%s(zId)</guid> |
| 113 | @ </item> |
| 114 | free(zDate); |
| 115 | nLine++; |
| 116 | } |
| 117 |
| --- src/rss.c | |
| +++ src/rss.c | |
| @@ -73,13 +73,13 @@ | |
| 73 | zPubDate = cgi_rfc822_datestamp(time(NULL)); |
| 74 | |
| 75 | @ <?xml version="1.0"?> |
| 76 | @ <rss version="2.0"> |
| 77 | @ <channel> |
| 78 | @ <title>%h(zProjectName)</title> |
| 79 | @ <link>%s(g.zBaseURL)</link> |
| 80 | @ <description>%h(zProjectDescr)</description> |
| 81 | @ <pubDate>%s(zPubDate)</pubDate> |
| 82 | @ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator> |
| 83 | db_prepare(&q, blob_buffer(&bSQL)); |
| 84 | blob_reset( &bSQL ); |
| 85 | while( db_step(&q)==SQLITE_ROW && nLine<=20 ){ |
| @@ -102,15 +102,15 @@ | |
| 102 | }else if( nChild>1 ){ |
| 103 | zPrefix = "*FORK* "; |
| 104 | } |
| 105 | |
| 106 | @ <item> |
| 107 | @ <title>%h(zPrefix)%s(zCom)</title> |
| 108 | @ <link>%s(g.zBaseURL)/ci/%s(zId)</link> |
| 109 | @ <description>%s(zPrefix)%h(zCom)</description> |
| 110 | @ <pubDate>%s(zDate)</pubDate> |
| 111 | @ <author>%h(zAuthor)</author> |
| 112 | @ <guid>%s(g.zBaseURL)/ci/%s(zId)</guid> |
| 113 | @ </item> |
| 114 | free(zDate); |
| 115 | nLine++; |
| 116 | } |
| 117 |
+17
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -870,22 +870,30 @@ | ||
| 870 | 870 | } |
| 871 | 871 | db_begin_transaction(); |
| 872 | 872 | if( P("clear")!=0 ){ |
| 873 | 873 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 874 | 874 | cgi_replace_parameter("css", zDefaultCSS); |
| 875 | + db_end_transaction(0); | |
| 876 | + cgi_redirect("setup_editcss"); | |
| 875 | 877 | }else{ |
| 876 | 878 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 877 | 879 | } |
| 880 | + if( P("submit")!=0 ){ | |
| 881 | + db_end_transaction(0); | |
| 882 | + cgi_redirect("setup_editcss"); | |
| 883 | + } | |
| 878 | 884 | style_header("Edit CSS"); |
| 879 | 885 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 880 | 886 | login_insert_csrf_secret(); |
| 881 | 887 | @ Edit the CSS below:<br /> |
| 882 | 888 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 883 | 889 | @ <br /> |
| 884 | 890 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 885 | 891 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 886 | 892 | @ </form> |
| 893 | + @ <p><b>Note:</b> Press your browser Reload button after modifying the | |
| 894 | + @ CSS in order to pull in the modified CSS file.</p> | |
| 887 | 895 | @ <hr> |
| 888 | 896 | @ The default CSS is shown below for reference. Other examples |
| 889 | 897 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 890 | 898 | @ See also the <a href="setup_header">header</a> and |
| 891 | 899 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -999,14 +1007,18 @@ | ||
| 999 | 1007 | db_finalize(&ins); |
| 1000 | 1008 | db_multi_exec( |
| 1001 | 1009 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1002 | 1010 | zMime |
| 1003 | 1011 | ); |
| 1012 | + db_end_transaction(0); | |
| 1013 | + cgi_redirect("setup_logo"); | |
| 1004 | 1014 | }else if( P("clr")!=0 ){ |
| 1005 | 1015 | db_multi_exec( |
| 1006 | 1016 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1007 | 1017 | ); |
| 1018 | + db_end_transaction(0); | |
| 1019 | + cgi_redirect("setup_logo"); | |
| 1008 | 1020 | } |
| 1009 | 1021 | style_header("Edit Project Logo"); |
| 1010 | 1022 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1011 | 1023 | @ like this:</p> |
| 1012 | 1024 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1025,8 +1037,13 @@ | ||
| 1025 | 1037 | @ Logo Image file: |
| 1026 | 1038 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1027 | 1039 | @ <input type="submit" name="set" value="Change Logo"> |
| 1028 | 1040 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1029 | 1041 | @ </form> |
| 1042 | + @ | |
| 1043 | + @ <p><b>Note:</b> Your browser has probably cached the logo image, so | |
| 1044 | + @ you will probably need to press the Reload button on your browser after | |
| 1045 | + @ changing the logo to provoke your browser to reload the new logo image. | |
| 1046 | + @ </p> | |
| 1030 | 1047 | style_footer(); |
| 1031 | 1048 | db_end_transaction(0); |
| 1032 | 1049 | } |
| 1033 | 1050 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -870,22 +870,30 @@ | |
| 870 | } |
| 871 | db_begin_transaction(); |
| 872 | if( P("clear")!=0 ){ |
| 873 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 874 | cgi_replace_parameter("css", zDefaultCSS); |
| 875 | }else{ |
| 876 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 877 | } |
| 878 | style_header("Edit CSS"); |
| 879 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 880 | login_insert_csrf_secret(); |
| 881 | @ Edit the CSS below:<br /> |
| 882 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 883 | @ <br /> |
| 884 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 885 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 886 | @ </form> |
| 887 | @ <hr> |
| 888 | @ The default CSS is shown below for reference. Other examples |
| 889 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 890 | @ See also the <a href="setup_header">header</a> and |
| 891 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -999,14 +1007,18 @@ | |
| 999 | db_finalize(&ins); |
| 1000 | db_multi_exec( |
| 1001 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1002 | zMime |
| 1003 | ); |
| 1004 | }else if( P("clr")!=0 ){ |
| 1005 | db_multi_exec( |
| 1006 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1007 | ); |
| 1008 | } |
| 1009 | style_header("Edit Project Logo"); |
| 1010 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1011 | @ like this:</p> |
| 1012 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1025,8 +1037,13 @@ | |
| 1025 | @ Logo Image file: |
| 1026 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1027 | @ <input type="submit" name="set" value="Change Logo"> |
| 1028 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1029 | @ </form> |
| 1030 | style_footer(); |
| 1031 | db_end_transaction(0); |
| 1032 | } |
| 1033 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -870,22 +870,30 @@ | |
| 870 | } |
| 871 | db_begin_transaction(); |
| 872 | if( P("clear")!=0 ){ |
| 873 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 874 | cgi_replace_parameter("css", zDefaultCSS); |
| 875 | db_end_transaction(0); |
| 876 | cgi_redirect("setup_editcss"); |
| 877 | }else{ |
| 878 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 879 | } |
| 880 | if( P("submit")!=0 ){ |
| 881 | db_end_transaction(0); |
| 882 | cgi_redirect("setup_editcss"); |
| 883 | } |
| 884 | style_header("Edit CSS"); |
| 885 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 886 | login_insert_csrf_secret(); |
| 887 | @ Edit the CSS below:<br /> |
| 888 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 889 | @ <br /> |
| 890 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 891 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 892 | @ </form> |
| 893 | @ <p><b>Note:</b> Press your browser Reload button after modifying the |
| 894 | @ CSS in order to pull in the modified CSS file.</p> |
| 895 | @ <hr> |
| 896 | @ The default CSS is shown below for reference. Other examples |
| 897 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 898 | @ See also the <a href="setup_header">header</a> and |
| 899 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -999,14 +1007,18 @@ | |
| 1007 | db_finalize(&ins); |
| 1008 | db_multi_exec( |
| 1009 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1010 | zMime |
| 1011 | ); |
| 1012 | db_end_transaction(0); |
| 1013 | cgi_redirect("setup_logo"); |
| 1014 | }else if( P("clr")!=0 ){ |
| 1015 | db_multi_exec( |
| 1016 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1017 | ); |
| 1018 | db_end_transaction(0); |
| 1019 | cgi_redirect("setup_logo"); |
| 1020 | } |
| 1021 | style_header("Edit Project Logo"); |
| 1022 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1023 | @ like this:</p> |
| 1024 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1025,8 +1037,13 @@ | |
| 1037 | @ Logo Image file: |
| 1038 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1039 | @ <input type="submit" name="set" value="Change Logo"> |
| 1040 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1041 | @ </form> |
| 1042 | @ |
| 1043 | @ <p><b>Note:</b> Your browser has probably cached the logo image, so |
| 1044 | @ you will probably need to press the Reload button on your browser after |
| 1045 | @ changing the logo to provoke your browser to reload the new logo image. |
| 1046 | @ </p> |
| 1047 | style_footer(); |
| 1048 | db_end_transaction(0); |
| 1049 | } |
| 1050 |
+17
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -870,22 +870,30 @@ | ||
| 870 | 870 | } |
| 871 | 871 | db_begin_transaction(); |
| 872 | 872 | if( P("clear")!=0 ){ |
| 873 | 873 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 874 | 874 | cgi_replace_parameter("css", zDefaultCSS); |
| 875 | + db_end_transaction(0); | |
| 876 | + cgi_redirect("setup_editcss"); | |
| 875 | 877 | }else{ |
| 876 | 878 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 877 | 879 | } |
| 880 | + if( P("submit")!=0 ){ | |
| 881 | + db_end_transaction(0); | |
| 882 | + cgi_redirect("setup_editcss"); | |
| 883 | + } | |
| 878 | 884 | style_header("Edit CSS"); |
| 879 | 885 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 880 | 886 | login_insert_csrf_secret(); |
| 881 | 887 | @ Edit the CSS below:<br /> |
| 882 | 888 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 883 | 889 | @ <br /> |
| 884 | 890 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 885 | 891 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 886 | 892 | @ </form> |
| 893 | + @ <p><b>Note:</b> Press your browser Reload button after modifying the | |
| 894 | + @ CSS in order to pull in the modified CSS file.</p> | |
| 887 | 895 | @ <hr> |
| 888 | 896 | @ The default CSS is shown below for reference. Other examples |
| 889 | 897 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 890 | 898 | @ See also the <a href="setup_header">header</a> and |
| 891 | 899 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -999,14 +1007,18 @@ | ||
| 999 | 1007 | db_finalize(&ins); |
| 1000 | 1008 | db_multi_exec( |
| 1001 | 1009 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1002 | 1010 | zMime |
| 1003 | 1011 | ); |
| 1012 | + db_end_transaction(0); | |
| 1013 | + cgi_redirect("setup_logo"); | |
| 1004 | 1014 | }else if( P("clr")!=0 ){ |
| 1005 | 1015 | db_multi_exec( |
| 1006 | 1016 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1007 | 1017 | ); |
| 1018 | + db_end_transaction(0); | |
| 1019 | + cgi_redirect("setup_logo"); | |
| 1008 | 1020 | } |
| 1009 | 1021 | style_header("Edit Project Logo"); |
| 1010 | 1022 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1011 | 1023 | @ like this:</p> |
| 1012 | 1024 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1025,8 +1037,13 @@ | ||
| 1025 | 1037 | @ Logo Image file: |
| 1026 | 1038 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1027 | 1039 | @ <input type="submit" name="set" value="Change Logo"> |
| 1028 | 1040 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1029 | 1041 | @ </form> |
| 1042 | + @ | |
| 1043 | + @ <p><b>Note:</b> Your browser has probably cached the logo image, so | |
| 1044 | + @ you will probably need to press the Reload button on your browser after | |
| 1045 | + @ changing the logo to provoke your browser to reload the new logo image. | |
| 1046 | + @ </p> | |
| 1030 | 1047 | style_footer(); |
| 1031 | 1048 | db_end_transaction(0); |
| 1032 | 1049 | } |
| 1033 | 1050 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -870,22 +870,30 @@ | |
| 870 | } |
| 871 | db_begin_transaction(); |
| 872 | if( P("clear")!=0 ){ |
| 873 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 874 | cgi_replace_parameter("css", zDefaultCSS); |
| 875 | }else{ |
| 876 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 877 | } |
| 878 | style_header("Edit CSS"); |
| 879 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 880 | login_insert_csrf_secret(); |
| 881 | @ Edit the CSS below:<br /> |
| 882 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 883 | @ <br /> |
| 884 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 885 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 886 | @ </form> |
| 887 | @ <hr> |
| 888 | @ The default CSS is shown below for reference. Other examples |
| 889 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 890 | @ See also the <a href="setup_header">header</a> and |
| 891 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -999,14 +1007,18 @@ | |
| 999 | db_finalize(&ins); |
| 1000 | db_multi_exec( |
| 1001 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1002 | zMime |
| 1003 | ); |
| 1004 | }else if( P("clr")!=0 ){ |
| 1005 | db_multi_exec( |
| 1006 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1007 | ); |
| 1008 | } |
| 1009 | style_header("Edit Project Logo"); |
| 1010 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1011 | @ like this:</p> |
| 1012 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1025,8 +1037,13 @@ | |
| 1025 | @ Logo Image file: |
| 1026 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1027 | @ <input type="submit" name="set" value="Change Logo"> |
| 1028 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1029 | @ </form> |
| 1030 | style_footer(); |
| 1031 | db_end_transaction(0); |
| 1032 | } |
| 1033 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -870,22 +870,30 @@ | |
| 870 | } |
| 871 | db_begin_transaction(); |
| 872 | if( P("clear")!=0 ){ |
| 873 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 874 | cgi_replace_parameter("css", zDefaultCSS); |
| 875 | db_end_transaction(0); |
| 876 | cgi_redirect("setup_editcss"); |
| 877 | }else{ |
| 878 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 879 | } |
| 880 | if( P("submit")!=0 ){ |
| 881 | db_end_transaction(0); |
| 882 | cgi_redirect("setup_editcss"); |
| 883 | } |
| 884 | style_header("Edit CSS"); |
| 885 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 886 | login_insert_csrf_secret(); |
| 887 | @ Edit the CSS below:<br /> |
| 888 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 889 | @ <br /> |
| 890 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 891 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 892 | @ </form> |
| 893 | @ <p><b>Note:</b> Press your browser Reload button after modifying the |
| 894 | @ CSS in order to pull in the modified CSS file.</p> |
| 895 | @ <hr> |
| 896 | @ The default CSS is shown below for reference. Other examples |
| 897 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 898 | @ See also the <a href="setup_header">header</a> and |
| 899 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -999,14 +1007,18 @@ | |
| 1007 | db_finalize(&ins); |
| 1008 | db_multi_exec( |
| 1009 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1010 | zMime |
| 1011 | ); |
| 1012 | db_end_transaction(0); |
| 1013 | cgi_redirect("setup_logo"); |
| 1014 | }else if( P("clr")!=0 ){ |
| 1015 | db_multi_exec( |
| 1016 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1017 | ); |
| 1018 | db_end_transaction(0); |
| 1019 | cgi_redirect("setup_logo"); |
| 1020 | } |
| 1021 | style_header("Edit Project Logo"); |
| 1022 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1023 | @ like this:</p> |
| 1024 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1025,8 +1037,13 @@ | |
| 1037 | @ Logo Image file: |
| 1038 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1039 | @ <input type="submit" name="set" value="Change Logo"> |
| 1040 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1041 | @ </form> |
| 1042 | @ |
| 1043 | @ <p><b>Note:</b> Your browser has probably cached the logo image, so |
| 1044 | @ you will probably need to press the Reload button on your browser after |
| 1045 | @ changing the logo to provoke your browser to reload the new logo image. |
| 1046 | @ </p> |
| 1047 | style_footer(); |
| 1048 | db_end_transaction(0); |
| 1049 | } |
| 1050 |
+1
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -391,10 +391,11 @@ | ||
| 391 | 391 | char *zCSS = 0; |
| 392 | 392 | |
| 393 | 393 | cgi_set_content_type("text/css"); |
| 394 | 394 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 395 | 395 | cgi_append_content(zCSS, -1); |
| 396 | + g.isConst = 1; | |
| 396 | 397 | } |
| 397 | 398 | |
| 398 | 399 | /* |
| 399 | 400 | ** WEBPAGE: test_env |
| 400 | 401 | */ |
| 401 | 402 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -391,10 +391,11 @@ | |
| 391 | char *zCSS = 0; |
| 392 | |
| 393 | cgi_set_content_type("text/css"); |
| 394 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 395 | cgi_append_content(zCSS, -1); |
| 396 | } |
| 397 | |
| 398 | /* |
| 399 | ** WEBPAGE: test_env |
| 400 | */ |
| 401 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -391,10 +391,11 @@ | |
| 391 | char *zCSS = 0; |
| 392 | |
| 393 | cgi_set_content_type("text/css"); |
| 394 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 395 | cgi_append_content(zCSS, -1); |
| 396 | g.isConst = 1; |
| 397 | } |
| 398 | |
| 399 | /* |
| 400 | ** WEBPAGE: test_env |
| 401 | */ |
| 402 |
+5
-3
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -167,19 +167,21 @@ | ||
| 167 | 167 | zName = db_column_text(&q, 1); |
| 168 | 168 | rid = db_column_int(&q, 2); |
| 169 | 169 | isDeleted = db_column_int(&q, 3); |
| 170 | 170 | oldChnged = db_column_int(&q, 4); |
| 171 | 171 | oldMtime = db_column_int64(&q, 6); |
| 172 | - if( !file_isfile(zName) && file_size(0)>=0 ){ | |
| 172 | + if( isDeleted ){ | |
| 173 | + chnged = 1; | |
| 174 | + }else if( !file_isfile(zName) && file_size(0)>=0 ){ | |
| 173 | 175 | if( notFileIsFatal ){ |
| 174 | - fossil_warning("not a ordinary file: %s", zName); | |
| 176 | + fossil_warning("not an ordinary file: %s", zName); | |
| 175 | 177 | nErr++; |
| 176 | 178 | } |
| 177 | 179 | chnged = 1; |
| 178 | 180 | }else if( oldChnged>=2 ){ |
| 179 | 181 | chnged = oldChnged; |
| 180 | - }else if( isDeleted || rid==0 ){ | |
| 182 | + }else if( rid==0 ){ | |
| 181 | 183 | chnged = 1; |
| 182 | 184 | } |
| 183 | 185 | if( chnged!=1 ){ |
| 184 | 186 | currentMtime = file_mtime(0); |
| 185 | 187 | assert( currentMtime>0 ); |
| 186 | 188 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -167,19 +167,21 @@ | |
| 167 | zName = db_column_text(&q, 1); |
| 168 | rid = db_column_int(&q, 2); |
| 169 | isDeleted = db_column_int(&q, 3); |
| 170 | oldChnged = db_column_int(&q, 4); |
| 171 | oldMtime = db_column_int64(&q, 6); |
| 172 | if( !file_isfile(zName) && file_size(0)>=0 ){ |
| 173 | if( notFileIsFatal ){ |
| 174 | fossil_warning("not a ordinary file: %s", zName); |
| 175 | nErr++; |
| 176 | } |
| 177 | chnged = 1; |
| 178 | }else if( oldChnged>=2 ){ |
| 179 | chnged = oldChnged; |
| 180 | }else if( isDeleted || rid==0 ){ |
| 181 | chnged = 1; |
| 182 | } |
| 183 | if( chnged!=1 ){ |
| 184 | currentMtime = file_mtime(0); |
| 185 | assert( currentMtime>0 ); |
| 186 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -167,19 +167,21 @@ | |
| 167 | zName = db_column_text(&q, 1); |
| 168 | rid = db_column_int(&q, 2); |
| 169 | isDeleted = db_column_int(&q, 3); |
| 170 | oldChnged = db_column_int(&q, 4); |
| 171 | oldMtime = db_column_int64(&q, 6); |
| 172 | if( isDeleted ){ |
| 173 | chnged = 1; |
| 174 | }else if( !file_isfile(zName) && file_size(0)>=0 ){ |
| 175 | if( notFileIsFatal ){ |
| 176 | fossil_warning("not an ordinary file: %s", zName); |
| 177 | nErr++; |
| 178 | } |
| 179 | chnged = 1; |
| 180 | }else if( oldChnged>=2 ){ |
| 181 | chnged = oldChnged; |
| 182 | }else if( rid==0 ){ |
| 183 | chnged = 1; |
| 184 | } |
| 185 | if( chnged!=1 ){ |
| 186 | currentMtime = file_mtime(0); |
| 187 | assert( currentMtime>0 ); |
| 188 |
+3
-3
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -35,11 +35,11 @@ | ||
| 35 | 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | 36 | ** and do not contain tabs or other control characters and do not |
| 37 | 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | 39 | */ |
| 40 | -int wiki_name_is_wellformed(const char *z){ | |
| 40 | +int wiki_name_is_wellformed(const unsigned char *z){ | |
| 41 | 41 | int i; |
| 42 | 42 | if( z[0]<=0x20 ){ |
| 43 | 43 | return 0; |
| 44 | 44 | } |
| 45 | 45 | for(i=1; z[i]; i++){ |
| @@ -67,11 +67,11 @@ | ||
| 67 | 67 | /* |
| 68 | 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | 69 | ** and return true. If it is well-formed, return false. |
| 70 | 70 | */ |
| 71 | 71 | static int check_name(const char *z){ |
| 72 | - if( !wiki_name_is_wellformed(z) ){ | |
| 72 | + if( !wiki_name_is_wellformed((const unsigned char *)z) ){ | |
| 73 | 73 | style_header("Wiki Page Name Error"); |
| 74 | 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | 75 | @ wiki page names: |
| 76 | 76 | well_formed_wiki_name_rules(); |
| 77 | 77 | style_footer(); |
| @@ -345,11 +345,11 @@ | ||
| 345 | 345 | if( !g.okNewWiki ){ |
| 346 | 346 | login_needed(); |
| 347 | 347 | return; |
| 348 | 348 | } |
| 349 | 349 | zName = PD("name",""); |
| 350 | - if( zName[0] && wiki_name_is_wellformed(zName) ){ | |
| 350 | + if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){ | |
| 351 | 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | 352 | } |
| 353 | 353 | style_header("Create A New Wiki Page"); |
| 354 | 354 | @ <p>Rules for wiki page names: |
| 355 | 355 | well_formed_wiki_name_rules(); |
| 356 | 356 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -35,11 +35,11 @@ | |
| 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | ** and do not contain tabs or other control characters and do not |
| 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | */ |
| 40 | int wiki_name_is_wellformed(const char *z){ |
| 41 | int i; |
| 42 | if( z[0]<=0x20 ){ |
| 43 | return 0; |
| 44 | } |
| 45 | for(i=1; z[i]; i++){ |
| @@ -67,11 +67,11 @@ | |
| 67 | /* |
| 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | ** and return true. If it is well-formed, return false. |
| 70 | */ |
| 71 | static int check_name(const char *z){ |
| 72 | if( !wiki_name_is_wellformed(z) ){ |
| 73 | style_header("Wiki Page Name Error"); |
| 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | @ wiki page names: |
| 76 | well_formed_wiki_name_rules(); |
| 77 | style_footer(); |
| @@ -345,11 +345,11 @@ | |
| 345 | if( !g.okNewWiki ){ |
| 346 | login_needed(); |
| 347 | return; |
| 348 | } |
| 349 | zName = PD("name",""); |
| 350 | if( zName[0] && wiki_name_is_wellformed(zName) ){ |
| 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | } |
| 353 | style_header("Create A New Wiki Page"); |
| 354 | @ <p>Rules for wiki page names: |
| 355 | well_formed_wiki_name_rules(); |
| 356 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -35,11 +35,11 @@ | |
| 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | ** and do not contain tabs or other control characters and do not |
| 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | */ |
| 40 | int wiki_name_is_wellformed(const unsigned char *z){ |
| 41 | int i; |
| 42 | if( z[0]<=0x20 ){ |
| 43 | return 0; |
| 44 | } |
| 45 | for(i=1; z[i]; i++){ |
| @@ -67,11 +67,11 @@ | |
| 67 | /* |
| 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | ** and return true. If it is well-formed, return false. |
| 70 | */ |
| 71 | static int check_name(const char *z){ |
| 72 | if( !wiki_name_is_wellformed((const unsigned char *)z) ){ |
| 73 | style_header("Wiki Page Name Error"); |
| 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | @ wiki page names: |
| 76 | well_formed_wiki_name_rules(); |
| 77 | style_footer(); |
| @@ -345,11 +345,11 @@ | |
| 345 | if( !g.okNewWiki ){ |
| 346 | login_needed(); |
| 347 | return; |
| 348 | } |
| 349 | zName = PD("name",""); |
| 350 | if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){ |
| 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | } |
| 353 | style_header("Create A New Wiki Page"); |
| 354 | @ <p>Rules for wiki page names: |
| 355 | well_formed_wiki_name_rules(); |
| 356 |
+1
-1
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -1015,11 +1015,11 @@ | ||
| 1015 | 1015 | } |
| 1016 | 1016 | } |
| 1017 | 1017 | }else if( g.okHistory ){ |
| 1018 | 1018 | blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget); |
| 1019 | 1019 | } |
| 1020 | - }else if( wiki_name_is_wellformed(zTarget) ){ | |
| 1020 | + }else if( wiki_name_is_wellformed((const unsigned char *)zTarget) ){ | |
| 1021 | 1021 | blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget); |
| 1022 | 1022 | }else{ |
| 1023 | 1023 | blob_appendf(p->pOut, "[bad-link: %h]", zTarget); |
| 1024 | 1024 | zTerm = ""; |
| 1025 | 1025 | } |
| 1026 | 1026 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -1015,11 +1015,11 @@ | |
| 1015 | } |
| 1016 | } |
| 1017 | }else if( g.okHistory ){ |
| 1018 | blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget); |
| 1019 | } |
| 1020 | }else if( wiki_name_is_wellformed(zTarget) ){ |
| 1021 | blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget); |
| 1022 | }else{ |
| 1023 | blob_appendf(p->pOut, "[bad-link: %h]", zTarget); |
| 1024 | zTerm = ""; |
| 1025 | } |
| 1026 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -1015,11 +1015,11 @@ | |
| 1015 | } |
| 1016 | } |
| 1017 | }else if( g.okHistory ){ |
| 1018 | blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget); |
| 1019 | } |
| 1020 | }else if( wiki_name_is_wellformed((const unsigned char *)zTarget) ){ |
| 1021 | blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget); |
| 1022 | }else{ |
| 1023 | blob_appendf(p->pOut, "[bad-link: %h]", zTarget); |
| 1024 | zTerm = ""; |
| 1025 | } |
| 1026 |
+4
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -386,10 +386,13 @@ | ||
| 386 | 386 | Stmt q; |
| 387 | 387 | int rc = -1; |
| 388 | 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | 389 | defossilize(zLogin); |
| 390 | 390 | |
| 391 | + if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ | |
| 392 | + return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ | |
| 393 | + } | |
| 391 | 394 | db_prepare(&q, |
| 392 | 395 | "SELECT pw, cap, uid FROM user" |
| 393 | 396 | " WHERE login=%Q" |
| 394 | 397 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 395 | 398 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | ||
| 1062 | 1065 | nCardRcvd = 0; |
| 1063 | 1066 | xfer.nFileSent = 0; |
| 1064 | 1067 | xfer.nDeltaSent = 0; |
| 1065 | 1068 | xfer.nGimmeSent = 0; |
| 1066 | 1069 | fflush(stdout); |
| 1067 | - http_exchange(&send, &recv); | |
| 1070 | + http_exchange(&send, &recv, cloneFlag==0 || nCycle>0); | |
| 1068 | 1071 | blob_reset(&send); |
| 1069 | 1072 | |
| 1070 | 1073 | /* Begin constructing the next message (which might never be |
| 1071 | 1074 | ** sent) by beginning with the pull or push cards |
| 1072 | 1075 | */ |
| 1073 | 1076 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -386,10 +386,13 @@ | |
| 386 | Stmt q; |
| 387 | int rc = -1; |
| 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | defossilize(zLogin); |
| 390 | |
| 391 | db_prepare(&q, |
| 392 | "SELECT pw, cap, uid FROM user" |
| 393 | " WHERE login=%Q" |
| 394 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 395 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | |
| 1062 | nCardRcvd = 0; |
| 1063 | xfer.nFileSent = 0; |
| 1064 | xfer.nDeltaSent = 0; |
| 1065 | xfer.nGimmeSent = 0; |
| 1066 | fflush(stdout); |
| 1067 | http_exchange(&send, &recv); |
| 1068 | blob_reset(&send); |
| 1069 | |
| 1070 | /* Begin constructing the next message (which might never be |
| 1071 | ** sent) by beginning with the pull or push cards |
| 1072 | */ |
| 1073 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -386,10 +386,13 @@ | |
| 386 | Stmt q; |
| 387 | int rc = -1; |
| 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | defossilize(zLogin); |
| 390 | |
| 391 | if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ |
| 392 | return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ |
| 393 | } |
| 394 | db_prepare(&q, |
| 395 | "SELECT pw, cap, uid FROM user" |
| 396 | " WHERE login=%Q" |
| 397 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 398 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | |
| 1065 | nCardRcvd = 0; |
| 1066 | xfer.nFileSent = 0; |
| 1067 | xfer.nDeltaSent = 0; |
| 1068 | xfer.nGimmeSent = 0; |
| 1069 | fflush(stdout); |
| 1070 | http_exchange(&send, &recv, cloneFlag==0 || nCycle>0); |
| 1071 | blob_reset(&send); |
| 1072 | |
| 1073 | /* Begin constructing the next message (which might never be |
| 1074 | ** sent) by beginning with the pull or push cards |
| 1075 | */ |
| 1076 |
+1
-1
| --- www/branching.wiki | ||
| +++ www/branching.wiki | ||
| @@ -173,11 +173,11 @@ | ||
| 173 | 173 | <i>property</i> is a name/value pair. Internally, fossil implements |
| 174 | 174 | tags as properties with a NULL value. So, tags and properties really |
| 175 | 175 | are much the same thing, and henceforth we will use the word "tag" |
| 176 | 176 | to mean either a tag or a property. |
| 177 | 177 | |
| 178 | -A tag can be either a one-time tag or an propagating tag or a cancellation tag. | |
| 178 | +A tag can be a one-time tag, a propagating tag or a cancellation tag. | |
| 179 | 179 | A one-time tag only applies to the check-in to which it is attached. A |
| 180 | 180 | propagating tag applies to the check-in to which it is attached and also |
| 181 | 181 | to all direct descendants of that check-in. A <i>direct descendant</i> |
| 182 | 182 | is a descendant through direct children. Tags propagation does not |
| 183 | 183 | cross merges. Tag propagation also stops as soon |
| 184 | 184 |
| --- www/branching.wiki | |
| +++ www/branching.wiki | |
| @@ -173,11 +173,11 @@ | |
| 173 | <i>property</i> is a name/value pair. Internally, fossil implements |
| 174 | tags as properties with a NULL value. So, tags and properties really |
| 175 | are much the same thing, and henceforth we will use the word "tag" |
| 176 | to mean either a tag or a property. |
| 177 | |
| 178 | A tag can be either a one-time tag or an propagating tag or a cancellation tag. |
| 179 | A one-time tag only applies to the check-in to which it is attached. A |
| 180 | propagating tag applies to the check-in to which it is attached and also |
| 181 | to all direct descendants of that check-in. A <i>direct descendant</i> |
| 182 | is a descendant through direct children. Tags propagation does not |
| 183 | cross merges. Tag propagation also stops as soon |
| 184 |
| --- www/branching.wiki | |
| +++ www/branching.wiki | |
| @@ -173,11 +173,11 @@ | |
| 173 | <i>property</i> is a name/value pair. Internally, fossil implements |
| 174 | tags as properties with a NULL value. So, tags and properties really |
| 175 | are much the same thing, and henceforth we will use the word "tag" |
| 176 | to mean either a tag or a property. |
| 177 | |
| 178 | A tag can be a one-time tag, a propagating tag or a cancellation tag. |
| 179 | A one-time tag only applies to the check-in to which it is attached. A |
| 180 | propagating tag applies to the check-in to which it is attached and also |
| 181 | to all direct descendants of that check-in. A <i>direct descendant</i> |
| 182 | is a descendant through direct children. Tags propagation does not |
| 183 | cross merges. Tag propagation also stops as soon |
| 184 |