aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Pdledit.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-08 07:43:40 +0000
committerMario <mario@mariovavti.com>2021-09-08 07:43:40 +0000
commit4c5f0a05c75cc66113f589a3ffe6df351abb1273 (patch)
tree15148d08a99f8375992e554a90e6d4333286a7cc /Zotlabs/Module/Pdledit.php
parent952407363e245d41986cfb90e4ccf509bddc7322 (diff)
parent977a55eb8423745e4d88257b704d3e36f7337b9f (diff)
downloadvolse-hubzilla-4c5f0a05c75cc66113f589a3ffe6df351abb1273.tar.gz
volse-hubzilla-4c5f0a05c75cc66113f589a3ffe6df351abb1273.tar.bz2
volse-hubzilla-4c5f0a05c75cc66113f589a3ffe6df351abb1273.zip
Merge branch '6.2RC'6.2
Diffstat (limited to 'Zotlabs/Module/Pdledit.php')
-rw-r--r--Zotlabs/Module/Pdledit.php26
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;
}
-
+
}