Added 'dbd::sqlite' as appears as an optional module during latest installers.
[koha-equinox.git] / about.pl
1 #!/usr/bin/perl
2  
3 # This file is part of Koha.
4 #
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
8 # version.
9 #
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA  02111-1307 USA
17
18 use strict;
19
20 use C4::Output;    # contains gettemplate
21 use C4::Auth;
22 use C4::Context;
23 use CGI;
24 use LWP::Simple;
25 use XML::Simple;
26 use Config;
27
28 my $query = new CGI;
29 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
30     {
31         template_name   => "about.tmpl",
32         query           => $query,
33         type            => "intranet",
34         authnotrequired => 0,
35         flagsrequired   => { catalogue => 1 },
36         debug           => 1,
37     }
38 );
39
40 my $kohaVersion   = C4::Context::KOHAVERSION;
41 my $osVersion     = `uname -a`;
42 my $perl_path = $^X;
43 if ($^O ne 'VMS') {
44     $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
45 }
46 my $perlVersion   = $];
47 my $mysqlVersion  = `mysql -V`;
48 my $apacheVersion = `httpd -v`;
49 $apacheVersion = `httpd2 -v` unless $apacheVersion;
50 $apacheVersion = (`/usr/sbin/apache2 -V`)[0] unless $apacheVersion;
51 my $zebraVersion = `zebraidx -V`;
52
53 $template->param(
54     kohaVersion   => $kohaVersion,
55     osVersion     => $osVersion,
56     perlPath      => $perl_path,
57     perlVersion   => $perlVersion,
58     perlIncPath   => [ map { perlinc => $_ }, @INC ],
59     mysqlVersion  => $mysqlVersion,
60     apacheVersion => $apacheVersion,
61     zebraVersion  => $zebraVersion,
62 );
63 my @component_names =
64     qw/
65 Biblio::EndnoteStyle
66 CGI
67 CGI::Carp
68 CGI::Session
69 CGI::Session::Serialize::yaml
70 Class::Factory::Util
71 Class::Accessor
72 Compress::Zlib
73 DBD::mysql
74 DBD::SQLite
75 DBI
76 Data::Dumper
77 Date::Calc
78 Data::ICal
79 Date::Manip
80 Digest::MD5
81 Email::Date
82 File::Temp
83 GD
84 GD::Barcode::UPCE
85 Getopt::Long
86 Getopt::Std
87 HTML::Template::Pro
88 HTTP::Cookies
89 HTTP::Request::Common
90 HTML::Scrubber
91 LWP::Simple
92 LWP::UserAgent
93 Lingua::Stem
94 List::Util
95 List::MoreUtils
96 Locale::Language
97 MARC::Crosswalk::DublinCore
98 MARC::Charset
99 MARC::File::XML
100 MARC::Record
101 MIME::Base64
102 MIME::Lite
103 MIME::QuotedPrint
104 Mail::Sendmail
105 Net::LDAP
106 Net::LDAP::Filter
107 Net::Z3950::ZOOM
108 PDF::API2
109 PDF::API2::Page
110 PDF::API2::Util
111 PDF::Reuse
112 PDF::Reuse::Barcode
113 POE
114 POSIX
115 Schedule::At
116 SMS::Send
117 Term::ANSIColor
118 Test
119 Test::Harness
120 Test::More
121 Text::CSV
122 Text::CSV_XS
123 Text::Iconv
124 Text::Wrap
125 Time::HiRes
126 Time::localtime
127 Unicode::Normalize
128 XML::Dumper
129 XML::LibXML
130 XML::LibXSLT
131 XML::SAX::ParserFactory
132 XML::Simple
133 XML::RSS
134 YAML::Syck
135       /;
136
137 my @components = ();
138
139 my $counter=0;
140 foreach my $component ( sort @component_names ) {
141     my $version;
142     if ( eval "require $component" ) {
143         $version = $component->VERSION;
144         if ( $version eq '' ) {
145             $version = 'unknown';
146         }
147     }
148     else {
149         $version = 'module is missing';
150     }
151     push(
152         @components,
153         {
154             name    => $component,
155             version => $version,
156             newrow  => (++$counter % 4) ? 0 : 1,
157         }
158     );
159 }
160
161 $template->param( components => \@components );
162
163 output_html_with_http_headers $query, $cookie, $template->output;