diff --git a/system/admin/admin.php b/system/admin/admin.php index 46c1855..afb62f4 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -5,7 +5,9 @@ function user($key, $user=null) { static $_config = array(); if (file_exists($value)) { $_config = parse_ini_file($value, true); - return $_config[$key]; + if(!empty($_config[$key])) { + return $_config[$key]; + } } } diff --git a/system/admin/views/delete-page.html.php b/system/admin/views/delete-page.html.php index 56c4e6d..5db0fd6 100644 --- a/system/admin/views/delete-page.html.php +++ b/system/admin/views/delete-page.html.php @@ -1,5 +1,7 @@ file; $dir = substr($url, 0, strrpos($url, '/')); @@ -8,11 +10,17 @@ $post = site_url() . $oldmd; - if($destination == 'post') { - $back = $post; + if(isset($destination)) { + + if($destination == 'post') { + $back = $post; + } + else { + $back = site_url() . $destination; + } } else { - $back = site_url() . $destination; + $back = site_url(); } ?> diff --git a/system/admin/views/delete-post.html.php b/system/admin/views/delete-post.html.php index adea149..13e16bf 100644 --- a/system/admin/views/delete-post.html.php +++ b/system/admin/views/delete-post.html.php @@ -1,5 +1,7 @@ file; $oldurl = explode('_', $url); $oldtag = $oldurl[1]; @@ -15,11 +17,17 @@ // The post URL $post = site_url().date('Y/m', $postdate).'/'.$oldmd; - if($destination == 'post') { - $back = $post; + if(isset($destination)) { + + if($destination == 'post') { + $back = $post; + } + else { + $back = site_url() . $destination; + } } else { - $back = site_url() . $destination; + $back = site_url(); } ?> diff --git a/system/admin/views/denied.html.php b/system/admin/views/denied.html.php new file mode 100644 index 0000000..4ad1fac --- /dev/null +++ b/system/admin/views/denied.html.php @@ -0,0 +1 @@ +