* added links to edit/delete/hide custom page directly from page

This commit is contained in:
slawkens
2017-10-23 09:10:22 +02:00
parent 1610a4ab91
commit 72212f8256
3 changed files with 21 additions and 2 deletions

View File

@@ -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
{