diff --git a/app/controllers/admin/plugin.php b/app/controllers/admin/plugin.php index 37b08cc5f06d8a5d42be1944614d1f09d921fce7..bc073a867190bc01210b5e0ba38fbd596ab28e19 100644 --- a/app/controllers/admin/plugin.php +++ b/app/controllers/admin/plugin.php @@ -509,7 +509,11 @@ class Admin_PluginController extends AuthenticatedController public function unregistered_action() { - $this->unknown_plugins = $this->plugin_admin->scanPluginDirectory(); + $plugins = $this->plugin_admin->scanPluginDirectory(); + usort($plugins, function ($a, $b) { + return $a['pluginname'] <=> $b['pluginname']; + }); + $this->unknown_plugins = $plugins; } /** diff --git a/app/views/admin/plugin/unregistered.php b/app/views/admin/plugin/unregistered.php index 8d0b3db41c08395923fa36622f5c9fbcb9874045..800d247dda4bce11f7e17b65f6b43343fbe1a70d 100644 --- a/app/views/admin/plugin/unregistered.php +++ b/app/views/admin/plugin/unregistered.php @@ -4,16 +4,16 @@ * @var array $unknown_plugins */ ?> -<table class="default"> +<table class="default sortable-table" data-sortlist="[[0, 0]]"> <caption> <?= _('Im Pluginverzeichnis vorhandene Plugins registrieren') ?> </caption> <thead> <tr> - <th><?= _('Name') ?></th> - <th><?= _('Pluginklasse') ?></th> - <th><?= _('Version') ?></th> - <th><?= _('Ursprung') ?></th> + <th data-sort="text"><?= _('Name') ?></th> + <th data-sort="text"><?= _('Pluginklasse') ?></th> + <th data-sort="digit"><?= _('Version') ?></th> + <th data-sort="text"><?= _('Ursprung') ?></th> <th><?= _('Registrieren') ?></th> </tr> </thead> diff --git a/lib/classes/PluginAdministration.php b/lib/classes/PluginAdministration.php index 747d74e819a8d94650e80cb9da78943969492028..f906842632f54f17e98a2affa1845983607daffe 100644 --- a/lib/classes/PluginAdministration.php +++ b/lib/classes/PluginAdministration.php @@ -405,9 +405,12 @@ class PluginAdministration $basepath = Config::get()->PLUGINS_PATH; $plugin_manager = PluginManager::getInstance(); $iterator = new RegexIterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($basepath, FilesystemIterator::FOLLOW_SYMLINKS | FilesystemIterator::UNIX_PATHS)), - '/plugin\.manifest$/', RecursiveRegexIterator::MATCH); + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($basepath, FilesystemIterator::FOLLOW_SYMLINKS | FilesystemIterator::UNIX_PATHS) + ), + '/plugin\.manifest$/', + RegexIterator::MATCH + ); foreach ($iterator as $manifest_file) { $manifest = $plugin_manager->getPluginManifest($manifest_file->getPath()); if (!isset($manifest['pluginclassname'])) {