bug-2149, added new block to C4::Letters::SendAlerts() to email 'account creation...
[koha.git] / about.pl
blobbe499c550efdb197d5ce700bb7061b8f9df2eaed
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 Date::Manip
78 Digest::MD5
79 File::Temp
80 GD::Barcode::UPCE
81 Getopt::Long
82 Getopt::Std
83 Image::Magick
84 HTML::Template::Pro
85 HTTP::Cookies
86 HTTP::Request::Common
87 LWP::Simple
88 LWP::UserAgent
89 Lingua::Stem
90 List::Util
91 Locale::Language
92 MARC::Crosswalk::DublinCore
93 MARC::Charset
94 MARC::File::XML
95 MARC::Record
96 MIME::Base64
97 MIME::QuotedPrint
98 Mail::Sendmail
99 Net::Z3950::ZOOM
100 PDF::API2
101 PDF::API2::Page
102 PDF::API2::Util
103 PDF::Reuse
104 PDF::Reuse::Barcode
105 POSIX
106 Schedule::At
107 Term::ANSIColor
108 Test
109 Test::Harness
110 Test::More
111 Text::CSV
112 Text::CSV_XS
113 Text::Iconv
114 Text::Wrap
115 Time::HiRes
116 Time::localtime
117 Unicode::Normalize
118 XML::Dumper
119 XML::LibXML
120 XML::LibXSLT
121 XML::SAX::ParserFactory
122 XML::Simple
123 XML::RSS
124 YAML::Syck
127 my @components = ();
129 my $counter=0;
130 foreach my $component ( sort @component_names ) {
131 my $version;
132 if ( eval "require $component" ) {
133 $version = $component->VERSION;
134 if ( $version eq '' ) {
135 $version = 'unknown';
138 else {
139 $version = 'module is missing';
141 $counter++;
142 $counter=0 if $counter >3;
143 push(
144 @components,
146 name => $component,
147 version => $version,
148 counter => $counter,
153 $template->param( components => \@components );
155 output_html_with_http_headers $query, $cookie, $template->output;