From 02c6a36a1af63c84c872e0fd4e0c14b4f25d0c3e Mon Sep 17 00:00:00 2001
From: Kanti
Date: Tue, 5 Aug 2014 17:11:58 +0200
Subject: [PATCH] Some destination bug fixes (SubPages)
---
system/admin/views/delete-page.html.php | 53 ++++++++++++++++-----------------
system/admin/views/edit-page.html.php | 2 +-
2 files changed, 26 insertions(+), 29 deletions(-)
diff --git a/system/admin/views/delete-page.html.php b/system/admin/views/delete-page.html.php
index 99aafa8..3a25687 100644
--- a/system/admin/views/delete-page.html.php
+++ b/system/admin/views/delete-page.html.php
@@ -1,33 +1,30 @@
file;
-
- $dir = substr($url, 0, strrpos($url, '/'));
- $oldurl = str_replace($dir . '/','',$url);
- $oldmd = str_replace('.md','',$oldurl);
-
- $post = site_url() . $oldmd;
-
- if(isset($destination)) {
-
- if($destination == 'post') {
- $back = $post;
- }
- else {
- $back = site_url() . $destination;
- }
- }
- else {
- $back = site_url();
- }
+ if (isset($_GET['destination'])) {
+ $destination = $_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 {
+ $back = site_url() . $destination;
+ }
+ } else {
+ $back = site_url();
+ }
?>
-Are you sure want to delete ' . $p->title . '?
';?>
+Are you sure want to delete title; ?>?
\ No newline at end of file
diff --git a/system/admin/views/edit-page.html.php b/system/admin/views/edit-page.html.php
index 58a0009..e5b500e 100644
--- a/system/admin/views/edit-page.html.php
+++ b/system/admin/views/edit-page.html.php
@@ -27,7 +27,7 @@
$oldurl = str_replace($dir . '/','',$url);
$oldmd = str_replace('.md','',$oldurl);
- $delete = site_url() . $oldmd . '/delete?destination=' . $destination;
+ $delete = $p->url . '/delete?destination=' . $destination;
?>