Skip to content
Newer
Older
100755 164 lines (153 sloc) 3.48 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;
ec289b1 display path to Perl interpreter on about page
Galen Charlton authored
27 use Config;
fa0d959 first cut at perl script to create the about page.
pate authored
28
29 my $query = new CGI;
4ce4341 Trying to fix
Chris Cormack authored
30 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
31 {
32 template_name => "about.tmpl",
33 query => $query,
34 type => "intranet",
35 authnotrequired => 0,
a3dfecf @oleonard Removing parameters permission requirement on about.pl, minor markup …
oleonard authored
36 flagsrequired => { catalogue => 1 },
4ce4341 Trying to fix
Chris Cormack authored
37 debug => 1,
38 }
39 );
fa0d959 first cut at perl script to create the about page.
pate authored
40
61c72f8 Adding KOHAVERSION management.
Paul POULAIN authored
41 my $kohaVersion = C4::Context::KOHAVERSION;
4ce4341 Trying to fix
Chris Cormack authored
42 my $osVersion = `uname -a`;
ec289b1 display path to Perl interpreter on about page
Galen Charlton authored
43 my $perl_path = $^X;
44 if ($^O ne 'VMS') {
45 $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
46 }
4ce4341 Trying to fix
Chris Cormack authored
47 my $perlVersion = $];
48 my $mysqlVersion = `mysql -V`;
49 my $apacheVersion = `httpd -v`;
50 $apacheVersion = `httpd2 -v` unless $apacheVersion;
4e6e770 about.pl -- get apacheVersion for etch-like setups
Joe Atzberger authored
51 $apacheVersion = (`/usr/sbin/apache2 -V`)[0] unless $apacheVersion;
493d07e new: required Perl modules listed with their version in about page.
plg authored
52 my $zebraVersion = `zebraidx -V`;
4ce4341 Trying to fix
Chris Cormack authored
53
201640b missing - and template name fixing
tipaul authored
54 $template->param(
4ce4341 Trying to fix
Chris Cormack authored
55 kohaVersion => $kohaVersion,
56 osVersion => $osVersion,
ec289b1 display path to Perl interpreter on about page
Galen Charlton authored
57 perlPath => $perl_path,
4ce4341 Trying to fix
Chris Cormack authored
58 perlVersion => $perlVersion,
f290ee3 don't sort @INC when displaying on about page
Galen Charlton authored
59 perlIncPath => [ map { perlinc => $_ }, @INC ],
4ce4341 Trying to fix
Chris Cormack authored
60 mysqlVersion => $mysqlVersion,
61 apacheVersion => $apacheVersion,
62 zebraVersion => $zebraVersion,
63 );
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
64 my @component_names =
36d4b40 Adding Biblio::EndNote dep
Paul POULAIN authored
65 qw/
66 Biblio::EndnoteStyle
67 CGI
a51e2c1 updating about.pl
Paul POULAIN authored
68 CGI::Carp
69 CGI::Session
70 Class::Factory::Util
71 Class::Accessor
5a8f618 Adding Compress::Zlib dependancy
Paul POULAIN authored
72 Compress::Zlib
a51e2c1 updating about.pl
Paul POULAIN authored
73 DBD::mysql
74 DBI
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
75 Data::Ical
a51e2c1 updating about.pl
Paul POULAIN authored
76 Data::Dumper
77 Date::Calc
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
78 Date::Ical
a51e2c1 updating about.pl
Paul POULAIN authored
79 Date::Manip
80 Digest::MD5
81 File::Temp
82 GD::Barcode::UPCE
83 Getopt::Long
84 Getopt::Std
85 HTML::Template::Pro
86 HTTP::Cookies
87 HTTP::Request::Common
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
88 HTML::Scrubber
89 Image::Magick
a51e2c1 updating about.pl
Paul POULAIN authored
90 LWP::Simple
91 LWP::UserAgent
92 Lingua::Stem
93 List::Util
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
94 List::MoreUtils
a51e2c1 updating about.pl
Paul POULAIN authored
95 Locale::Language
1bc2813 adding 2 deps to export biblios in dc format
Paul POULAIN authored
96 MARC::Crosswalk::DublinCore
a51e2c1 updating about.pl
Paul POULAIN authored
97 MARC::Charset
98 MARC::File::XML
99 MARC::Record
100 MIME::Base64
101 MIME::QuotedPrint
102 Mail::Sendmail
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
103 Net::LDAP
104 Net::LDAP::Filter
a51e2c1 updating about.pl
Paul POULAIN authored
105 Net::Z3950::ZOOM
106 PDF::API2
107 PDF::API2::Page
108 PDF::API2::Util
109 PDF::Reuse
110 PDF::Reuse::Barcode
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
111 POE
a51e2c1 updating about.pl
Paul POULAIN authored
112 POSIX
113 Schedule::At
11aed99 @amoore Bug 2176: adding SMS::Send to list of dependencies
amoore authored
114 SMS::Send
a51e2c1 updating about.pl
Paul POULAIN authored
115 Term::ANSIColor
116 Test
117 Test::Harness
118 Test::More
119 Text::CSV
b6421ad Adding Text::CSV_XS dependancy
Paul POULAIN authored
120 Text::CSV_XS
521776b @PaulPoulain hdl has added a Text::Iconv dependancy yesterday, checking it in inst…
PaulPoulain authored
121 Text::Iconv
a51e2c1 updating about.pl
Paul POULAIN authored
122 Text::Wrap
123 Time::HiRes
124 Time::localtime
125 Unicode::Normalize
126 XML::Dumper
127 XML::LibXML
1bc2813 adding 2 deps to export biblios in dc format
Paul POULAIN authored
128 XML::LibXSLT
a51e2c1 updating about.pl
Paul POULAIN authored
129 XML::SAX::ParserFactory
130 XML::Simple
131 XML::RSS
a858e8a session management: use YAML::Syck for serialization
Galen Charlton authored
132 YAML::Syck
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
133 /;
06b2edf bug 659 fixed: borrower category age limitations are now taken into a…
plg authored
134
493d07e new: required Perl modules listed with their version in about page.
plg authored
135 my @components = ();
136
a51e2c1 updating about.pl
Paul POULAIN authored
137 my $counter=0;
4ce4341 Trying to fix
Chris Cormack authored
138 foreach my $component ( sort @component_names ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
139 my $version;
4ce4341 Trying to fix
Chris Cormack authored
140 if ( eval "require $component" ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
141 $version = $component->VERSION;
4ce4341 Trying to fix
Chris Cormack authored
142 if ( $version eq '' ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
143 $version = 'unknown';
144 }
145 }
146 else {
147 $version = 'module is missing';
148 }
a51e2c1 updating about.pl
Paul POULAIN authored
149 $counter++;
150 $counter=0 if $counter >3;
4ce4341 Trying to fix
Chris Cormack authored
151 push(
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
152 @components,
493d07e new: required Perl modules listed with their version in about page.
plg authored
153 {
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
154 name => $component,
155 version => $version,
a51e2c1 updating about.pl
Paul POULAIN authored
156 counter => $counter,
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
157 }
158 );
493d07e new: required Perl modules listed with their version in about page.
plg authored
159 }
160
4ce4341 Trying to fix
Chris Cormack authored
161 $template->param( components => \@components );
493d07e new: required Perl modules listed with their version in about page.
plg authored
162
fa0d959 first cut at perl script to create the about page.
pate authored
163 output_html_with_http_headers $query, $cookie, $template->output;
Something went wrong with that request. Please try again.