tweak description of OpacBrowser syspref
[koha.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 use warnings;
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 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::Language
105 MARC::Crosswalk::DublinCore
106 MARC::Charset
107 MARC::File::XML
108 MARC::Record
109 MIME::Base64
110 MIME::Lite
111 MIME::QuotedPrint
112 Mail::Sendmail
113 Net::LDAP
114 Net::LDAP::Filter
115 Net::Z3950::ZOOM
116 Number::Format
117 PDF::API2
118 PDF::API2::Page
119 PDF::API2::Util
120 PDF::API2::Simple
121 PDF::Table
122 PDF::Reuse
123 PDF::Reuse::Barcode
124 POE
125 POSIX
126 Schedule::At
127 SMS::Send
128 Term::ANSIColor
129 Test
130 Test::Harness
131 Test::More
132 Text::CSV
133 Text::CSV_XS
134 Text::CSV::Encoded
135 Text::Iconv
136 Text::Wrap
137 Time::HiRes
138 Time::localtime
139 Unicode::Normalize
140 XML::Dumper
141 XML::LibXML
142 XML::LibXSLT
143 XML::SAX::ParserFactory
144 XML::SAX::Writer
145 XML::Simple
146 XML::RSS
147 YAML::Syck
148       /;
149
150 my @components = ();
151
152 my $counter=0;
153 foreach my $component ( sort @component_names ) {
154     my $version;
155     if ( eval "require $component" ) {
156         $version = $component->VERSION;
157         if ( $version eq '' ) {
158             $version = 'unknown';
159         }
160     }
161     else {
162         $version = 'module is missing';
163     }
164     push(
165         @components,
166         {
167             name    => $component,
168             version => $version,
169             newrow  => (++$counter % 4) ? 0 : 1,
170         }
171     );
172 }
173
174 $template->param( components => \@components );
175
176 output_html_with_http_headers $query, $cookie, $template->output;