diff --git a/system/admin/views/delete-category.html.php b/system/admin/views/delete-category.html.php index 1783d32..6aa9dc5 100644 --- a/system/admin/views/delete-category.html.php +++ b/system/admin/views/delete-category.html.php @@ -4,15 +4,8 @@ if (isset($_GET['destination'])) { $destination = _h($_GET['destination']); } $url = $p->file; - -$dir = substr($url, 0, strrpos($url, '/')); -$oldurl = str_replace($dir . '/', '', $url); -$oldmd = str_replace('.md', '', $oldurl); - $post = $p->url; - if (isset($destination)) { - if ($destination == 'post') { $back = $post; } else { diff --git a/system/admin/views/delete-page.html.php b/system/admin/views/delete-page.html.php index 1783d32..6aa9dc5 100644 --- a/system/admin/views/delete-page.html.php +++ b/system/admin/views/delete-page.html.php @@ -4,15 +4,8 @@ if (isset($_GET['destination'])) { $destination = _h($_GET['destination']); } $url = $p->file; - -$dir = substr($url, 0, strrpos($url, '/')); -$oldurl = str_replace($dir . '/', '', $url); -$oldmd = str_replace('.md', '', $oldurl); - $post = $p->url; - if (isset($destination)) { - if ($destination == 'post') { $back = $post; } else { diff --git a/system/admin/views/delete-post.html.php b/system/admin/views/delete-post.html.php index a78ea19..6aa9dc5 100644 --- a/system/admin/views/delete-post.html.php +++ b/system/admin/views/delete-post.html.php @@ -4,22 +4,8 @@ if (isset($_GET['destination'])) { $destination = _h($_GET['destination']); } $url = $p->file; -$oldurl = explode('_', $url); -$oldtag = $oldurl[1]; -$oldmd = str_replace('.md', '', $oldurl[2]); - -$replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; -$dt = str_replace($replaced, '', $oldurl[0]); -$t = str_replace('-', '', $dt); -$time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); -// The post date -$postdate = strtotime($timestamp); -// The post URL -$post = site_url() . date('Y/m', $postdate) . '/' . $oldmd; - +$post = $p->url; if (isset($destination)) { - if ($destination == 'post') { $back = $post; } else {