Skip to content
Snippets Groups Projects
Commit 7a112df5 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

add ignoreacl parameter to tpl_include_page #1369

This is needed to accomodate for the change in page_findnearest()
parent c7b8d977
No related branches found
No related tags found
No related merge requests found
...@@ -1709,14 +1709,19 @@ function tpl_license($img = 'badge', $imgonly = false, $return = false, $wrap = ...@@ -1709,14 +1709,19 @@ function tpl_license($img = 'badge', $imgonly = false, $return = false, $wrap =
* This function is useful to populate sidebars or similar features in a * This function is useful to populate sidebars or similar features in a
* template * template
* *
* @param string $pageid * @param string $pageid The page name you want to include
* @param bool $print * @param bool $print Should the content be printed or returned only
* @param bool $propagate * @param bool $propagate Search higher namespaces, too?
* @param bool $ignoreacl Include the page without chcking ACLs?
* @return bool|null|string * @return bool|null|string
*/ */
function tpl_include_page($pageid, $print = true, $propagate = false) { function tpl_include_page($pageid, $print = true, $propagate = false, $ignoreacl = false) {
if (!$pageid) return false; if (!$pageid) return false;
if ($propagate) $pageid = page_findnearest($pageid); if($propagate) {
$pageid = page_findnearest($pageid, $ignoreacl);
} elseif(!$ignoreacl && auth_quickaclcheck($pageid) == AUTH_NONE) {
return false;
}
global $TOC; global $TOC;
$oldtoc = $TOC; $oldtoc = $TOC;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment