aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-04 19:27:44 +0000
committerMario <mario@mariovavti.com>2023-01-04 19:27:44 +0000
commit3ad36db7dd3fe848937776d56a7c9243543ce887 (patch)
treec2c18a67bc4ea29122b15e4a282844092261ac2b /Zotlabs
parente16ea1ae0568238fa4c2236d1f050ef4a85749c7 (diff)
downloadvolse-hubzilla-3ad36db7dd3fe848937776d56a7c9243543ce887.tar.gz
volse-hubzilla-3ad36db7dd3fe848937776d56a7c9243543ce887.tar.bz2
volse-hubzilla-3ad36db7dd3fe848937776d56a7c9243543ce887.zip
pdledit_gui: minor cleanup
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Pdledit_gui.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/Zotlabs/Module/Pdledit_gui.php b/Zotlabs/Module/Pdledit_gui.php
index d8d362831..2f0e4a3e1 100644
--- a/Zotlabs/Module/Pdledit_gui.php
+++ b/Zotlabs/Module/Pdledit_gui.php
@@ -220,6 +220,7 @@ class Pdledit_gui extends Controller {
function get_modules() {
$ret = '';
+ $arr = [];
$files = glob('Zotlabs/Module/*.php');
if($files) {
@@ -232,7 +233,7 @@ class Pdledit_gui extends Controller {
$x = theme_include('mod_' . $name . '.pdl');
if($x) {
- $ret .= '<div class="mb-2"><a href="pdledit_gui/' . $name . '">' . $name . '</a></div>';
+ $arr[] = $name;
}
}
}
@@ -240,17 +241,21 @@ class Pdledit_gui extends Controller {
$addons = plugins_installed_list();
if ($addons) {
foreach ($addons as $name) {
- $path = 'addon/' . $name . '/Mod_' . ucfirst($name) . '.php';
-
- if (!file_exists($path)) {
- continue;
+ $path = 'addon/' . $name . '/mod_' . $name . '.pdl';
+ if (file_exists($path)) {
+ $arr[] = $name;
}
-
- $ret .= '<div class="mb-2"><a href="pdledit_gui/' . $name . '">' . $name . '</a></div>';
}
}
+ sort($arr);
+
+ foreach ($arr as $name) {
+ $ret .= '<div class="mb-2"><a href="pdledit_gui/' . $name . '">' . $name . '</a></div>';
+ }
+
return $ret;
+
}
function get_widgets($module) {