We were calling get biblioitemdata when we should have been calling get bibliodata
[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 require Exporter;
20
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
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   => { parameters => 1 },
36         debug           => 1,
37     }
38 );
39
40 my $kohaVersion   = C4::Context::KOHAVERSION;
41 my $osVersion     = `uname -a`;
42 my $perlVersion   = $];
43 my $mysqlVersion  = `mysql -V`;
44 my $apacheVersion = `httpd -v`;
45 $apacheVersion = `httpd2 -v` unless $apacheVersion;
46 my $zebraVersion = `zebraidx -V`;
47
48 # $apacheVersion =  (`/usr/sbin/apache2 -V`)[0];
49
50 $template->param(
51     kohaVersion   => $kohaVersion,
52     osVersion     => $osVersion,
53     perlVersion   => $perlVersion,
54     mysqlVersion  => $mysqlVersion,
55     apacheVersion => $apacheVersion,
56     zebraVersion  => $zebraVersion,
57 );
58 my @component_names =
59     qw/CGI
60 CGI::Carp
61 CGI::Session
62 Class::Factory::Util
63 Class::Accessor
64 DBD::mysql
65 DBI
66 Data::Dumper
67 Date::Calc
68 Date::Manip
69 Digest::MD5
70 File::Temp
71 GD::Barcode::UPCE
72 Getopt::Long
73 Getopt::Std
74 HTML::Template::Pro
75 HTTP::Cookies
76 HTTP::Request::Common
77 LWP::Simple
78 LWP::UserAgent
79 Lingua::Stem
80 List::Util
81 Locale::Language
82 MARC::Charset
83 MARC::File::XML
84 MARC::Record
85 MIME::Base64
86 MIME::QuotedPrint
87 Mail::Sendmail
88 Net::Z3950::ZOOM
89 PDF::API2
90 PDF::API2::Page
91 PDF::API2::Util
92 PDF::Reuse
93 PDF::Reuse::Barcode
94 POSIX
95 Schedule::At
96 Term::ANSIColor
97 Test
98 Test::Harness
99 Test::More
100 Text::CSV
101 Text::Wrap
102 Time::HiRes
103 Time::localtime
104 Unicode::Normalize
105 XML::Dumper
106 XML::LibXML
107 XML::SAX::ParserFactory
108 XML::Simple
109 XML::RSS
110       /;
111
112 my @components = ();
113
114 my $counter=0;
115 foreach my $component ( sort @component_names ) {
116     my $version;
117     if ( eval "require $component" ) {
118         $version = $component->VERSION;
119         if ( $version eq '' ) {
120             $version = 'unknown';
121         }
122     }
123     else {
124         $version = 'module is missing';
125     }
126     $counter++;
127     $counter=0 if $counter >3;
128     push(
129         @components,
130         {
131             name    => $component,
132             version => $version,
133             counter => $counter,
134         }
135     );
136 }
137
138 $template->param( components => \@components );
139
140 output_html_with_http_headers $query, $cookie, $template->output;