Browse Source

Fix error on first install

pull/440/head
danpros 4 years ago
parent
commit
ec0dddf22b
2 changed files with 16 additions and 10 deletions
  1. +8
    -5
      system/admin/views/add-content.html.php
  2. +8
    -5
      system/admin/views/edit-content.html.php

+ 8
- 5
system/admin/views/add-content.html.php View File

@ -11,11 +11,14 @@ if ($type != 'is_post' && $type != 'is_image' && $type != 'is_video' && $type !=
$desc = get_category_info(null); $desc = get_category_info(null);
$tags = tag_cloud(true); $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));
}
?> ?>


+ 8
- 5
system/admin/views/edit-content.html.php View File

@ -56,11 +56,14 @@ if (config('permalink.type') == 'post') {
} }
$tags = tag_cloud(true); $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"/> <link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/>


Loading…
Cancel
Save