Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

PageAttic

Summary: How to store backup files of deleted pages in a separate directory
Version: 2006-01-29
Prerequisites: Last tested on PmWiki version: pmwiki-2.1.beta22
Status:
Maintainer: floozy

Question

The wiki.d/ directory can get crowded if many pages are deleted, especially in conjunction with the ExpireDiff recipe. How to store the backup files of deleted pages in a separate directory?

Answer

Attention: The third line of the script can cause a lot of trouble, if you use the PerGroupSubDirectories recipe. The good news are that it can be easily fixed. Just replace
$WikiDir = new AtticPageStore('wiki.d/{$FullName}');
with
$WikiDir = new AtticPageStore($WikiDir->dirfmt);
martin 2007-06-20
(Permission granted to delete this comment, if the patch is integrated into pageattic.phpΔ)

* Put a copy of the pageattic.phpΔ script into your cookbook/ directory.

  • Create a new wiki.attic/ subdirectory in your pmwiki folder, and provide it with write permissions (same procedure as for the wiki.d/ directory).
  • Add the following line to your local/config.php file:
    include_once('cookbook/pageattic.php');

Notes

The location of the attic directory can be controlled by setting the $AtticDir variable in your local/config.php file:

    $AtticDir = 'wiki.trash';

The directory is relative to the location containing the main pmwiki.php script, and should be specified without any trailing slash.

Contributors

  • floozy, 2006-01-29, Initial version
Edit - History - Print - Recent Changes - Search
Page last modified on April 15, 2008, at 05:36 PM