Última modificación por Administrator el 2020/06/08 08:27

Desde la versión < 3.1 >
editado por Administrator
el 2020/06/07 23:21
Hasta la versión < 4.1 >
editado por Administrator
el 2020/06/07 23:31
< >
Comentario del cambio: No hay comentario para esta versión

Summary

Details

Icon Blog.BlogPostClass[0]
Contenido
... ... @@ -1,31 +1,2 @@
1 1  Publicada checklist para aplicaciones amap 2.1 en el [[apartado QA>>AMAP.QA]]
2 2  
3 -{{groovy}}
4 -import java.util.List
5 -import com.xpn.xwiki.api.DeletedAttachment
6 -
7 -// Send in request if you want to empty the trash bin for the whole wiki
8 -def query = "select distinct ddoc.id from DeletedAttachment as ddoc "
9 -def trashed = xwiki.search(query)
10 -println "Total number of attachments to clean: ${trashed.size()}"
11 -if (trashed) {
12 - def deleted = 0
13 - println "Trashed attachments"
14 - trashed.each() {
15 - def att = xwiki.getDeletedAttachment(it.toString())
16 - def attachmentReference = services.model.createAttachmentReference(services.model.resolveDocument(att.docName), att.filename)
17 - println "* ${services.model.serialize(attachmentReference)}"
18 - if (request.trashed == '1') {
19 - att.delete()
20 - }
21 - }
22 - println ""
23 - if (request.trashed != '1') {
24 - println "[[Confirm Cleaning Attachments>>||queryString='trashed=1']]"
25 - } else {
26 - println "[[Back>>||queryString='']]"
27 - }
28 -} else {
29 - println "Everything's clean. No trashed document found."
30 -}
31 -{{/groovy}}
© 2014 GOBIERNO DE CANTABRIA - AVISO LEGAL Y PROTECCIÓN DE DATOS