]> git.quilime.com - plog.git/commitdiff
index file recognizes endings on pages
authorGabriel Dunne <gdunne@quilime.com>
Sat, 10 Jul 2010 01:39:52 +0000 (18:39 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Sat, 10 Jul 2010 01:39:52 +0000 (18:39 -0700)
public/index.php

index e8b9d9f674e314bfc4f69ee80c4861f9b5138c16..ba03ff2f2d9e767a5cd03a151be2a7b12f9613a6 100644 (file)
@@ -10,7 +10,7 @@
     $t = get_template_instance();    
     $t->response_format = $response_format;
     $t->assign('view', $_GET['v']);
-        
+    
     # is folder
     if (is_dir(LOCAL_ROOT . CONTENT_DIR . $url_parts['url']) && $url_parts['url'] != "/") {
         list($data, $total) = get_entries($url_parts['url']);
@@ -24,8 +24,8 @@
         $template = 'single.'.$response_format.'.tpl';        
     }
     # is page
-    else if (is_file( LOCAL_ROOT . PAGE_DIR . $url_parts['url'])) {
-        $page = parse_entry(new SplFileInfo(LOCAL_ROOT . PAGE_DIR . $url_parts['url']), 1);
+    else if (is_file( LOCAL_ROOT . PAGE_DIR . DIRECTORY_SEPARATOR . $url_parts['filename'])) {
+        $page = parse_entry(new SplFileInfo(LOCAL_ROOT . PAGE_DIR . DIRECTORY_SEPARATOR . $url_parts['filename']), 1);
         $t->assign('data', $page);
         $template = $page['config']['template'] ? $page['config']['template'] . '.' . $response_format . '.tpl' : 'page.' . $response_format . '.tpl';
     }