mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 04:26:22 +05:30
Update admin.php
This commit is contained in:
parent
e8ff5c1e29
commit
18f5a5d2a4
1 changed files with 0 additions and 21 deletions
|
|
@ -276,16 +276,6 @@ function edit_content($title, $tag, $url, $content, $oldfile, $destination = nul
|
||||||
|
|
||||||
$post_tag = implode(',', array_keys($newtag));
|
$post_tag = implode(',', array_keys($newtag));
|
||||||
|
|
||||||
$posts = get_post_sorted();
|
|
||||||
foreach ($posts as $index => $v) {
|
|
||||||
$arr = explode('_', $v['basename']);
|
|
||||||
if (strtolower($arr[2]) === strtolower($post_url . '.md')) {
|
|
||||||
$post_url = $post_url .'-'. $timestamp;
|
|
||||||
} else {
|
|
||||||
$post_url = $post_url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($description !== null) {
|
if ($description !== null) {
|
||||||
if (!empty($description)) {
|
if (!empty($description)) {
|
||||||
$post_description = "\n<!--d " . $description . " d-->";
|
$post_description = "\n<!--d " . $description . " d-->";
|
||||||
|
|
@ -529,17 +519,6 @@ function edit_page($title, $url, $content, $oldfile, $destination = null, $descr
|
||||||
$post_description = "";
|
$post_description = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$posts = get_static_pages();
|
|
||||||
$timestamp = date('YmdHis');
|
|
||||||
foreach ($posts as $index => $v) {
|
|
||||||
$arr = explode('/', $v);
|
|
||||||
if (strtolower($arr[2]) === strtolower($post_url . '.md')) {
|
|
||||||
$post_url = $post_url .'-'. $timestamp;
|
|
||||||
} else {
|
|
||||||
$post_url = $post_url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . "\n\n" . $content;
|
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . "\n\n" . $content;
|
||||||
|
|
||||||
if (!empty($post_title) && !empty($post_url) && !empty($post_content)) {
|
if (!empty($post_title) && !empty($post_url) && !empty($post_content)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue