diff --git a/system/admin/admin.php b/system/admin/admin.php
index 95178a1..b46eea1 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -458,6 +458,7 @@ function migrate($title, $time, $tags, $content, $url, $user, $source)
$post_date = date('Y-m-d-H-i-s', $time);
$post_title = $title;
$post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tags));
+ $post_tag = rtrim($post_tag, ',');
$post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url)));
if (!empty($source)) {
$post_content = '' . "\n\n" . $content . "\n\n" . 'Source: ' . $title . '';
diff --git a/system/htmly.php b/system/htmly.php
index 32cac92..61482bd 100644
--- a/system/htmly.php
+++ b/system/htmly.php
@@ -997,7 +997,7 @@ get('/:static', function ($static) {
'bodyclass' => 'inpage',
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $post->title,
'p' => $post,
- 'type' => 'staticpage',
+ 'type' => 'staticPage',
'is_page' => is_page(true),
));
}
@@ -1094,7 +1094,7 @@ get('/:static/edit', function ($static) {
'bodyclass' => 'editpage',
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $post->title,
'p' => $post,
- 'type' => 'staticpage',
+ 'type' => 'staticPage',
));
} else {
$login = site_url() . 'login';
@@ -1173,7 +1173,7 @@ get('/:static/delete', function ($static) {
'bodyclass' => 'deletepage',
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $post->title,
'p' => $post,
- 'type' => 'staticpage',
+ 'type' => 'staticPage',
));
} else {
$login = site_url() . 'login';
@@ -1220,7 +1220,7 @@ get('/:static/:sub', function ($static, $sub) {
'bodyclass' => 'inpage',
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $father_post[0]->title . ' » ' . $post->title,
'p' => $post,
- 'type' => 'staticpage',
+ 'type' => 'subPage',
'is_subpage' => is_subpage(true),
));
});
@@ -1254,7 +1254,7 @@ get('/:static/:sub/edit', function ($static, $sub) {
'bodyclass' => 'editpage',
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $post->title . ' » ',
'p' => $page,
- 'type' => 'staticpage',
+ 'type' => 'subPage',
));
} else {
$login = site_url() . 'login';
@@ -1344,7 +1344,7 @@ get('/:static/:sub/delete', function ($static, $sub) {
'bodyclass' => 'deletepage',
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $post->title . '' . $page->title,
'p' => $page,
- 'type' => 'staticpage',
+ 'type' => 'subPage',
));
} else {
$login = site_url() . 'login';
@@ -1418,7 +1418,7 @@ get('/:year/:month/:name', function ($year, $month, $name) {
'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $current->tagb . ' » ' . $current->title,
'prev' => has_prev($prev),
'next' => has_next($next),
- 'type' => 'blogpost',
+ 'type' => 'blogPost',
'is_post' => is_post(true),
));