From 212ca39a81054f8234ec5875bfb158d3b3772e7c Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 21 Jun 2015 21:47:07 -0300 Subject: [PATCH] Fixes on permalinks --- kernel/page.class.php | 4 ++++ kernel/post.class.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kernel/page.class.php b/kernel/page.class.php index ea33db56..8115a307 100644 --- a/kernel/page.class.php +++ b/kernel/page.class.php @@ -130,6 +130,10 @@ class Page extends fileContent return $url.'/'.$tmp; } + if(empty($htmlPath)) { + return '/'.$tmp; + } + return '/'.$htmlPath.'/'.$tmp; } diff --git a/kernel/post.class.php b/kernel/post.class.php index e8d23835..8b785563 100644 --- a/kernel/post.class.php +++ b/kernel/post.class.php @@ -120,6 +120,10 @@ class Post extends fileContent return $url.'/'.$tmp; } + if(empty($htmlPath)) { + return '/'.$tmp; + } + return '/'.$htmlPath.'/'.$tmp; }