aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Pdledit.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-13 20:01:05 +0000
committerMario <mario@mariovavti.com>2023-01-13 20:01:05 +0000
commit2805520d1bcb2640fc079d54f5f230f7b87d1f84 (patch)
tree43b3e5bb7c71522d04560015478765a7b763a5fe /Zotlabs/Module/Pdledit.php
parentf6d940606350eb8685c278af6d87f3a0b8c0f5e5 (diff)
parentfb7ca18820e7618325dded78a3c3a464dd01b391 (diff)
downloadvolse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.gz
volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.bz2
volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.zip
Merge remote-tracking branch 'origin/8.0RC'8.0
Diffstat (limited to 'Zotlabs/Module/Pdledit.php')
-rw-r--r--Zotlabs/Module/Pdledit.php37
1 files changed, 34 insertions, 3 deletions
diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php
index 3b94c9611..e0bbc31d0 100644
--- a/Zotlabs/Module/Pdledit.php
+++ b/Zotlabs/Module/Pdledit.php
@@ -78,6 +78,23 @@ class Pdledit extends Controller {
}
}
+ // addons
+ $o .= '<h2>Addons</h2>';
+
+ $addons = plugins_installed_list();
+
+ foreach ($addons as $addon) {
+
+ $path = 'addon/' . $addon . '/Mod_' . ucfirst($addon) . '.php';
+
+ if (!file_exists($path))
+ continue;
+
+ $o .= '<a href="pdledit/' . $addon . '" >' . $addon . '</a>' . ((in_array($addon, $edited)) ? ' ' . t('(modified)') . ' <a href="pdledit/' . $addon . '/reset" >' . t('Reset') . '</a>': '' ) . '<br />';
+
+ }
+
+
$o .= '</div>';
// list module pdl files
@@ -85,11 +102,25 @@ class Pdledit extends Controller {
}
$t = get_pconfig(local_channel(),'system',$module);
- $s = file_get_contents(theme_include($module));
- if(! $t) {
+ $s = '';
+
+ if(!$t) {
+ $sys_path = theme_include($module);
+
+ if ($sys_path) {
+ $s = file_get_contents($sys_path);
+ }
+ else {
+ $addon_path = 'addon/' . argv(1) . '/' . $module;
+ if (file_exists($addon_path)) {
+ $s = file_get_contents($addon_path);
+ }
+ }
+
$t = $s;
}
- if(! $t) {
+
+ if(!$t) {
notice( t('Layout not found.') . EOL);
return '';
}