2 // PukiWiki - Yet another WikiWikiWeb clone
3 // $Id: deleted.inc.php,v 1.6 2005/01/22 04:22:01 henoheno Exp $
5 // Show deleted (= Exists in BACKUP_DIR or DIFF_DIR but not in DATA_DIR)
6 // page list to clean them up
9 // index.php?plugin=deleted[&file=on]
10 // index.php?plugin=deleted&dir=diff[&file=on]
12 function plugin_deleted_action()
15 global $_deleted_plugin_title, $_deleted_plugin_title_withfilename;
17 $dir = isset($vars['dir']) ? $vars['dir'] : 'backup';
18 $withfilename = isset($vars['file']);
20 $_DIR['diff' ]['dir'] = DIFF_DIR;
21 $_DIR['diff' ]['ext'] = '.txt';
22 $_DIR['backup']['dir'] = BACKUP_DIR;
23 $_DIR['backup']['ext'] = BACKUP_EXT; // .gz or .txt
24 //$_DIR['cache' ]['dir'] = CACHE_DIR; // No way to delete them via web browser now
25 //$_DIR['cache' ]['ext'] = '.ref';
26 //$_DIR['cache' ]['ext'] = '.rel';
28 if (! isset($_DIR[$dir]))
29 return array('msg'=>'Deleted plugin', 'body'=>'No such setting: Choose backup or diff');
31 $deleted_pages = array_diff(
32 get_existpages($_DIR[$dir]['dir'], $_DIR[$dir]['ext']),
36 $retval['msg'] = $_deleted_plugin_title_withfilename;
38 $retval['msg'] = $_deleted_plugin_title;
40 $retval['body'] = page_list($deleted_pages, $dir, $withfilename);