OSDN Git Service

BugTrack/339: NAVI_EXCLUDE_PATTERNが効かない問題を修理
[pukiwiki/pukiwiki.git] / plugin / list.inc.php
1 <?php
2 /////////////////////////////////////////////////
3 // PukiWiki - Yet another WikiWikiWeb clone.
4 //
5 // $Id: list.inc.php,v 1.2 2003/04/01 08:05:26 panda Exp $
6 //
7 // °ìÍ÷¤Îɽ¼¨
8 function plugin_list_action()
9 {
10         global $vars,$_title_list,$_title_filelist,$whatsnew;
11         
12         header_lastmod($whatsnew);
13         
14         $filelist = (array_key_exists('cmd',$vars) and $vars['cmd']=='filelist'); //¸È©¤À¡Ä
15         
16         return array(
17                 'msg'=>$filelist ? $_title_filelist : $_title_list,
18                 'body'=>get_list($filelist)
19         );
20 }
21
22 // °ìÍ÷¤Î¼èÆÀ
23 function get_list($withfilename)
24 {
25         global $non_list,$whatsnew;
26         
27         $pages = array_diff(get_existpages(),array($whatsnew));
28         if (!$withfilename)
29         {
30                 $pages = array_diff($pages,preg_grep("/$non_list/",$pages));
31         }
32         if (count($pages) == 0)
33         {
34                 return '';
35         }
36         
37         return page_list($pages,'read',$withfilename);
38 }
39 ?>