Fossil SCM

On the /secaudit0 page, add a link to the canonical URL setting in the /setup_config page, per request in [forum:154494bfaf45949ca93|forum post 154494bfaf45949ca93].

stephan 2022-07-17 17:30 trunk
Commit 861ec9c7b767da58c2b0d82b972f31c9f13a6e743fc3f548df1d9bccf7453253
1 file changed +4 -3
--- src/security_audit.c
+++ src/security_audit.c
@@ -208,12 +208,12 @@
208208
zPublicUrl = public_url();
209209
if( zPublicUrl!=0 ){
210210
int nOther = db_int(0, "SELECT count(*) FROM config"
211211
" WHERE name GLOB 'baseurl:*'"
212212
" AND name<>'baseurl:%q'", zPublicUrl);
213
- @ <li><p>The canonical URL for this repository is
214
- @ <a href="%s(zPublicUrl)">%h(zPublicUrl)</a>.
213
+ @ <li><p>The <a href="setup_config#eurl">canonical URL</a> for this
214
+ @ repository is <a href="%s(zPublicUrl)">%h(zPublicUrl)</a>.
215215
if( nOther==1 ){
216216
@ This is also <a href="urllist?urlonly">1 other URL</a> that has
217217
@ been used to access this repository.
218218
}else if( nOther>=2 ){
219219
@ There are also
@@ -221,11 +221,12 @@
221221
@ been used to access this repository.
222222
}
223223
}else{
224224
int nUrl = db_int(0, "SELECT count(*) FROM config"
225225
" WHERE name GLOB 'baseurl:*'");
226
- @ <li><p>This repository does not have a canonical access URL.
226
+ @ <li><p>This repository does not have a
227
+ @ <a href="setup_config#eurl">canonical access URL</a>.
227228
if( nUrl==1 ){
228229
@ There is
229230
@ <a href="urllist?urlonly">1 non-canonical URL</a>
230231
@ that has been used to access this repository.
231232
}else if( nUrl>=2 ){
232233
--- src/security_audit.c
+++ src/security_audit.c
@@ -208,12 +208,12 @@
208 zPublicUrl = public_url();
209 if( zPublicUrl!=0 ){
210 int nOther = db_int(0, "SELECT count(*) FROM config"
211 " WHERE name GLOB 'baseurl:*'"
212 " AND name<>'baseurl:%q'", zPublicUrl);
213 @ <li><p>The canonical URL for this repository is
214 @ <a href="%s(zPublicUrl)">%h(zPublicUrl)</a>.
215 if( nOther==1 ){
216 @ This is also <a href="urllist?urlonly">1 other URL</a> that has
217 @ been used to access this repository.
218 }else if( nOther>=2 ){
219 @ There are also
@@ -221,11 +221,12 @@
221 @ been used to access this repository.
222 }
223 }else{
224 int nUrl = db_int(0, "SELECT count(*) FROM config"
225 " WHERE name GLOB 'baseurl:*'");
226 @ <li><p>This repository does not have a canonical access URL.
 
227 if( nUrl==1 ){
228 @ There is
229 @ <a href="urllist?urlonly">1 non-canonical URL</a>
230 @ that has been used to access this repository.
231 }else if( nUrl>=2 ){
232
--- src/security_audit.c
+++ src/security_audit.c
@@ -208,12 +208,12 @@
208 zPublicUrl = public_url();
209 if( zPublicUrl!=0 ){
210 int nOther = db_int(0, "SELECT count(*) FROM config"
211 " WHERE name GLOB 'baseurl:*'"
212 " AND name<>'baseurl:%q'", zPublicUrl);
213 @ <li><p>The <a href="setup_config#eurl">canonical URL</a> for this
214 @ repository is <a href="%s(zPublicUrl)">%h(zPublicUrl)</a>.
215 if( nOther==1 ){
216 @ This is also <a href="urllist?urlonly">1 other URL</a> that has
217 @ been used to access this repository.
218 }else if( nOther>=2 ){
219 @ There are also
@@ -221,11 +221,12 @@
221 @ been used to access this repository.
222 }
223 }else{
224 int nUrl = db_int(0, "SELECT count(*) FROM config"
225 " WHERE name GLOB 'baseurl:*'");
226 @ <li><p>This repository does not have a
227 @ <a href="setup_config#eurl">canonical access URL</a>.
228 if( nUrl==1 ){
229 @ There is
230 @ <a href="urllist?urlonly">1 non-canonical URL</a>
231 @ that has been used to access this repository.
232 }else if( nUrl>=2 ){
233

Keyboard Shortcuts

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