Lines 101-124
if ( $step && $step == 1 ) {
Link Here
|
101 |
my $perl_modules = C4::Installer::PerlModules->new; |
101 |
my $perl_modules = C4::Installer::PerlModules->new; |
102 |
$perl_modules->versions_info; |
102 |
$perl_modules->versions_info; |
103 |
|
103 |
|
104 |
my $modules = $perl_modules->get_attr('missing_pm'); |
104 |
my $missing_modules = $perl_modules->get_attr('missing_pm'); |
105 |
if ( scalar(@$modules) ) { |
105 |
my $upgrade_modules = $perl_modules->get_attr('upgrade_pm'); |
106 |
my @components = (); |
106 |
if ( scalar(@$missing_modules) || scalar(@$upgrade_modules) ) { |
107 |
foreach (@$modules) { |
107 |
my @missing = (); |
|
|
108 |
my @upgrade = (); |
109 |
foreach (@$missing_modules) { |
108 |
my ( $module, $stats ) = each %$_; |
110 |
my ( $module, $stats ) = each %$_; |
109 |
$checkmodule = 0 if $stats->{'required'}; |
111 |
$checkmodule = 0 if $stats->{'required'}; |
110 |
push( |
112 |
push( |
111 |
@components, |
113 |
@missing, |
112 |
{ |
114 |
{ |
113 |
name => $module, |
115 |
name => $module, |
114 |
version => $stats->{'min_ver'}, |
116 |
min_version => $stats->{'min_ver'}, |
|
|
117 |
max_version => $stats->{'max_ver'}, |
115 |
require => $stats->{'required'} |
118 |
require => $stats->{'required'} |
116 |
} |
119 |
} |
117 |
); |
120 |
); |
118 |
} |
121 |
} |
119 |
@components = sort { $a->{'name'} cmp $b->{'name'} } @components; |
122 |
foreach (@$upgrade_modules) { |
|
|
123 |
my ( $module, $stats ) = each %$_; |
124 |
$checkmodule = 0 if $stats->{'required'}; |
125 |
push( |
126 |
@upgrade, |
127 |
{ |
128 |
name => $module, |
129 |
min_version => $stats->{'min_ver'}, |
130 |
max_version => $stats->{'max_ver'}, |
131 |
require => $stats->{'required'} |
132 |
} |
133 |
); |
134 |
} |
135 |
@missing = sort { $a->{'name'} cmp $b->{'name'} } @missing; |
136 |
@upgrade = sort { $a->{'name'} cmp $b->{'name'} } @upgrade; |
120 |
$template->param( |
137 |
$template->param( |
121 |
missing_modules => \@components, |
138 |
missing_modules => \@missing, |
|
|
139 |
upgrade_modules => \@upgrade, |
122 |
checkmodule => $checkmodule, |
140 |
checkmodule => $checkmodule, |
123 |
op => $op |
141 |
op => $op |
124 |
); |
142 |
); |