From e1151923bd1a406b63acd3e0a506623b2719e299 Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Fri, 7 Aug 2015 14:05:51 +0700 Subject: [PATCH] Prepare release --- system/includes/functions.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/system/includes/functions.php b/system/includes/functions.php index 8b97b13d..939e4eb6 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -252,19 +252,25 @@ function get_posts($posts, $page = 1, $perpage = 0) $url = array(); $bc = array(); - $tLang = get_content_tag('tag', $content); - $tl = explode(',', rtrim($tLang, ',')); + $tagt = get_content_tag('tag', $content); $t = explode(',', rtrim($arr[1], ',')); - $tCom = array_combine($t, $tl); - foreach ($tCom as $key => $val) { - if(!empty($val)) { - $tag[] = array($val, site_url() . 'tag/' . $key); - } else { - $tag[] = array($key, site_url() . 'tag/' . $key); + if(!empty($tagt)) { + $tl = explode(',', rtrim($tagt, ',')); + $tCom = array_combine($t, $tl); + foreach ($tCom as $key => $val) { + if(!empty($val)) { + $tag[] = array($val, site_url() . 'tag/' . $key); + } else { + $tag[] = array($key, site_url() . 'tag/' . $key); + } + } + } else { + foreach ($t as $tt) { + $tag[] = array($tt, site_url() . 'tag/' . $tt); } } - + foreach ($tag as $a) { $url[] = '' . $a[0] . ''; $bc[] = '' . $a[0] . '';