diff --git a/system/admin/admin.php b/system/admin/admin.php index 18cb423..d02d831 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -1265,7 +1265,7 @@ function find_draft_page($static = null) } // Return draft static subpage. -function find_draft_subpage($static = null, $sub_static = null) +function find_draft_subpage($sub_static = null) { $posts = get_draft_subpages(); @@ -1278,9 +1278,7 @@ function find_draft_subpage($static = null, $sub_static = null) $post = new stdClass; - if (is_null($static)) { - $static = str_replace('content/static/', '', dirname($v['dirname'])); - } + $static = str_replace('content/static/', '', dirname($v['dirname'])); // The static page URL $url= $v['filename']; diff --git a/system/htmly.php b/system/htmly.php index 94e2857..dd9c8d9 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -3239,7 +3239,7 @@ get('/:static/:sub/edit', function ($static, $sub) { $page = find_subpage($static, $sub); if (!$page) { - $page = find_draft_subpage($static, $sub); + $page = find_draft_subpage($sub); if (!$page) { not_found(); } else { @@ -3341,7 +3341,7 @@ get('/:static/:sub/delete', function ($static, $sub) { $page = find_subpage($static, $sub); if (!$page) { - $page = find_draft_subpage($static, $sub); + $page = find_draft_subpage($sub); if (!$page) { not_found(); } else {