OSDN Git Service

BugTrack2/140: check_non_list() handles
[pukiwiki/pukiwiki.git] / lib / func.php
index e643270..4d89ad7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: func.php,v 1.51 2005/11/29 08:13:26 teanan Exp $
+// $Id: func.php,v 1.52 2005/12/18 15:11:08 henoheno Exp $
 // Copyright (C)
 //   2002-2005 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -92,6 +92,18 @@ function is_freeze($page, $clearcache = FALSE)
        }
 }
 
+// Handling $non_list
+// $non_list will be preg_quote($str, '/') later.
+function check_non_list($page = '')
+{
+       global $non_list;
+       static $regex;
+
+       if (! isset($regex)) $regex = '/' . $non_list . '/';
+
+       return preg_match($regex, $page);
+}
+
 // Auto template
 function auto_template($page)
 {