Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 80 lines (70 sloc) 2.054 kB
fa0d959 first cut at perl script to create the about page.
pate authored
1 #!/usr/bin/perl
2 use HTML::Template;
3 use strict;
4 require Exporter;
5 use C4::Database;
6 use C4::Output; # contains gettemplate
7 use C4::Interface::CGI::Output;
8 use C4::Auth;
9 use C4::Context;
10 use CGI;
493d07e new: required Perl modules listed with their version in about page.
plg authored
11 use LWP::Simple;
12 use XML::Simple;
fa0d959 first cut at perl script to create the about page.
pate authored
13
14 my $query = new CGI;
15 my ($template, $loggedinuser, $cookie)
201640b missing - and template name fixing
tipaul authored
16 = get_template_and_user({template_name => "about.tmpl",
fa0d959 first cut at perl script to create the about page.
pate authored
17 query => $query,
18 type => "intranet",
19 authnotrequired => 0,
20 flagsrequired => {parameters => 1},
21 debug => 1,
22 });
23
24 my $kohaVersion = C4::Context->config("kohaversion");
d40bdb9 fixes + improvment. shows now apache and mysql versions
tipaul authored
25 my $osVersion = `uname -a`;
173e385 adding credits & using $] instead of perl -v to get perl version
tipaul authored
26 my $perlVersion = $];
d40bdb9 fixes + improvment. shows now apache and mysql versions
tipaul authored
27 my $mysqlVersion = `mysql -V`;
173e385 adding credits & using $] instead of perl -v to get perl version
tipaul authored
28 my $apacheVersion = `httpd -v`;
93ff09d merging 2.2 branch with head. Sorry for not making it before, many ma…
tipaul authored
29 $apacheVersion = `httpd2 -v` unless $apacheVersion;
493d07e new: required Perl modules listed with their version in about page.
plg authored
30 my $zebraVersion = `zebraidx -V`;
06b2edf bug 659 fixed: borrower category age limitations are now taken into a…
plg authored
31 # $apacheVersion = (`/usr/sbin/apache2 -V`)[0];
fa0d959 first cut at perl script to create the about page.
pate authored
32
201640b missing - and template name fixing
tipaul authored
33 $template->param(
d40bdb9 fixes + improvment. shows now apache and mysql versions
tipaul authored
34 kohaVersion => $kohaVersion,
35 osVersion => $osVersion,
36 perlVersion => $perlVersion,
37 mysqlVersion => $mysqlVersion,
38 apacheVersion => $apacheVersion,
493d07e new: required Perl modules listed with their version in about page.
plg authored
39 zebraVersion => $zebraVersion,
fa0d959 first cut at perl script to create the about page.
pate authored
40 );
41
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
42 my @component_names =
43 qw/MARC::File::XML MARC::Charset Class::Accessor
44 LWP::Simple XML::Simple Net::Z3950
45 Event Net::LDAP PDF::API2
46 Mail::Sendmail MARC::Record Digest::MD5
47 HTML::Template DBD::mysql Date::Manip
06b2edf bug 659 fixed: borrower category age limitations are now taken into a…
plg authored
48 DBI Smart::Comments Net::Z3950::ZOOM
49 Date::Calc
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
50 /;
06b2edf bug 659 fixed: borrower category age limitations are now taken into a…
plg authored
51
493d07e new: required Perl modules listed with their version in about page.
plg authored
52 my @components = ();
53
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
54 foreach my $component (sort @component_names) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
55 my $version;
56 if (eval "require $component") {
57 $version = $component->VERSION;
58 if ($version eq '' ) {
59 $version = 'unknown';
60 }
61 }
62 else {
63 $version = 'module is missing';
64 }
65
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
66 push (
67 @components,
493d07e new: required Perl modules listed with their version in about page.
plg authored
68 {
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
69 name => $component,
70 version => $version,
71 }
72 );
493d07e new: required Perl modules listed with their version in about page.
plg authored
73 }
74
75 $template->param(
76 components => \@components
77 );
78
fa0d959 first cut at perl script to create the about page.
pate authored
79 output_html_with_http_headers $query, $cookie, $template->output;
Something went wrong with that request. Please try again.