2 // PukiWiki - Yet another WikiWikiWeb clone.
4 // Copyright 2003-2017 PukiWiki Development Team
5 // License: GPL v2 or (at your option) any later version
7 // IndexPages plugin: Show a list of page names
9 function plugin_list_action()
11 global $vars, $_title_list, $_title_filelist, $whatsnew;
13 // Redirected from filelist plugin?
14 $filelist = (isset($vars['cmd']) && $vars['cmd'] === 'filelist');
17 'msg'=>$filelist ? $_title_filelist : $_title_list,
18 'body'=>plugin_list_getlist($filelist));
22 function plugin_list_getlist($withfilename = FALSE)
24 global $non_list, $whatsnew;
26 $pages = array_diff(get_existpages(), array($whatsnew));
28 $pages = array_diff($pages, preg_grep('/' . $non_list . '/S', $pages));
29 if (empty($pages)) return '';
31 return page_list($pages, 'read', $withfilename);