fixed loading of file

first check for file.md else for file/index.md
This commit is contained in:
ahmet2106 2013-08-03 18:11:28 +02:00
parent ec37ff4e75
commit cf4fd9024f

View file

@ -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)){