Fossil SCM

Correct the /doc page to support read-only repositories

andygoth 2017-08-05 03:23 trunk
Commit 95edba6534dafc1f85e0def8ac87f2e04eaed43454048496b21ea7468498b306
2 files changed +4 -4 +5
+4 -4
--- src/doc.c
+++ src/doc.c
@@ -467,16 +467,16 @@
467467
*/
468468
int doc_load_content(int vid, const char *zName, Blob *pContent){
469469
int rid; /* The RID of the file being loaded */
470470
if( !db_table_exists("repository","vcache") ){
471471
db_multi_exec(
472
- "CREATE TABLE IF NOT EXISTS vcache(\n"
472
+ "CREATE %s TABLE IF NOT EXISTS vcache(\n"
473473
" vid INTEGER, -- check-in ID\n"
474474
" fname TEXT, -- filename\n"
475475
" rid INTEGER, -- artifact ID\n"
476476
" PRIMARY KEY(vid,fname)\n"
477
- ") WITHOUT ROWID"
477
+ ") WITHOUT ROWID", db_is_writeable("repository") ? "" : "TEMPORARY"
478478
);
479479
}
480480
if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){
481481
db_multi_exec(
482482
"DELETE FROM vcache;\n"
@@ -496,17 +496,17 @@
496496
return rid;
497497
}
498498
499499
/*
500500
** Transfer content to the output. During the transfer, when text of
501
-** the followign form is seen:
501
+** the following form is seen:
502502
**
503503
** href="$ROOT/
504504
** action="$ROOT/
505505
**
506506
** Convert $ROOT to the root URI of the repository. Allow ' in place of "
507
-** and any case for href.
507
+** and any case for href or action.
508508
*/
509509
static void convert_href_and_output(Blob *pIn){
510510
int i, base;
511511
int n = blob_size(pIn);
512512
char *z = blob_buffer(pIn);
513513
--- src/doc.c
+++ src/doc.c
@@ -467,16 +467,16 @@
467 */
468 int doc_load_content(int vid, const char *zName, Blob *pContent){
469 int rid; /* The RID of the file being loaded */
470 if( !db_table_exists("repository","vcache") ){
471 db_multi_exec(
472 "CREATE TABLE IF NOT EXISTS vcache(\n"
473 " vid INTEGER, -- check-in ID\n"
474 " fname TEXT, -- filename\n"
475 " rid INTEGER, -- artifact ID\n"
476 " PRIMARY KEY(vid,fname)\n"
477 ") WITHOUT ROWID"
478 );
479 }
480 if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){
481 db_multi_exec(
482 "DELETE FROM vcache;\n"
@@ -496,17 +496,17 @@
496 return rid;
497 }
498
499 /*
500 ** Transfer content to the output. During the transfer, when text of
501 ** the followign form is seen:
502 **
503 ** href="$ROOT/
504 ** action="$ROOT/
505 **
506 ** Convert $ROOT to the root URI of the repository. Allow ' in place of "
507 ** and any case for href.
508 */
509 static void convert_href_and_output(Blob *pIn){
510 int i, base;
511 int n = blob_size(pIn);
512 char *z = blob_buffer(pIn);
513
--- src/doc.c
+++ src/doc.c
@@ -467,16 +467,16 @@
467 */
468 int doc_load_content(int vid, const char *zName, Blob *pContent){
469 int rid; /* The RID of the file being loaded */
470 if( !db_table_exists("repository","vcache") ){
471 db_multi_exec(
472 "CREATE %s TABLE IF NOT EXISTS vcache(\n"
473 " vid INTEGER, -- check-in ID\n"
474 " fname TEXT, -- filename\n"
475 " rid INTEGER, -- artifact ID\n"
476 " PRIMARY KEY(vid,fname)\n"
477 ") WITHOUT ROWID", db_is_writeable("repository") ? "" : "TEMPORARY"
478 );
479 }
480 if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){
481 db_multi_exec(
482 "DELETE FROM vcache;\n"
@@ -496,17 +496,17 @@
496 return rid;
497 }
498
499 /*
500 ** Transfer content to the output. During the transfer, when text of
501 ** the following form is seen:
502 **
503 ** href="$ROOT/
504 ** action="$ROOT/
505 **
506 ** Convert $ROOT to the root URI of the repository. Allow ' in place of "
507 ** and any case for href or action.
508 */
509 static void convert_href_and_output(Blob *pIn){
510 int i, base;
511 int n = blob_size(pIn);
512 char *z = blob_buffer(pIn);
513
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,7 +1,12 @@
11
<title>Change Log</title>
22
3
+<a name='v2_4'></a>
4
+<h2>Changes for Version 2.4 (TBD)</h2>
5
+
6
+ * Correct the [/help?cmd=/doc|/doc] page to support read-only repositories.
7
+
38
<a name='v2_3'></a>
49
<h2>Changes for Version 2.3 (2017-07-21)</h2>
510
611
* Update the built-in SQLite to version 3.20.0 (beta).
712
* Update internal Unicode character tables, used in regular expression
813
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,7 +1,12 @@
1 <title>Change Log</title>
2
 
 
 
 
 
3 <a name='v2_3'></a>
4 <h2>Changes for Version 2.3 (2017-07-21)</h2>
5
6 * Update the built-in SQLite to version 3.20.0 (beta).
7 * Update internal Unicode character tables, used in regular expression
8
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,7 +1,12 @@
1 <title>Change Log</title>
2
3 <a name='v2_4'></a>
4 <h2>Changes for Version 2.4 (TBD)</h2>
5
6 * Correct the [/help?cmd=/doc|/doc] page to support read-only repositories.
7
8 <a name='v2_3'></a>
9 <h2>Changes for Version 2.3 (2017-07-21)</h2>
10
11 * Update the built-in SQLite to version 3.20.0 (beta).
12 * Update internal Unicode character tables, used in regular expression
13

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button