Skip to content
Newer
Older
100755 178 lines (166 sloc) 3.81 KB
a0b06fb @ctfliblime Prepare for perlbrew usage by changing all script magic to "#!/usr/bi…
ctfliblime authored
1 #!/usr/bin/env 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;
49c66d7 rel_3_0 moved to HEAD
tipaul authored
19
4ce4341 Trying to fix
Chris Cormack authored
20 use C4::Output; # contains gettemplate
fa0d959 first cut at perl script to create the about page.
pate authored
21 use C4::Auth;
3607caa @ctfliblime Add Koha.pm and include it universally
ctfliblime authored
22 use Koha;
fa0d959 first cut at perl script to create the about page.
pate authored
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
6d6e97f @ctfliblime Show code version in about.pl
ctfliblime authored
41 my $kohaSchemaVersion = 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(
6d6e97f @ctfliblime Show code version in about.pl
ctfliblime authored
55 kohaSchemaVersion => $kohaSchemaVersion,
56 kohaCodeVersion => $Koha::VERSION,
4ce4341 Trying to fix
Chris Cormack authored
57 osVersion => $osVersion,
ec289b1 display path to Perl interpreter on about page
Galen Charlton authored
58 perlPath => $perl_path,
4ce4341 Trying to fix
Chris Cormack authored
59 perlVersion => $perlVersion,
f290ee3 don't sort @INC when displaying on about page
Galen Charlton authored
60 perlIncPath => [ map { perlinc => $_ }, @INC ],
4ce4341 Trying to fix
Chris Cormack authored
61 mysqlVersion => $mysqlVersion,
62 apacheVersion => $apacheVersion,
63 zebraVersion => $zebraVersion,
64 );
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
65 my @component_names =
36d4b40 Adding Biblio::EndNote dep
Paul POULAIN authored
66 qw/
50533a1 @Elwell Consistency check between Makefile.pl and about.pl We weren't picking…
Elwell authored
67 Algorithm::CheckDigits
36d4b40 Adding Biblio::EndNote dep
Paul POULAIN authored
68 Biblio::EndnoteStyle
a438d95 @dlbptfs Allows for search by equivalent ISBN-10 and ISBN-13
dlbptfs authored
69 Business::ISBN
36d4b40 Adding Biblio::EndNote dep
Paul POULAIN authored
70 CGI
a51e2c1 updating about.pl
Paul POULAIN authored
71 CGI::Carp
72 CGI::Session
c76687b Add a dependance to CGI::Session::serialize::yaml 4.20
Nahuel Angelinetti authored
73 CGI::Session::Serialize::yaml
a51e2c1 updating about.pl
Paul POULAIN authored
74 Class::Factory::Util
75 Class::Accessor
5a8f618 Adding Compress::Zlib dependancy
Paul POULAIN authored
76 Compress::Zlib
a51e2c1 updating about.pl
Paul POULAIN authored
77 DBD::mysql
6c0dbfb offline_circ must use SQLite v2 - because Kyles PHP does
Michael Hafen authored
78 DBD::SQLite2
a51e2c1 updating about.pl
Paul POULAIN authored
79 DBI
80 Data::Dumper
8ff29dd fix Date::ICal typo
Galen Charlton authored
81 Data::ICal
50533a1 @Elwell Consistency check between Makefile.pl and about.pl We weren't picking…
Elwell authored
82 Date::Calc
83 Date::ICal
a51e2c1 updating about.pl
Paul POULAIN authored
84 Date::Manip
85 Digest::MD5
8f103c4 @gmcharlt added new module dep Digest::SHA to about.pl
gmcharlt authored
86 Digest::SHA
f896384 @PaulPoulain Adding Email::Date dependancy, requested by MIME::Lite
PaulPoulain authored
87 Email::Date
a51e2c1 updating about.pl
Paul POULAIN authored
88 File::Temp
1baf634 kohabug 2404 This patch removes Image::Magick and adds GD
Chris Nighswonger authored
89 GD
a51e2c1 updating about.pl
Paul POULAIN authored
90 GD::Barcode::UPCE
91 Getopt::Long
92 Getopt::Std
93 HTML::Template::Pro
94 HTTP::Cookies
9c4a717 added dependencies for new OAI-PMH server
Galen Charlton authored
95 HTTP::OAI
a51e2c1 updating about.pl
Paul POULAIN authored
96 HTTP::Request::Common
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
97 HTML::Scrubber
5cd357e @gmcharlt bug 3465: enhance DB update reporting by web installer
gmcharlt authored
98 IPC::Cmd
50533a1 @Elwell Consistency check between Makefile.pl and about.pl We weren't picking…
Elwell authored
99 JSON
a51e2c1 updating about.pl
Paul POULAIN authored
100 LWP::Simple
101 LWP::UserAgent
102 Lingua::Stem
103 List::Util
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
104 List::MoreUtils
a51e2c1 updating about.pl
Paul POULAIN authored
105 Locale::Language
1bc2813 adding 2 deps to export biblios in dc format
Paul POULAIN authored
106 MARC::Crosswalk::DublinCore
a51e2c1 updating about.pl
Paul POULAIN authored
107 MARC::Charset
108 MARC::File::XML
109 MARC::Record
110 MIME::Base64
6fce569 @amoore Bug 2274 [2/5]: adding MIME::Lite to list of required modules
amoore authored
111 MIME::Lite
a51e2c1 updating about.pl
Paul POULAIN authored
112 MIME::QuotedPrint
113 Mail::Sendmail
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
114 Net::LDAP
115 Net::LDAP::Filter
a51e2c1 updating about.pl
Paul POULAIN authored
116 Net::Z3950::ZOOM
117 PDF::API2
118 PDF::API2::Page
119 PDF::API2::Util
120 PDF::Reuse
121 PDF::Reuse::Barcode
c8cd3cb @PaulPoulain adding some missing packages to about.pl
PaulPoulain authored
122 POE
a51e2c1 updating about.pl
Paul POULAIN authored
123 POSIX
124 Schedule::At
11aed99 @amoore Bug 2176: adding SMS::Send to list of dependencies
amoore authored
125 SMS::Send
a51e2c1 updating about.pl
Paul POULAIN authored
126 Term::ANSIColor
127 Test
128 Test::Harness
129 Test::More
130 Text::CSV
b6421ad Adding Text::CSV_XS dependancy
Paul POULAIN authored
131 Text::CSV_XS
521776b @PaulPoulain hdl has added a Text::Iconv dependancy yesterday, checking it in inst…
PaulPoulain authored
132 Text::Iconv
a51e2c1 updating about.pl
Paul POULAIN authored
133 Text::Wrap
134 Time::HiRes
135 Time::localtime
136 Unicode::Normalize
137 XML::Dumper
138 XML::LibXML
1bc2813 adding 2 deps to export biblios in dc format
Paul POULAIN authored
139 XML::LibXSLT
a51e2c1 updating about.pl
Paul POULAIN authored
140 XML::SAX::ParserFactory
9c4a717 added dependencies for new OAI-PMH server
Galen Charlton authored
141 XML::SAX::Writer
a51e2c1 updating about.pl
Paul POULAIN authored
142 XML::Simple
143 XML::RSS
a858e8a session management: use YAML::Syck for serialization
Galen Charlton authored
144 YAML::Syck
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
145 /;
06b2edf bug 659 fixed: borrower category age limitations are now taken into a…
plg authored
146
493d07e new: required Perl modules listed with their version in about page.
plg authored
147 my @components = ();
148
a51e2c1 updating about.pl
Paul POULAIN authored
149 my $counter=0;
4ce4341 Trying to fix
Chris Cormack authored
150 foreach my $component ( sort @component_names ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
151 my $version;
4ce4341 Trying to fix
Chris Cormack authored
152 if ( eval "require $component" ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
153 $version = $component->VERSION;
4ce4341 Trying to fix
Chris Cormack authored
154 if ( $version eq '' ) {
493d07e new: required Perl modules listed with their version in about page.
plg authored
155 $version = 'unknown';
156 }
157 }
158 else {
159 $version = 'module is missing';
160 }
4ce4341 Trying to fix
Chris Cormack authored
161 push(
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
162 @components,
493d07e new: required Perl modules listed with their version in about page.
plg authored
163 {
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
164 name => $component,
165 version => $version,
691b400 HTML validation adjustments to about.pl
Joe Atzberger authored
166 newrow => (++$counter % 4) ? 0 : 1,
3fb80a6 improvement: on the About page, a caption was added to the table of Perl
plg authored
167 }
168 );
493d07e new: required Perl modules listed with their version in about page.
plg authored
169 }
170
4ce4341 Trying to fix
Chris Cormack authored
171 $template->param( components => \@components );
cf43c83 @ctfliblime [delivers #15796177] Enable setting of timezone in $KOHA_CONF
ctfliblime authored
172 $template->param( localtime => scalar localtime() );
493d07e new: required Perl modules listed with their version in about page.
plg authored
173
3c3d4b2 @ctfliblime Add CGI environment display to about.pl
ctfliblime authored
174 my @environment = map { {variable => $_, value => $ENV{$_}} } sort keys %ENV;
175 $template->param( environment => \@environment);
176
fa0d959 first cut at perl script to create the about page.
pate authored
177 output_html_with_http_headers $query, $cookie, $template->output;
Something went wrong with that request. Please try again.