mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 12:06:22 +05:30
Update add-content.html.php
This commit is contained in:
parent
a0c91f65c7
commit
4b9d74f907
1 changed files with 5 additions and 1 deletions
|
|
@ -16,7 +16,11 @@ $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));
|
||||
if (!empty($ptags)) {
|
||||
$newlang = array_intersect_key($ptags, array_flip($tkey));
|
||||
} else {
|
||||
$newlang = array_combine($tkey, $tkey);
|
||||
}
|
||||
$tmp = serialize($newlang);
|
||||
file_put_contents($tagslang, print_r($tmp, true));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue