mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 19:26:08 +05:30
Fix error on first install
This commit is contained in:
parent
f098d189c4
commit
ec0dddf22b
2 changed files with 16 additions and 10 deletions
|
|
@ -11,11 +11,14 @@ if ($type != 'is_post' && $type != 'is_image' && $type != 'is_video' && $type !=
|
|||
$desc = get_category_info(null);
|
||||
|
||||
$tags = tag_cloud(true);
|
||||
$ptags = unserialize(file_get_contents('content/data/tags.lang'));
|
||||
$tkey = array_keys($tags);
|
||||
$newlang = array_intersect_key($ptags, array_flip($tkey));
|
||||
$tmp = serialize($newlang);
|
||||
file_put_contents('content/data/tags.lang', print_r($tmp, true));
|
||||
$tagslang = "content/data/tags.lang";
|
||||
if (file_exists($tagslang)) {
|
||||
$ptags = unserialize(file_get_contents($tagslang));
|
||||
$tkey = array_keys($tags);
|
||||
$newlang = array_intersect_key($ptags, array_flip($tkey));
|
||||
$tmp = serialize($newlang);
|
||||
file_put_contents($tagslang, print_r($tmp, true));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -56,11 +56,14 @@ if (config('permalink.type') == 'post') {
|
|||
}
|
||||
|
||||
$tags = tag_cloud(true);
|
||||
$ptags = unserialize(file_get_contents('content/data/tags.lang'));
|
||||
$tkey = array_keys($tags);
|
||||
$newlang = array_intersect_key($ptags, array_flip($tkey));
|
||||
$tmp = serialize($newlang);
|
||||
file_put_contents('content/data/tags.lang', print_r($tmp, true));
|
||||
$tagslang = "content/data/tags.lang";
|
||||
if (file_exists($tagslang)) {
|
||||
$ptags = unserialize(file_get_contents($tagslang));
|
||||
$tkey = array_keys($tags);
|
||||
$newlang = array_intersect_key($ptags, array_flip($tkey));
|
||||
$tmp = serialize($newlang);
|
||||
file_put_contents($tagslang, print_r($tmp, true));
|
||||
}
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue