2 // PukiWiki - Yet another WikiWikiWeb clone.
3 // $Id: list.inc.php,v 1.6 2006/05/13 07:36:41 henoheno Exp $
5 // IndexPages plugin: Show a list of page names
7 function plugin_list_action()
9 global $vars, $_title_list, $_title_filelist, $whatsnew;
11 // Redirected from filelist plugin?
12 $filelist = (isset($vars['cmd']) && $vars['cmd'] == 'filelist');
15 'msg'=>$filelist ? $_title_filelist : $_title_list,
16 'body'=>plugin_list_getlist($filelist));
20 function plugin_list_getlist($withfilename = FALSE)
22 global $non_list, $whatsnew;
24 $pages = array_diff(get_existpages(), array($whatsnew));
26 $pages = array_diff($pages, preg_grep('/' . $non_list . '/S', $pages));
27 if (empty($pages)) return '';
29 return page_list($pages, 'read', $withfilename);