Browse Source

Update admin.php

pull/663/merge
danpros 1 year ago
parent
commit
c53518422b
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      system/admin/admin.php

+ 1
- 2
system/admin/admin.php View File

@ -509,8 +509,7 @@ function add_page($title, $url, $content, $description = null)
$posts = get_static_pages(); $posts = get_static_pages();
$timestamp = date('YmdHis'); $timestamp = date('YmdHis');
foreach ($posts as $index => $v) { foreach ($posts as $index => $v) {
$arr = explode('/', $v);
if (strtolower($arr[2]) === strtolower($post_url . '.md')) {
if (strtolower($v['basename']) === strtolower($post_url . '.md')) {
$post_url = $post_url .'-'. $timestamp; $post_url = $post_url .'-'. $timestamp;
} else { } else {
$post_url = $post_url; $post_url = $post_url;


Loading…
Cancel
Save