ExpireDiff

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

Provide an action to remove the page revision history from a page. Also allows expiring only portions of the history older than a given number of days.

Solution

Attach:expirediff.php

Discussion

This script adds ?action=expirediff, which removes all of the page revision history information from a wiki page. It requires the user to have edit permissions to the page, and handles locking. It also creates a backup copy of the page with the page revisions intact (same as if someone had requested to delete a page).

In addition, one can add the keepdays=nn parameter, which says to keep any page history within the past nn days. For example, ?action=expirediff&keepdays=7 will remove any page history older than seven days. By default keepdays is zero, which expires the entire page history.

To install this script, simply copy it into your local/ subdirectory, and then add the line

    include_once('local/expirediff.php');

to your local/config.php file.

See Also

Contributors

pmwiki-2.3.33 -- Last modified by {{Pm}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons