dev-util/idea-* minor fixes
[anomen-overlay.git] / www-apps / pmwiki / cookbook / PageAttic / pageattic.php
blob14623ce8d9a7bddd927d52e9a4e6c6353d0cf148
1 <?php if (!defined('PmWiki')) exit();
3 /*
4 PageAttic
6 Copyright 2006 floozy
7 Copyright 2011 Anomen (ludek_h@seznam.cz)
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
14 Usage:
15 Create wiki.attic directory
16 Add to local/config.php:
18 include_once("$FarmD/cookbook/pageattic.php");
19 $WikiDir = new AtticPageStore($WikiDir->dirfmt);
23 $RecipeInfo['PageAttic']['Version'] = '2011-10-26';
25 SDV($AtticDir,'wiki.attic');
27 class AtticPageStore extends PageStore {
29 function delete($pagename) {
30 global $AtticDir, $Now;
32 if (!file_exists("$AtticDir/.htaccess") && $fp = @fopen("$AtticDir/.htaccess", "w")) {
33 fwrite($fp, "Order Deny,Allow\nDeny from all\n");
34 fclose($fp);
37 $pagefile = $this->pagefile($pagename);
38 @rename($pagefile,"$AtticDir/".basename($pagefile).",del-$Now");