Fossil SCM

Do put hyperlinks to attachments in tickets and wiki if attachment download is prohibited. Ticket [a7eff56a933249258f0d902].

drh 2010-09-05 11:44 trunk
Commit f7e2d74a85e9fced00b8b188055e2c309292febf
2 files changed +7 -2 +4 -3
+7 -2
--- src/tkt.c
+++ src/tkt.c
@@ -346,12 +346,17 @@
346346
if( cnt==0 ){
347347
@ <hr><h2>Attachments:</h2>
348348
@ <ul>
349349
}
350350
cnt++;
351
- @ <li><a href="%s(g.zTop)/attachview?tkt=%s(zFullName)&file=%t(zFile)">
352
- @ %h(zFile)</a> add by %h(zUser) on
351
+ if( g.okRead && g.okHistory ){
352
+ @ <li><a href="%s(g.zTop)/attachview?tkt=%s(zFullName)&file=%t(zFile)">
353
+ @ %h(zFile)</a>
354
+ }else{
355
+ @ %h(zFile)
356
+ }
357
+ @ added by %h(zUser) on
353358
hyperlink_to_date(zDate, ".");
354359
if( g.okWrTkt && g.okAttach ){
355360
@ [<a href="%s(g.zTop)/attachdelete?tkt=%s(zFullName)&file=%t(zFile)&from=%s(g.zTop)/tktview%%3fname=%s(zFullName)">delete</a>]
356361
}
357362
}
358363
--- src/tkt.c
+++ src/tkt.c
@@ -346,12 +346,17 @@
346 if( cnt==0 ){
347 @ <hr><h2>Attachments:</h2>
348 @ <ul>
349 }
350 cnt++;
351 @ <li><a href="%s(g.zTop)/attachview?tkt=%s(zFullName)&file=%t(zFile)">
352 @ %h(zFile)</a> add by %h(zUser) on
 
 
 
 
 
353 hyperlink_to_date(zDate, ".");
354 if( g.okWrTkt && g.okAttach ){
355 @ [<a href="%s(g.zTop)/attachdelete?tkt=%s(zFullName)&file=%t(zFile)&from=%s(g.zTop)/tktview%%3fname=%s(zFullName)">delete</a>]
356 }
357 }
358
--- src/tkt.c
+++ src/tkt.c
@@ -346,12 +346,17 @@
346 if( cnt==0 ){
347 @ <hr><h2>Attachments:</h2>
348 @ <ul>
349 }
350 cnt++;
351 if( g.okRead && g.okHistory ){
352 @ <li><a href="%s(g.zTop)/attachview?tkt=%s(zFullName)&file=%t(zFile)">
353 @ %h(zFile)</a>
354 }else{
355 @ %h(zFile)
356 }
357 @ added by %h(zUser) on
358 hyperlink_to_date(zDate, ".");
359 if( g.okWrTkt && g.okAttach ){
360 @ [<a href="%s(g.zTop)/attachdelete?tkt=%s(zFullName)&file=%t(zFile)&from=%s(g.zTop)/tktview%%3fname=%s(zFullName)">delete</a>]
361 }
362 }
363
+4 -3
--- src/wiki.c
+++ src/wiki.c
@@ -226,16 +226,17 @@
226226
if( cnt==0 ){
227227
@ <hr><h2>Attachments:</h2>
228228
@ <ul>
229229
}
230230
cnt++;
231
- if( g.okHistory ){
231
+ if( g.okHistory && g.okRead ){
232232
@ <li><a href="%s(g.zTop)/attachview?page=%s(zPageName)&file=%t(zFile)">
233
+ @ %h(zFile)</a>
233234
}else{
234
- @ <li>
235
+ @ <li>%h(zFile)
235236
}
236
- @ %h(zFile)</a> add by %h(zUser) on
237
+ @ added by %h(zUser) on
237238
hyperlink_to_date(zDate, ".");
238239
if( g.okWrWiki && g.okAttach ){
239240
@ [<a href="%s(g.zTop)/attachdelete?page=%s(zPageName)&file=%t(zFile)&from=%s(g.zTop)/wiki%%3fname=%s(zPageName)">delete</a>]
240241
}
241242
}
242243
--- src/wiki.c
+++ src/wiki.c
@@ -226,16 +226,17 @@
226 if( cnt==0 ){
227 @ <hr><h2>Attachments:</h2>
228 @ <ul>
229 }
230 cnt++;
231 if( g.okHistory ){
232 @ <li><a href="%s(g.zTop)/attachview?page=%s(zPageName)&file=%t(zFile)">
 
233 }else{
234 @ <li>
235 }
236 @ %h(zFile)</a> add by %h(zUser) on
237 hyperlink_to_date(zDate, ".");
238 if( g.okWrWiki && g.okAttach ){
239 @ [<a href="%s(g.zTop)/attachdelete?page=%s(zPageName)&file=%t(zFile)&from=%s(g.zTop)/wiki%%3fname=%s(zPageName)">delete</a>]
240 }
241 }
242
--- src/wiki.c
+++ src/wiki.c
@@ -226,16 +226,17 @@
226 if( cnt==0 ){
227 @ <hr><h2>Attachments:</h2>
228 @ <ul>
229 }
230 cnt++;
231 if( g.okHistory && g.okRead ){
232 @ <li><a href="%s(g.zTop)/attachview?page=%s(zPageName)&file=%t(zFile)">
233 @ %h(zFile)</a>
234 }else{
235 @ <li>%h(zFile)
236 }
237 @ added by %h(zUser) on
238 hyperlink_to_date(zDate, ".");
239 if( g.okWrWiki && g.okAttach ){
240 @ [<a href="%s(g.zTop)/attachdelete?page=%s(zPageName)&file=%t(zFile)&from=%s(g.zTop)/wiki%%3fname=%s(zPageName)">delete</a>]
241 }
242 }
243

Keyboard Shortcuts

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