Fix error on first install

This commit is contained in:
danpros 2021-03-06 14:47:39 +07:00
commit ec0dddf22b
2 changed files with 16 additions and 10 deletions

View file

@ -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));
}
?>

View file

@ -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"/>