From 7c206b9c66a8c6008dacd8231c71df82ff4a437b Mon Sep 17 00:00:00 2001 From: Kanti Date: Mon, 11 Aug 2014 17:11:36 +0200 Subject: [PATCH 1/2] Added get_content_tag function for better handling multiple content Tags. like ', $content); - if(isset($arr[1])) { - $oldtitle = ltrim(rtrim(str_replace('', $content); - if(isset($arr[1])) { - $oldtitle = ltrim(rtrim(str_replace('', $content); - if(isset($arr[1])) { - $oldtitle = ltrim(rtrim(str_replace('', $content); - if (isset($arr[1])) { - $title = str_replace('', $content); - if (isset($arr[1])) { - $title = str_replace('', $content); - if (isset($arr[1])) { - $title = str_replace('', $content); - if (isset($arr[1])) { - $title = str_replace('', $content); - if (isset($arr[1])) { - $title = str_replace('(\s|)/', '', $content)); } \ No newline at end of file From 0ef08de74c113e10b293678aa4a55246ae59281c Mon Sep 17 00:00:00 2001 From: Kanti Date: Mon, 11 Aug 2014 17:15:05 +0200 Subject: [PATCH 2/2] small bug fix --- system/includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/includes/functions.php b/system/includes/functions.php index b1b186b..ee15f08 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -1055,6 +1055,9 @@ function get_title_from_file($v) // Get the contents and convert it to HTML $content = MarkdownExtra::defaultTransform(file_get_contents($v)); + $replaced = substr($v, 0, strrpos($v, '/')) . '/'; + $base = str_replace($replaced, '', $v); + // Extract the title and body return get_content_tag('t',$content,str_replace('-', ' ', str_replace('.md', '', $base))); }