diff --git a/lib/pico.php b/lib/pico.php index d2230bd39b075b1a6dfc8dee80809191cd3f6f48..2ea401482ee69a120cddc17c98b5a70319014c74 100644 --- a/lib/pico.php +++ b/lib/pico.php @@ -37,8 +37,8 @@ class Pico { else $file = CONTENT_DIR .'index'; // Load the file - if(is_dir($file)) $file = CONTENT_DIR . $url .'/index'. CONTENT_EXT; - else $file .= CONTENT_EXT; + if(file_exists($file.CONTENT_EXT)) $file .= CONTENT_EXT; + else if(is_dir($file)) $file = CONTENT_DIR . $url .'/index'. CONTENT_EXT; $this->run_hooks('before_load_content', array(&$file)); if(file_exists($file)){