From e16ea1ae0568238fa4c2236d1f050ef4a85749c7 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 4 Jan 2023 14:25:46 +0000 Subject: pdl editor for addon iitial commit --- boot.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index b02dad9d6..dd3861196 100644 --- a/boot.php +++ b/boot.php @@ -2268,6 +2268,7 @@ function load_pdl() { 'module' => App::$module, 'layout' => '' ]; + /** * @hooks load_pdl * Called when we load a PDL file or description. @@ -2281,20 +2282,26 @@ function load_pdl() { $u = App::$comanche->get_channel_id(); $s = ''; - if ($u) + if ($u) { $s = get_pconfig($u, 'system', $n); - if (!$s) + } + + if (!$s) { $s = $layout; + } - if ((!$s) && (($p = theme_include($n)) != '')) + if ((!$s) && (($p = theme_include($n)) != '')) { $s = @file_get_contents($p); - elseif (file_exists('addon/' . App::$module . '/' . $n)) + } + elseif ((!$s) && file_exists('addon/' . App::$module . '/' . $n)) { $s = @file_get_contents('addon/' . App::$module . '/' . $n); + } $arr = [ 'module' => App::$module, 'layout' => $s ]; + call_hooks('alter_pdl', $arr); $s = $arr['layout']; -- cgit v1.2.3