View | Details | Raw Unified | Return to bug 4444
Collapse All | Expand All

(-)a/about.pl (-109 / +39 lines)
Lines 17-30 Link Here
17
17
18
use strict;
18
use strict;
19
use warnings;
19
use warnings;
20
use C4::Output;    # contains gettemplate
20
21
use C4::Auth;
22
use C4::Context;
23
use CGI;
21
use CGI;
24
use LWP::Simple;
22
use LWP::Simple;
25
use XML::Simple;
23
use XML::Simple;
26
use Config;
24
use Config;
27
25
26
use C4::Output;    # contains gettemplate
27
use C4::Auth;
28
use C4::Context;
29
use C4::Installer;
30
28
my $query = new CGI;
31
my $query = new CGI;
29
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
32
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
30
    {
33
    {
Lines 60-177 $template->param( Link Here
60
    apacheVersion => $apacheVersion,
63
    apacheVersion => $apacheVersion,
61
    zebraVersion  => $zebraVersion,
64
    zebraVersion  => $zebraVersion,
62
);
65
);
63
my @component_names =
64
    qw/
65
Algorithm::CheckDigits
66
Biblio::EndnoteStyle
67
CGI
68
CGI::Carp
69
CGI::Session
70
CGI::Session::Serialize::yaml
71
Class::Factory::Util
72
Class::Accessor
73
Compress::Zlib
74
DBD::mysql
75
DBD::SQLite2
76
DBI
77
Data::Dumper
78
Data::ICal
79
Date::Calc
80
Date::ICal
81
Date::Manip
82
Digest::MD5
83
Digest::SHA
84
Email::Date
85
File::Temp
86
GD
87
GD::Barcode::UPCE
88
Getopt::Long
89
Getopt::Std
90
Graphics::Magick
91
HTML::Template::Pro
92
HTTP::Cookies
93
HTTP::OAI
94
HTTP::Request::Common
95
HTML::Scrubber
96
IPC::Cmd
97
JSON
98
LWP::Simple
99
LWP::UserAgent
100
Lingua::Stem
101
Lingua::Stem::Snowball
102
List::Util
103
List::MoreUtils
104
Locale::Currency::Format
105
Locale::Language
106
MARC::Crosswalk::DublinCore
107
MARC::Charset
108
MARC::File::XML
109
MARC::Record
110
MIME::Base64
111
MIME::Lite
112
MIME::QuotedPrint
113
Mail::Sendmail
114
Net::LDAP
115
Net::LDAP::Filter
116
Net::Z3950::ZOOM
117
Number::Format
118
PDF::API2
119
PDF::API2::Page
120
PDF::API2::Util
121
PDF::API2::Simple
122
PDF::Table
123
PDF::Reuse
124
PDF::Reuse::Barcode
125
POE
126
POSIX
127
Schedule::At
128
SMS::Send
129
Term::ANSIColor
130
Test
131
Test::Harness
132
Test::More
133
Text::CSV
134
Text::CSV_XS
135
Text::CSV::Encoded
136
Text::Iconv
137
Text::Wrap
138
Time::HiRes
139
Time::localtime
140
Unicode::Normalize
141
XML::Dumper
142
XML::LibXML
143
XML::LibXSLT
144
XML::SAX::ParserFactory
145
XML::SAX::Writer
146
XML::Simple
147
XML::RSS
148
YAML::Syck
149
      /;
150
66
151
my @components = ();
67
my @components = ();
152
68
153
my $counter=0;
69
my $perl_modules = C4::Installer::PerlModules->new;
154
foreach my $component ( sort @component_names ) {
70
$perl_modules->version_info;
155
    my $version;
71
156
    if ( eval "require $component" ) {
72
my @pm_types = qw(missing_pm upgrade_pm current_pm);
157
        $version = $component->VERSION;
73
158
        if ( $version eq '' ) {
74
foreach my $pm_type(@pm_types) {
159
            $version = 'unknown';
75
    my $modules = $perl_modules->get_attr($pm_type);
160
        }
76
    foreach (@$modules) {
77
        my ($module, $stats) = each %$_;
78
        push(
79
            @components,
80
            {
81
                name    => $module,
82
                version => $stats->{'cur_ver'},
83
                missing => ($pm_type eq 'missing_pm' ? 1 : 0),
84
                upgrade => ($pm_type eq 'upgrade_pm' ? 1 : 0),
85
                current => ($pm_type eq 'current_pm' ? 1 : 0),
86
                require => $stats->{'required'},
87
            }
88
        );
161
    }
89
    }
162
    else {
90
}
163
        $version = 'module is missing';
91
92
@components = sort {$a->{'name'} cmp $b->{'name'}} @components;
93
94
my $counter=0;
95
my $row = [];
96
my $table = [];
97
foreach (@components) {
98
    push (@$row, $_);
99
    unless (++$counter % 4) {
100
        push (@$table, {row => $row});
101
        $row = [];
164
    }
102
    }
165
    push(
166
        @components,
167
        {
168
            name    => $component,
169
            version => $version,
170
            newrow  => (++$counter % 4) ? 0 : 1,
171
        }
172
    );
173
}
103
}
174
104
175
$template->param( components => \@components );
105
$template->param( table => $table );
176
106
177
output_html_with_http_headers $query, $cookie, $template->output;
107
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl (-7 / +27 lines)
Lines 50-64 Link Here
50
        </table>
50
        </table>
51
        </div>
51
        </div>
52
        <div id="perl">
52
        <div id="perl">
53
            <table>
53
            <table style="cursor:pointer">
54
                <caption>Perl modules</caption>
54
                <caption>Perl modules</caption>
55
                <!-- TMPL_LOOP name="table" -->
55
                <tr>
56
                <tr>
56
                <!-- TMPL_LOOP name="components" -->
57
                    <!-- TMPL_LOOP name="row" -->
57
                    <th scope="row"><!-- TMPL_VAR NAME="name" --></th>
58
                    <!-- TMPL_IF NAME="current" -->
58
                    <td><!-- TMPL_VAR NAME="version" --></td>
59
                    <!-- TMPL_IF NAME="require" -->
59
                    <!-- TMPL_IF name="newrow" --></tr><!-- TMPL_UNLESS NAME="__last__" --><tr><!-- /TMPL_UNLESS --><!-- /TMPL_IF -->
60
                    <th scope="row" style="font-weight:bold;" title="Module current">
61
                    <!-- TMPL_ELSE -->
62
                    <th scope="row" style="font-weight:normal" title="Module current">
63
                    <!-- /TMPL_IF -->
64
                    <!-- TMPL_ELSIF NAME="upgrade" -->
65
                    <!-- TMPL_IF NAME="require" -->
66
                    <th scope="row" style="background-color:#FFCB2F;font-weight:bold;" title="Module upgrade needed">
67
                    <!-- TMPL_ELSE -->
68
                    <th scope="row" style="background-color:#FFCB2F;font-weight:normal" title="Module upgrade needed">
69
                    <!-- /TMPL_IF -->
70
                    <!-- TMPL_ELSE -->
71
                    <!-- TMPL_IF NAME="require" -->
72
                    <th scope="row" style="background-color:#FF8A8A;font-weight:bold;" title="Required module missing">
73
                    <!-- TMPL_ELSE -->
74
                    <th scope="row" style="background-color:#FF8A8A;font-weight:normal" title="Optional module missing">
75
                    <!-- /TMPL_IF -->
76
                    <!-- /TMPL_IF -->
77
                        <!-- TMPL_VAR NAME="name" -->
78
                    </th>
79
                    <!-- TMPL_IF NAME="version" --><td><!-- TMPL_VAR NAME="version" --><!-- TMPL_ELSE --><td style="font-weight:bold">Not Installed<!-- /TMPL_IF --></td>
80
                    <!-- /TMPL_LOOP -->
81
                </tr>
60
                <!-- /TMPL_LOOP -->
82
                <!-- /TMPL_LOOP -->
61
		</tr>
62
            </table>
83
            </table>
63
        </div>
84
        </div>
64
        <div id="team">
85
        <div id="team">
65
- 

Return to bug 4444