Modified Pico::get_pages() to ignore Emacs (~) and Nano (#) temp files

This commit is contained in:
Curtis Mattoon 2013-08-06 20:34:36 -04:00
parent ec37ff4e75
commit 10eeea80c1

View file

@ -218,7 +218,11 @@ class Pico {
unset($pages[$key]);
continue;
}
// Ignore Emacs (and Nano) temp files
if (in_array(substr($page, -1), array('~','#'))) {
unset($pages[$key]);
continue;
}
// Get title and format $page
$page_content = file_get_contents($page);
$page_meta = $this->read_file_meta($page_content);
@ -336,4 +340,4 @@ class Pico {
}
?>
?>