diff --git a/index.php b/index.php index 102aa9ea..d3b14980 100644 --- a/index.php +++ b/index.php @@ -283,7 +283,7 @@ if($load_it) $query = $db->query( - 'SELECT `title`, `body`, `php`' . + 'SELECT `id`, `title`, `body`, `php`, `hidden`' . ' FROM `' . TABLE_PREFIX . 'pages`' . ' WHERE `name` LIKE ' . $db->quote($page) . ' AND `hidden` != 1 AND `access` <= ' . $db->quote($logged_access)); if($query->rowCount() > 0) // found page @@ -323,6 +323,12 @@ if($load_it) } else $content .= $query['body']; // plain html + + if(hasFlag(FLAG_CONTENT_PAGES) || superAdmin()) { + $content = $twig->render('admin.pages.links.html.twig', array( + 'page' => array('id' => $query['id'], 'hidden' => $query['hidden']) + )) . $content; + } } else { diff --git a/system/pages/admin/pages.php b/system/pages/admin/pages.php index 67a50277..c307eba7 100644 --- a/system/pages/admin/pages.php +++ b/system/pages/admin/pages.php @@ -56,7 +56,8 @@ if(!empty($action)) } } else if($action == 'delete') { - Pages::delete($id, $errors); + if(Pages::delete($id, $errors)) + success('Page with id ' . $id . ' has been deleted'); } else if($action == 'edit') { diff --git a/system/templates/admin.pages.links.html.twig b/system/templates/admin.pages.links.html.twig new file mode 100644 index 00000000..7425d852 --- /dev/null +++ b/system/templates/admin.pages.links.html.twig @@ -0,0 +1,12 @@ +
\ No newline at end of file