DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:deletehistory

deletehistory Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Deletes old versions and edit history

Last updated on
2021-04-08
Provides
Admin
Repository
Source

Tagged with admin, history

A CosmoCode Plugin

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Usage

This plugin will let you delete the history of your wiki directly from the admin interface. No need to clean up directories with old versions and changelogs manually.

It is meant for a very specific use case: deleting all traces of preparatory work before the wiki is launched and opened to users.

:!: There is no way to restore the history after you click the Delete all history files button in the admin interface. Make sure you have a backup handy just in case.

Commit-Ticker

Releases:

Comments

Thank you, this is perfect for my needs. –lenehey


I noticed a minor bug that affects DokuWikis that have moved the “./data” directory out from the usual spot. Just to be clear - the “savedir” config variable is allowed to be relative (“./data”), or absolute (“/usr/local/www/dokuwiki-data”). But the code in the helper.php file of this plugin assumes that the data directory is relative.

Anyway, I made the following minor tweaks and got it working on my system:

diff helper.php helper.php-ORIG 
18,19c18,19
<             'pages' => $conf['savedir'] . '/attic',
<             'media' => $conf['savedir'] . '/media_attic',
---
>             'pages' => DOKU_INC . $conf['savedir'] . '/attic',
>             'media' => DOKU_INC . $conf['savedir'] . '/media_attic',
75c75
<         $path = $conf['savedir'] . '/' . $metaDir;
---
>         $path = DOKU_INC . $conf['savedir'] . '/' . $metaDir;

You can see what I mean, this code assumes that the $conf['savedir'] variable is relative, and hence needs the DOKU_INC path prepended. But savedir isn't necessarily relative.

A proper solution would probably be to insert a test, something like this

 if( str_starts_with($conf['savedir'], './') ) ...

Anyway, terrific plugin! Exactly what I needed!! Thanks! - Anonymous

plugin/deletehistory.txt · Last modified: 2024-06-11 00:14 by 76.10.128.182

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki