浏览代码

Ignore files starting with an underscore

acstll 11 年之前
父节点
当前提交
da536894f4
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      lib/pico.php

+ 7 - 0
lib/pico.php

@@ -232,6 +232,13 @@ class Pico {
 				unset($pages[$key]);
 				continue;
 			}			
+
+			// Ignore files starting with an underscore
+			if (substr(basename($page), 0, 1) == '_') {
+				unset($pages[$key]);
+				continue;
+			}
+
 			// Get title and format $page
 			$page_content = file_get_contents($page);
 			$page_meta = $this->read_file_meta($page_content);