Исходный код вики Show Large History
Редактировал(а) Dmitriy Rybakov 05.08.2025, 13:07
Последние авторы
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | |||
| 3 | #if($hasProgramming) | ||
| 4 | #set($sqlTools = $xwiki.parseGroovyFromPage('Admin.SQLToolsGroovy')) | ||
| 5 | #set($system = $sqlTools.getXWikiDatabaseSystemFromDatabaseMetadata($xcontext)) | ||
| 6 | Your database is: **$system** | ||
| 7 | #if($system == "HSQL Database Engine") | ||
| 8 | {{warning}}$system is not supported for this action{{/warning}} | ||
| 9 | #end | ||
| 10 | |||
| 11 | #set($query = "select count(r.xwr_docid) as Versions,d.xwd_id,d.xwd_fullname from xwikircs as r,xwikidoc as d where r.xwr_docid=d.xwd_id group by d.xwd_id order by count(r.xwr_docid) DESC limit 20;") | ||
| 12 | #set($connection = $sqlTools.getXWikiConnection($xwiki, $xcontext)) | ||
| 13 | #set($results = $sqlTools.getResults($connection, $query, false)) | ||
| 14 | = Largest documents of wiki $xcontext.getDatabase() = | ||
| 15 | $results | ||
| 16 | #else | ||
| 17 | {{error}}Sorry, you need the programming rights to use this tool{{/error}} | ||
| 18 | #end | ||
| 19 | {{/velocity}} |