fix for bug 1892: When checking in item on hold...
[koha.git] / about.pl
bloba31b0a0211115e4e1034f017a5d361958a949748
1 #!/usr/bin/perl
3 # This file is part of Koha.
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.
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.
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
18 use strict;
19 require Exporter;
21 use C4::Output; # contains gettemplate
22 use C4::Auth;
23 use C4::Context;
24 use CGI;
25 use LWP::Simple;
26 use XML::Simple;
27 use Config;
29 my $query = new CGI;
30 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
32 template_name => "about.tmpl",
33 query => $query,
34 type => "intranet",
35 authnotrequired => 0,
36 flagsrequired => { catalogue => 1 },
37 debug => 1,
41 my $kohaVersion = C4::Context::KOHAVERSION;
42 my $osVersion = `uname -a`;
43 my $perl_path = $^X;
44 if ($^O ne 'VMS') {
45 $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
47 my $perlVersion = $];
48 my $mysqlVersion = `mysql -V`;
49 my $apacheVersion = `httpd -v`;
50 $apacheVersion = `httpd2 -v` unless $apacheVersion;
51 $apacheVersion = (`/usr/sbin/apache2 -V`)[0] unless $apacheVersion;
52 my $zebraVersion = `zebraidx -V`;
54 $template->param(
55 kohaVersion => $kohaVersion,
56 osVersion => $osVersion,
57 perlPath => $perl_path,
58 perlVersion => $perlVersion,
59 perlIncPath => [ map { perlinc => $_ }, @INC ],
60 mysqlVersion => $mysqlVersion,
61 apacheVersion => $apacheVersion,
62 zebraVersion => $zebraVersion,
64 my @component_names =
65 qw/
66 Biblio::EndnoteStyle
67 CGI
68 CGI::Carp
69 CGI::Session
70 Class::Factory::Util
71 Class::Accessor
72 Compress::Zlib
73 DBD::mysql
74 DBI
75 Data::Dumper
76 Date::Calc
77 Data::ICal
78 Date::Manip
79 Digest::MD5
80 File::Temp
81 GD::Barcode::UPCE
82 Getopt::Long
83 Getopt::Std
84 HTML::Template::Pro
85 HTTP::Cookies
86 HTTP::Request::Common
87 HTML::Scrubber
88 Image::Magick
89 LWP::Simple
90 LWP::UserAgent
91 Lingua::Stem
92 List::Util
93 List::MoreUtils
94 Locale::Language
95 MARC::Crosswalk::DublinCore
96 MARC::Charset
97 MARC::File::XML
98 MARC::Record
99 MIME::Base64
100 MIME::Lite
101 MIME::QuotedPrint
102 Mail::Sendmail
103 Net::LDAP
104 Net::LDAP::Filter
105 Net::Z3950::ZOOM
106 PDF::API2
107 PDF::API2::Page
108 PDF::API2::Util
109 PDF::Reuse
110 PDF::Reuse::Barcode
112 POSIX
113 Schedule::At
114 SMS::Send
115 Term::ANSIColor
116 Test
117 Test::Harness
118 Test::More
119 Text::CSV
120 Text::CSV_XS
121 Text::Iconv
122 Text::Wrap
123 Time::HiRes
124 Time::localtime
125 Unicode::Normalize
126 XML::Dumper
127 XML::LibXML
128 XML::LibXSLT
129 XML::SAX::ParserFactory
130 XML::Simple
131 XML::RSS
132 YAML::Syck
135 my @components = ();
137 my $counter=0;
138 foreach my $component ( sort @component_names ) {
139 my $version;
140 if ( eval "require $component" ) {
141 $version = $component->VERSION;
142 if ( $version eq '' ) {
143 $version = 'unknown';
146 else {
147 $version = 'module is missing';
149 $counter++;
150 $counter=0 if $counter >3;
151 push(
152 @components,
154 name => $component,
155 version => $version,
156 counter => $counter,
161 $template->param( components => \@components );
163 output_html_with_http_headers $query, $cookie, $template->output;