Skip to content

Commit 99420ad

Browse files
authored
Merge pull request dokuwiki#4249 from dokuwiki/fix-plugin-component-handling
fix listing of plugin components
2 parents 99a3daf + f51673e commit 99420ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/plugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use dokuwiki\Extension\CLIPlugin;
45
use dokuwiki\Extension\PluginController;
56
use splitbrain\phpcli\CLI;
67
use splitbrain\phpcli\Colors;
78
use splitbrain\phpcli\Options;
8-
use dokuwiki\Extension\CLIPlugin;
99
use splitbrain\phpcli\TableFormatter;
1010

1111
if (!defined('DOKU_INC')) define('DOKU_INC', realpath(__DIR__ . '/../') . '/');
@@ -94,7 +94,8 @@ protected function listPlugins()
9494
*/
9595
protected function loadPlugin($name)
9696
{
97-
if (plugin_isdisabled($name)) return null;
97+
[$basename] = explode('_', $name); // might be a sub component
98+
if (plugin_isdisabled($basename)) return null;
9899

99100
// execute the plugin CLI
100101
$class = "cli_plugin_$name";

inc/Extension/PluginController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ protected function getListByType($type, $enabled)
345345
foreach ($master_list as $plugin) {
346346
if (file_exists(DOKU_PLUGIN . "$plugin/$type.php")) {
347347
$plugins[] = $plugin;
348-
continue;
349348
}
350349

351350
$typedir = DOKU_PLUGIN . "$plugin/$type/";

0 commit comments

Comments
 (0)