From 3ad36db7dd3fe848937776d56a7c9243543ce887 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 4 Jan 2023 19:27:44 +0000 Subject: pdledit_gui: minor cleanup --- Zotlabs/Module/Pdledit_gui.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Zotlabs') 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 .= '
' . $name . '
'; + $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 .= '
' . $name . '
'; } } + sort($arr); + + foreach ($arr as $name) { + $ret .= '
' . $name . '
'; + } + return $ret; + } function get_widgets($module) { -- cgit v1.2.3