From e33b5b92d8e441423f96c6154c5d2911b328b199 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 19 Mar 2008 17:31:06 +0000 Subject: * fixed several bugs with respect to the listing of plugins (as part of a system or vendor-OS) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1657 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/slxconfig | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/config-db/slxconfig b/config-db/slxconfig index 5825eac0..8900a3c1 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -486,8 +486,11 @@ sub listVendorOSes dumpElements('vendor-OS', undef, map { - my @plugins = sort $openslxDB->fetchInstalledPlugins($_->{id}); - $_->{plugins} = @plugins ? join(',', @plugins) : ''; + my @plugins = $openslxDB->fetchInstalledPlugins($_->{id}); + $_->{plugins} + = @plugins + ? join(',', sort map { $_->{plugin_name} } @plugins) + : ''; $_; } sort { $a->{name} cmp $b->{name} } @@ -603,8 +606,11 @@ sub searchVendorOSes dumpElements( 'vendor-OS', undef, map { - my @plugins = sort $openslxDB->fetchInstalledPlugins($_->{id}); - $_->{plugins} = @plugins ? join(',', @plugins) : ''; + my @plugins = $openslxDB->fetchInstalledPlugins($_->{id}); + $_->{plugins} + = @plugins + ? join(',', sort map { $_->{plugin_name} } @plugins) + : ''; $_; } sort { $a->{name} cmp $b->{name} } @@ -1329,7 +1335,7 @@ sub _expandSystems = "$export->{id} ($export->{name})"; # fetch detailed info about active plugins - my @installedPlugins = sort $openslxDB->fetchInstalledPlugins( + my @installedPlugins = $openslxDB->fetchInstalledPlugins( $export->{vendor_os_id} ); my $mergedSystem = dclone($_); @@ -1339,7 +1345,7 @@ sub _expandSystems ); my $mergedAttrs = $mergedSystem->{attrs} || {}; foreach my $plugin (@installedPlugins) { - next if !$mergedAttrs->{"${plugin}::active"}; + next if !$mergedAttrs->{"$plugin->{plugin_name}::active"}; push @activePlugins, $plugin; } if ($option{inherited}) { @@ -1351,7 +1357,7 @@ sub _expandSystems } } } - $_->{PLUGINS} = [ sort @activePlugins ]; + $_->{PLUGINS} = [ sort map { $_->{plugin_name} } @activePlugins ]; # rename attrs to ATTRIBUTES for display $_->{ATTRIBUTES} = $_->{attrs}; delete $_->{attrs}; -- cgit v1.2.3-55-g7522