7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package Magic3 Framework
10 * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11 * @copyright Copyright 2006-2008 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: list.inc.php 1084 2008-10-18 06:10:55Z fishbone $
14 * @link http://www.magic3.org
16 function plugin_list_action()
18 //global $vars, $_title_list, $_title_filelist, $whatsnew;
19 global $_title_list, $_title_filelist;
21 // Redirected from filelist plugin?
22 //$filelist = (isset($vars['cmd']) && $vars['cmd'] == 'filelist');
23 $filelist = (WikiParam::getCmd() == 'filelist');
26 'msg'=>$filelist ? $_title_filelist : $_title_list,
27 'body'=>plugin_list_getlist($filelist));
31 function plugin_list_getlist($withfilename = FALSE)
33 //global $non_list, $whatsnew;
36 //$pages = array_diff(get_existpages(), array($whatsnew));
37 $pages = array_diff(get_existpages(), array(WikiConfig::getWhatsnewPage()));
39 $pages = array_diff($pages, preg_grep('/' . $non_list . '/S', $pages));
40 if (empty($pages)) return '';
42 return page_list($pages, 'read', $withfilename);