Изменения документа Space Used
Редактировал(а) Dmitriy Rybakov 08.08.2025, 15:49
От версии 1.1
отредактировано Dmitriy Rybakov
на 05.08.2025, 13:07
на 05.08.2025, 13:07
Изменить комментарий:
Imported from XAR
К версии 2.1
отредактировано Dmitriy Rybakov
на 08.08.2025, 15:49
на 08.08.2025, 15:49
Изменить комментарий:
К данной версии нет комментариев
Сводка
-
Свойства страницы (1 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Содержимое
-
... ... @@ -9,7 +9,6 @@ 9 9 __xwikiattrecyclebin__ : Recycle bin of attachments. 10 10 11 11 {{velocity}} 12 - 13 13 ## Check if Filesystem Storage is enabled at the moment. 14 14 #set($fsstore = false) 15 15 #if($xcontext.getContext().getWiki().getAttachmentStore().getClass().getName().contains("Filesystem")) ... ... @@ -16,7 +16,6 @@ 16 16 #set($fsstore = true) 17 17 #end 18 18 19 - 20 20 #if($hasProgramming) 21 21 #set($sqlTools = $xwiki.parseGroovyFromPage('Admin.SQLToolsGroovy')) 22 22 #set($system = $sqlTools.getXWikiDatabaseSystemFromDatabaseMetadata($xcontext)) ... ... @@ -24,13 +24,13 @@ 24 24 #if($system == 'HSQL Database Engine') 25 25 {{warning}}$system is not supported for this action{{/warning}} 26 26 #else 27 - #if($services.wikimanager) 28 - #set($dbs = $services.wikimanager.getAllWikis()) 29 - #elseif($services.wiki) 25 + ## >>> FIX: никогда не используем wikimanager (ломается на Hibernate 6) 26 + #if($services.wiki) 30 30 #set($dbs = $services.wiki.getAllIds()) 31 31 #else 32 32 #set($dbs = ["$xcontext.getDatabase()"]) 33 33 #end 31 + ## <<< 34 34 35 35 #if($fsstore) 36 36 #set($tables = ['xwikirecyclebin','xwikircs']) ... ... @@ -40,6 +40,7 @@ 40 40 41 41 #set($prefix = $xwiki.getXWiki().Param('xwiki.db.prefix','')) 42 42 #set($connection = $sqlTools.getXWikiConnection($xwiki, $xcontext)) 41 + 43 43 #foreach($schema in $dbs) 44 44 #set($alltables = '') 45 45 $xcontext.setDatabase($schema) ... ... @@ -47,11 +47,13 @@ 47 47 #if($schema == "xwiki") 48 48 #set($schema = $xwiki.getXWiki().Param('xwiki.db', $schema)) 49 49 #end 49 + 50 50 #foreach($table in $tables) 51 51 #set($query = "select sum(round(data_length/1024/1024,2)) as '${table}' from information_schema.tables where table_name='${table}' and table_schema='${prefix}${schema}';") 52 52 #set($results = $sqlTools.getResults($connection, $query, false)) 53 53 #set($alltables = $alltables + $results) 54 54 #end 55 + 55 55 $alltables 56 56 #end 57 57 #end ... ... @@ -64,4 +64,5 @@ 64 64 #if($fsstore != true) 65 65 {{warning}}It appears that you're not using the filesystem attachment store feature. You should use it if you plan to have large documents in your wiki. This feature is available since XWiki 3.4. More information [[here>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments#HFilesystemAttachmentStore]]{{/warning}} 66 66 #end 68 + 67 67 {{/velocity}}