Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 141 lines (129 sloc) 3.104 kb
7c7b136 dunno why a char has been added before #!/usr/bin/perl
Paul POULAIN authored
1 #!/usr/bin/perl
4ce4341 Trying to fix
Chris Cormack authored
2
49c66d7 rel_3_0 moved to HEAD
tipaul authored
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
fa0d959 first cut at perl script to create the about page.
pate authored
18 use strict;
19 require Exporter;
49c66d7 rel_3_0 moved to HEAD
tipaul authored
20
4ce4341 Trying to fix
Chris Cormack authored
21 use C4::Output; # contains gettemplate
fa0d959 first cut at perl script to create the about page.
pate authored
22 use C4::Auth;
23 use C4::Context;
24 use CGI;
493d07e new: required Perl modules listed with their version in about page.
plg authored
25 use LWP::Simple;
26 use XML::Simple;
fa0d959 first cut at perl script to create the about page.
pate authored
27
28 my $query = new CGI;
4ce4341 Trying to fix
Chris Cormack authored
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 );
fa0d959 first cut at perl script to create the about page.
pate authored
39
61c72f8 Adding KOHAVERSION management.
Paul POULAIN authored
40 my $kohaVersion = C4::Context::KOHAVERSION;
4ce4341 Trying to fix
Chris Cormack authored
41 my $osVersion = `uname -a`;
42 my $perlVersion = $];
43 my $mysqlVersion = `mysql -V`;
44 my $apacheVersion = `httpd -v`;
45 $apacheVersion = `httpd2 -v` unless $apacheVersion;
493d07e new: required Perl modules listed with their version in about page.
plg authored
46 my $zebraVersion = `zebraidx -V`;
4ce4341 Trying to fix
Chris Cormack authored
47
06b2edf bug 659 fixed: borrower category age limitations are now taken into acco...
plg authored
48 # $apacheVersion = (`/usr/sbin/apache2 -V`)[0];
fa0d959 first cut at perl script to create the about page.
pate authored
49
201640b missing - and template name fixing
tipaul authored
50 $template->param(
4ce4341 Trying to fix
Chris Cormack authored
51 kohaVersion => $kohaVersion,
52 osVersion => $osVersion,
53 perlVersion => $perlVersion,
54 mysqlVersion => $mysqlVersion,
55 apacheVersion => $apacheVersion,
56 zebraVersion => $zebraVersion,
57 );
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
58 my @component_names =
a51e2c1 updating about.pl
Paul POULAIN authored
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
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
110 /;
06b2edf bug 659 fixed: borrower category age limitations are now taken into acco...
plg authored
111
493d07e new: required Perl modules listed with their version in about page.
plg authored
112 my @components = ();
113
a51e2c1 updating about.pl
Paul POULAIN authored
114 my $counter=0;
4ce4341 Trying to fix
Chris Cormack authored
115 foreach my $component ( sort @component_names ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
116 my $version;
4ce4341 Trying to fix
Chris Cormack authored
117 if ( eval "require $component" ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
118 $version = $component->VERSION;
4ce4341 Trying to fix
Chris Cormack authored
119 if ( $version eq '' ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
120 $version = 'unknown';
121 }
122 }
123 else {
124 $version = 'module is missing';
125 }
a51e2c1 updating about.pl
Paul POULAIN authored
126 $counter++;
127 $counter=0 if $counter >3;
4ce4341 Trying to fix
Chris Cormack authored
128 push(
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
129 @components,
493d07e new: required Perl modules listed with their version in about page.
plg authored
130 {
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
131 name => $component,
132 version => $version,
a51e2c1 updating about.pl
Paul POULAIN authored
133 counter => $counter,
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
134 }
135 );
493d07e new: required Perl modules listed with their version in about page.
plg authored
136 }
137
4ce4341 Trying to fix
Chris Cormack authored
138 $template->param( components => \@components );
493d07e new: required Perl modules listed with their version in about page.
plg authored
139
fa0d959 first cut at perl script to create the about page.
pate authored
140 output_html_with_http_headers $query, $cookie, $template->output;
Something went wrong with that request. Please try again.