Explorar o código

Ignore files starting with an underscore

acstll %!s(int64=11) %!d(string=hai) anos
pai
achega
da536894f4
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      lib/pico.php

+ 7 - 0
lib/pico.php

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