diff options
author | nobody <nobody@zotlabs.com> | 2021-08-25 19:13:31 -0700 |
---|---|---|
committer | nobody <nobody@zotlabs.com> | 2021-08-25 19:13:31 -0700 |
commit | aa2106f9495bee4dcf0701fbd9fec8de6fa44984 (patch) | |
tree | f2e7178f78311069bd54471f6c063c5901d16fb7 /Zotlabs/Module/Pdledit.php | |
parent | 73b53675b1a339cfd950845279438e35b4e2dc7c (diff) | |
parent | 6261d0826c49ca24df9f694931592fbb9bf60f7e (diff) | |
download | volse-hubzilla-aa2106f9495bee4dcf0701fbd9fec8de6fa44984.tar.gz volse-hubzilla-aa2106f9495bee4dcf0701fbd9fec8de6fa44984.tar.bz2 volse-hubzilla-aa2106f9495bee4dcf0701fbd9fec8de6fa44984.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Module/Pdledit.php')
-rw-r--r-- | Zotlabs/Module/Pdledit.php | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php index 36201544f..3b94c9611 100644 --- a/Zotlabs/Module/Pdledit.php +++ b/Zotlabs/Module/Pdledit.php @@ -27,10 +27,10 @@ class Pdledit extends Controller { info( t('Layout updated.') . EOL); goaway(z_root() . '/pdledit/' . $_REQUEST['module']); } - - + + function get() { - + if(! local_channel()) { notice( t('Permission denied.') . EOL); return; @@ -39,10 +39,8 @@ class Pdledit extends Controller { if(! Apps::system_app_installed(local_channel(), 'PDL Editor')) { //Do not display any associated widgets at this point App::$pdl = ''; - - $o = '<b>' . t('PDL Editor App') . ' (' . t('Not Installed') . '):</b><br>'; - $o .= t('Provides the ability to edit system page layouts'); - return $o; + $papp = Apps::get_papp('PDL Editor'); + return Apps::app_render($papp, 'module'); } if(argc() > 2 && argv(2) === 'reset') { @@ -68,7 +66,7 @@ class Pdledit extends Controller { $edited[] = substr(str_replace('.pdl','',$rv['k']),4); } } - + $files = glob('Zotlabs/Module/*.php'); if($files) { foreach($files as $f) { @@ -81,21 +79,21 @@ class Pdledit extends Controller { } $o .= '</div>'; - + // list module pdl files return $o; } - + $t = get_pconfig(local_channel(),'system',$module); $s = file_get_contents(theme_include($module)); if(! $t) { $t = $s; - } + } if(! $t) { notice( t('Layout not found.') . EOL); return ''; } - + $o = replace_macros(get_markup_template('pdledit.tpl'),array( '$header' => t('Edit System Page Description'), '$mname' => t('Module Name:'), @@ -107,8 +105,8 @@ class Pdledit extends Controller { '$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'), '$submit' => t('Submit') )); - + return $o; } - + } |