3 # Copyright Pat Eyler 2003
4 # Copyright Biblibre 2006
5 # Parts Copyright Liblime 2008
6 # Parts Copyright Chris Nighswonger 2010
8 # This file is part of Koha.
10 # Koha is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 3 of the License, or
13 # (at your option) any later version.
15 # Koha is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with Koha; if not, see <http://www.gnu.org/licenses>.
26 use DateTime::TimeZone;
27 use File::Slurp qw( read_file );
28 use List::MoreUtils qw( any );
29 use Module::Load::Conditional qw( can_load );
30 use Config qw( %Config );
31 use Search::Elasticsearch;
32 use Try::Tiny qw( catch try );
36 use C4::Output qw( output_html_with_http_headers );
37 use C4::Auth qw( get_template_and_user get_user_subpermissions );
39 use C4::Installer::PerlModules;
42 use Koha::DateUtils qw( dt_from_string output_pref );
43 use Koha::Acquisition::Currencies;
44 use Koha::BackgroundJob;
45 use Koha::BiblioFrameworks;
47 use Koha::Patron::Categories;
50 use Koha::Config::SysPrefs;
51 use Koha::Illrequest::Config;
52 use Koha::SearchEngine::Elasticsearch;
54 use Koha::Filter::MARC::ViewPolicy;
56 use C4::Members::Statistics;
59 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
61 template_name => "about.tt",
64 flagsrequired => { catalogue => 1 },
68 my $config_timezone = C4::Context->config('timezone') // '';
69 my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone );
70 my $env_timezone = $ENV{TZ} // '';
71 my $env_invalid = !DateTime::TimeZone->is_valid_name( $env_timezone );
72 my $actual_bad_tz_fallback = 0;
74 if ( $config_timezone ne '' &&
77 $actual_bad_tz_fallback = 1;
79 elsif ( $config_timezone eq '' &&
80 $env_timezone ne '' &&
82 # No config, but bad ENV{TZ}
83 $actual_bad_tz_fallback = 1;
87 actual => C4::Context->tz->name,
88 actual_bad_tz_fallback => $actual_bad_tz_fallback,
89 config => $config_timezone,
90 config_invalid => $config_invalid,
91 environment => $env_timezone,
92 environment_invalid => $env_invalid
96 my $log4perl_config = C4::Context->config("log4perl_conf");
98 if ( ! $log4perl_config ) {
99 push @log4perl_errors, 'missing_config_entry'
102 my @lines = read_file($log4perl_config) or push @log4perl_errors, 'cannot_read_config_file';
103 for my $line ( @lines ) {
104 next unless $line =~ m|log4perl.appender.\w+.filename=(.*)|;
105 push @log4perl_errors, 'logfile_not_writable' unless -w $1;
108 eval {Koha::Logger->get};
109 push @log4perl_errors, 'cannot_init_module' and warn $@ if $@;
110 $template->param( log4perl_errors => @log4perl_errors );
114 time_zone => $time_zone,
115 current_date_and_time => output_pref({ dt => dt_from_string(), dateformat => 'iso' })
120 $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
123 my $zebraVersion = `zebraidx -V`;
125 # Check running PSGI env
126 if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {
129 psgi_server => ($ENV{ PLACK_ENV }) ? "Plack ($ENV{PLACK_ENV})" :
130 ($ENV{ MOD_PERL }) ? "mod_perl ($ENV{MOD_PERL})" :
135 # Memcached configuration
136 my $memcached_servers = $ENV{MEMCACHED_SERVERS} || C4::Context->config('memcached_servers');
137 my $memcached_namespace = $ENV{MEMCACHED_NAMESPACE} || C4::Context->config('memcached_namespace') // 'koha';
139 my $cache = Koha::Caches->get_instance;
140 my $effective_caching_method = ref($cache->cache);
141 # Memcached may have been running when plack has been initialized but could have been stopped since
142 # FIXME What are the consequences of that??
143 my $is_memcached_still_active = $cache->set_in_cache('test_for_about_page', "just a simple value");
145 my $where_is_memcached_config = 'nowhere';
146 if ( $ENV{MEMCACHED_SERVERS} and C4::Context->config('memcached_servers') ) {
147 $where_is_memcached_config = 'both';
148 } elsif ( $ENV{MEMCACHED_SERVERS} and not C4::Context->config('memcached_servers') ) {
149 $where_is_memcached_config = 'ENV_only';
150 } elsif ( C4::Context->config('memcached_servers') ) {
151 $where_is_memcached_config = 'config_only';
155 effective_caching_method => $effective_caching_method,
156 memcached_servers => $memcached_servers,
157 memcached_namespace => $memcached_namespace,
158 is_memcached_still_active => $is_memcached_still_active,
159 where_is_memcached_config => $where_is_memcached_config,
160 memcached_running => Koha::Caches->get_instance->memcached_cache,
163 # Additional system information for warnings
165 my $warnStatisticsFieldsError;
166 my $prefStatisticsFields = C4::Context->preference('StatisticsFields');
167 if ($prefStatisticsFields) {
168 $warnStatisticsFieldsError = $prefStatisticsFields
169 unless ( $prefStatisticsFields eq C4::Members::Statistics->get_fields() );
172 my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities');
173 my $prefBiblioAddsAuthorities = C4::Context->preference('BiblioAddsAuthorities');
174 my $warnPrefBiblioAddsAuthorities = ( $prefAutoCreateAuthorities && ( !$prefBiblioAddsAuthorities) );
176 my $prefEasyAnalyticalRecords = C4::Context->preference('EasyAnalyticalRecords');
177 my $prefUseControlNumber = C4::Context->preference('UseControlNumber');
178 my $warnPrefEasyAnalyticalRecords = ( $prefEasyAnalyticalRecords && $prefUseControlNumber );
180 my $AnonymousPatron = C4::Context->preference('AnonymousPatron');
181 my $warnPrefAnonymousPatronOPACPrivacy = (
182 C4::Context->preference('OPACPrivacy')
183 and not $AnonymousPatron
185 my $warnPrefAnonymousPatronAnonSuggestions = (
186 C4::Context->preference('AnonSuggestions')
187 and not $AnonymousPatron
190 my $anonymous_patron = Koha::Patrons->find( $AnonymousPatron );
191 my $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist = ( $AnonymousPatron && C4::Context->preference('AnonSuggestions') && not $anonymous_patron );
193 my $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist = ( not $anonymous_patron and Koha::Patrons->search({ privacy => 2 })->count );
195 my $warnPrefKohaAdminEmailAddress = !Koha::Email->is_valid(C4::Context->preference('KohaAdminEmailAddress'));
197 my $c = Koha::Items->filter_by_visible_in_opac->count;
198 my @warnings = C4::Context->dbh->selectrow_array('SHOW WARNINGS');
199 my $warnPrefOpacHiddenItems = $warnings[2];
201 my $invalid_yesno = Koha::Config::SysPrefs->search(
204 value => { -or => { 'is' => undef, -not_in => [ "1", "0" ] } }
207 $template->param( invalid_yesno => $invalid_yesno );
209 my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
211 my $warnIsRootUser = (! $loggedinuser);
213 my $warnNoActiveCurrency = (! defined Koha::Acquisition::Currencies->get_active);
215 my @xml_config_warnings;
217 if ( C4::Context->config('zebra_bib_index_mode')
218 and C4::Context->config('zebra_bib_index_mode') eq 'grs1' )
220 push @xml_config_warnings, { error => 'zebra_bib_index_mode_is_grs1' };
223 if ( C4::Context->config('zebra_auth_index_mode')
224 and C4::Context->config('zebra_auth_index_mode') eq 'grs1' )
226 push @xml_config_warnings, { error => 'zebra_auth_index_mode_is_grs1' };
229 my $authorityserver = C4::Context->zebraconfig('authorityserver');
230 if( ( C4::Context->config('zebra_auth_index_mode')
231 and C4::Context->config('zebra_auth_index_mode') eq 'dom' )
232 && ( $authorityserver->{config} !~ /zebra-authorities-dom.cfg/ ) )
234 push @xml_config_warnings, {
235 error => 'zebra_auth_index_mode_mismatch_warn'
239 if ( ! defined C4::Context->config('log4perl_conf') ) {
240 push @xml_config_warnings, {
241 error => 'log4perl_entry_missing'
245 if ( ! defined C4::Context->config('lockdir') ) {
246 push @xml_config_warnings, {
247 error => 'lockdir_entry_missing'
251 unless ( -w C4::Context->config('lockdir') ) {
252 push @xml_config_warnings, {
253 error => 'lockdir_not_writable',
254 lockdir => C4::Context->config('lockdir')
259 if ( ! defined C4::Context->config('upload_path') ) {
260 if ( Koha::Config::SysPrefs->find('OPACBaseURL')->value ) {
261 # OPACBaseURL seems to be set
262 push @xml_config_warnings, {
263 error => 'uploadpath_entry_missing'
266 push @xml_config_warnings, {
267 error => 'uploadpath_and_opacbaseurl_entry_missing'
272 if ( ! C4::Context->config('tmp_path') ) {
273 my $temporary_directory = C4::Context::temporary_directory;
274 push @xml_config_warnings, {
275 error => 'tmp_path_missing',
276 effective_tmp_dir => $temporary_directory,
280 # Test Zebra facets configuration
281 if ( !defined C4::Context->config('use_zebra_facets') ) {
282 push @xml_config_warnings, { error => 'use_zebra_facets_entry_missing' };
286 if ( C4::Context->preference('ILLModule') ) {
287 my $warnILLConfiguration = 0;
288 my $ill_config_from_file = C4::Context->config("interlibrary_loans");
289 my $ill_config = Koha::Illrequest::Config->new;
291 my $available_ill_backends =
292 ( scalar @{ $ill_config->available_backends } > 0 );
295 if ( !$available_ill_backends ) {
296 $template->param( no_ill_backends => 1 );
297 $warnILLConfiguration = 1;
301 if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) {
302 $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code );
303 $warnILLConfiguration = 1;
306 if ( !$ill_config_from_file->{partner_code} ) {
307 # partner code not defined
308 $template->param( ill_partner_code_not_defined => 1 );
309 $warnILLConfiguration = 1;
313 if ( !$ill_config_from_file->{branch} ) {
315 $template->param( ill_branch_not_defined => 1 );
316 $warnILLConfiguration = 1;
319 $template->param( warnILLConfiguration => $warnILLConfiguration );
325 OPACXSLTDetailsDisplay
327 OPACXSLTResultsDisplay
333 for my $p ( @xslt_prefs ) {
334 my $xsl_filename = C4::XSLT::get_xsl_filename( $p );
335 next if -e $xsl_filename;
339 value => C4::Context->preference("$p"),
340 filename => $xsl_filename
344 $template->param( warnXSLT => \@warnXSLT ) if @warnXSLT;
347 if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) {
348 # Check ES configuration health and runtime status
356 $es_conf = Koha::SearchEngine::Elasticsearch::_read_configuration();
359 if ( ref($_) eq 'Koha::Exceptions::Config::MissingEntry' ) {
360 $template->param( elasticsearch_fatal_config_error => $_->message );
361 $es_config_error = 1;
364 if ( !$es_config_error ) {
366 my $biblios_index_name = $es_conf->{index_name} . "_" . $Koha::SearchEngine::BIBLIOS_INDEX;
367 my $authorities_index_name = $es_conf->{index_name} . "_" . $Koha::SearchEngine::AUTHORITIES_INDEX;
369 my @indexes = ($biblios_index_name, $authorities_index_name);
370 # TODO: When new indexes get added, we could have other ways to
371 # fetch the list of available indexes (e.g. plugins, etc)
372 $es_status->{nodes} = $es_conf->{nodes};
373 my $es = Search::Elasticsearch->new({ nodes => $es_conf->{nodes} });
374 my $es_status->{version} = $es->info->{version}->{number};
376 foreach my $index ( @indexes ) {
379 $count = $es->indices->stats( index => $index )
380 ->{_all}{primaries}{docs}{count};
383 if ( ref($_) eq 'Search::Elasticsearch::Error::Missing' ) {
384 push @{ $es_status->{errors} }, "Index not found ($index)";
387 elsif ( ref($_) eq 'Search::Elasticsearch::Error::NoNodes' ) {
391 # TODO: when time comes, we will cover more use cases
396 push @{ $es_status->{indexes} },
398 index_name => $index,
402 $es_status->{running} = $es_running;
404 $template->param( elasticsearch_status => $es_status );
408 if ( C4::Context->preference('RESTOAuth2ClientCredentials') ) {
409 # Do we have the required deps?
410 unless ( can_load( modules => { 'Net::OAuth2::AuthorizationServer' => undef }) ) {
411 $template->param( oauth2_missing_deps => 1 );
415 # Sco Patron should not contain any other perms than circulate => self_checkout
416 if ( C4::Context->preference('WebBasedSelfCheck')
417 and C4::Context->preference('AutoSelfCheckAllowed')
419 my $userid = C4::Context->preference('AutoSelfCheckID');
420 my $all_permissions = C4::Auth::get_user_subpermissions( $userid );
421 my ( $has_self_checkout_perm, $has_other_permissions );
422 while ( my ( $module, $permissions ) = each %$all_permissions ) {
423 if ( $module eq 'self_check' ) {
424 while ( my ( $permission, $flag ) = each %$permissions ) {
425 if ( $permission eq 'self_checkout_module' ) {
426 $has_self_checkout_perm = 1;
428 $has_other_permissions = 1;
432 $has_other_permissions = 1;
436 AutoSelfCheckPatronDoesNotHaveSelfCheckPerm => not ( $has_self_checkout_perm ),
437 AutoSelfCheckPatronHasTooManyPerm => $has_other_permissions,
441 # Test YAML system preferences
442 # FIXME: This is list of current YAML formatted prefs, should by type of preference
444 "UpdateNotForLoanStatusOnCheckin",
446 "BibtexExportAdditionalFields",
447 "RisExportAdditionalFields",
448 "UpdateItemWhenLostFromHoldList",
450 "MarcItemFieldsToOrder",
451 "UpdateitemLocationOnCheckin",
455 foreach my $syspref (@yaml_prefs) {
456 my $yaml = C4::Context->preference( $syspref );
458 eval { YAML::XS::Load( Encode::encode_utf8("$yaml\n\n") ); };
460 push @bad_yaml_prefs, $syspref;
464 $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
467 my $dbh = C4::Context->dbh;
468 my $patrons = $dbh->selectall_arrayref(
469 q|select b.borrowernumber from borrowers b join deletedborrowers db on b.borrowernumber=db.borrowernumber|,
472 my $biblios = $dbh->selectall_arrayref(
473 q|select b.biblionumber from biblio b join deletedbiblio db on b.biblionumber=db.biblionumber|,
476 my $items = $dbh->selectall_arrayref(
477 q|select i.itemnumber from items i join deleteditems di on i.itemnumber=di.itemnumber|,
480 my $checkouts = $dbh->selectall_arrayref(
481 q|select i.issue_id from issues i join old_issues oi on i.issue_id=oi.issue_id|,
484 my $holds = $dbh->selectall_arrayref(
485 q|select r.reserve_id from reserves r join old_reserves o on r.reserve_id=o.reserve_id|,
488 if ( @$patrons or @$biblios or @$items or @$checkouts or @$holds ) {
491 ai_patrons => $patrons,
492 ai_biblios => $biblios,
494 ai_checkouts => $checkouts,
502 my $dbh = C4::Context->dbh;
503 my $units = Koha::CirculationRules->search({ rule_name => 'lengthunit', rule_value => { -not_in => ['days', 'hours'] } });
505 if ( $units->count ) {
507 warnIssuingRules => 1,
513 # Guarantor relationships warnings
515 my $dbh = C4::Context->dbh;
516 my ($bad_relationships_count) = $dbh->selectall_arrayref(q{
519 SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data'
521 SELECT relationship FROM borrowers WHERE relationship='_bad_data') a
524 $bad_relationships_count = $bad_relationships_count->[0]->[0];
526 my $existing_relationships = $dbh->selectall_arrayref(q{
527 SELECT DISTINCT(relationship)
529 SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL
531 SELECT relationship FROM borrowers WHERE relationship IS NOT NULL) a
534 my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') );
535 $valid_relationships{ _bad_data } = 1; # we handle this case in another way
537 my $wrong_relationships = [ grep { !$valid_relationships{ $_->[0] } } @{$existing_relationships} ];
538 if ( @$wrong_relationships or $bad_relationships_count ) {
541 warnRelationships => 1,
544 if ( $wrong_relationships ) {
546 wrong_relationships => $wrong_relationships
549 if ($bad_relationships_count) {
551 bad_relationships_count => $bad_relationships_count,
558 # Test 'bcrypt_settings' config for Pseudonymization
559 $template->param( config_bcrypt_settings_no_set => 1 )
560 if C4::Context->preference('Pseudonymization')
561 and not C4::Context->config('bcrypt_settings');
565 my @frameworkcodes = Koha::BiblioFrameworks->search->get_column('frameworkcode');
566 my @hidden_biblionumbers;
567 push @frameworkcodes, ""; # it's not in the biblio_frameworks table!
568 for my $frameworkcode ( @frameworkcodes ) {
569 my $shouldhidemarc_opac = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
571 frameworkcode => $frameworkcode,
575 push @hidden_biblionumbers, { frameworkcode => $frameworkcode, interface => 'opac' }
576 if $shouldhidemarc_opac->{biblionumber};
578 my $shouldhidemarc_intranet = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
580 frameworkcode => $frameworkcode,
581 interface => "intranet"
584 push @hidden_biblionumbers, { frameworkcode => $frameworkcode, interface => 'intranet' }
585 if $shouldhidemarc_intranet->{biblionumber};
587 $template->param( warnHiddenBiblionumbers => \@hidden_biblionumbers );
591 # BackgroundJob - test connection to message broker
593 Koha::BackgroundJob->connect;
597 $template->param( warnConnectBroker => $@ );
601 my %versions = C4::Context::get_versions();
604 kohaVersion => $versions{'kohaVersion'},
605 osVersion => $versions{'osVersion'},
606 perlPath => $perl_path,
607 perlVersion => $versions{'perlVersion'},
608 perlIncPath => [ map { perlinc => $_ }, @INC ],
609 mysqlVersion => $versions{'mysqlVersion'},
610 apacheVersion => $versions{'apacheVersion'},
611 zebraVersion => $zebraVersion,
612 prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities,
613 prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
614 warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
615 warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
616 warnPrefAnonymousPatronOPACPrivacy => $warnPrefAnonymousPatronOPACPrivacy,
617 warnPrefAnonymousPatronAnonSuggestions => $warnPrefAnonymousPatronAnonSuggestions,
618 warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist => $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist,
619 warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist => $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist,
620 warnPrefKohaAdminEmailAddress => $warnPrefKohaAdminEmailAddress,
621 warnPrefOpacHiddenItems => $warnPrefOpacHiddenItems,
622 errZebraConnection => $errZebraConnection,
623 warnIsRootUser => $warnIsRootUser,
624 warnNoActiveCurrency => $warnNoActiveCurrency,
625 warnNoTemplateCaching => ( C4::Context->config('template_cache_dir') ? 0 : 1 ),
626 xml_config_warnings => \@xml_config_warnings,
627 warnStatisticsFieldsError => $warnStatisticsFieldsError,
632 my $perl_modules = C4::Installer::PerlModules->new;
633 $perl_modules->versions_info;
635 my @pm_types = qw(missing_pm upgrade_pm current_pm);
637 foreach my $pm_type(@pm_types) {
638 my $modules = $perl_modules->get_attr($pm_type);
639 foreach (@$modules) {
640 my ($module, $stats) = each %$_;
645 version => $stats->{'cur_ver'},
646 missing => ($pm_type eq 'missing_pm' ? 1 : 0),
647 upgrade => ($pm_type eq 'upgrade_pm' ? 1 : 0),
648 current => ($pm_type eq 'current_pm' ? 1 : 0),
649 require => $stats->{'required'},
650 reqversion => $stats->{'min_ver'},
651 maxversion => $stats->{'max_ver'},
652 excversion => $stats->{'exc_ver'}
658 @components = sort {$a->{'name'} cmp $b->{'name'}} @components;
663 foreach (@components) {
665 unless (++$counter % 4) {
666 push (@$table, {row => $row});
670 # Processing the last line (if there are any modules left)
671 if (scalar(@$row) > 0) {
672 # Extending $row to the table size
674 # Pushing the last line
675 push (@$table, {row => $row});
679 $template->param( table => $table );
682 ## ------------------------------------------
683 ## Koha contributions
685 if ( defined C4::Context->config('docdir') ) {
686 $docdir = C4::Context->config('docdir');
688 # if no <docdir> is defined in koha-conf.xml, use the default location
689 # this is a work-around to stop breakage on upgraded Kohas, bug 8911
690 $docdir = C4::Context->config('intranetdir') . '/docs';
695 -e "$docdir" . "/teams.yaml"
696 ? YAML::XS::LoadFile( "$docdir" . "/teams.yaml" )
698 my $dev_team = (sort {$b <=> $a} (keys %{$teams->{team}}))[0];
699 my $short_version = substr($versions{'kohaVersion'},0,5);
700 my $minor = substr($versions{'kohaVersion'},3,2);
701 my $development_version = ( $minor eq '05' || $minor eq '11' ) ? 0 : 1;
702 $template->param( short_version => $short_version );
703 $template->param( development_version => $development_version );
707 -e "$docdir" . "/contributors.yaml"
708 ? YAML::XS::LoadFile( "$docdir" . "/contributors.yaml" )
710 delete $contributors->{_others_};
711 for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) {
712 for my $role ( keys %{ $teams->{team}->{$version} } ) {
713 my $normalized_role = "$role";
714 $normalized_role =~ s/s$//;
715 if ( ref( $teams->{team}->{$version}->{$role} ) eq 'ARRAY' ) {
716 for my $contributor ( @{ $teams->{team}->{$version}->{$role} } ) {
717 my $name = $contributor->{name};
718 # Add role to contributors
719 push @{ $contributors->{$name}->{roles}->{$normalized_role} },
721 # Add openhub to teams
722 if ( exists( $contributors->{$name}->{openhub} ) ) {
723 $contributor->{openhub} = $contributors->{$name}->{openhub};
727 elsif ( $role ne 'release_date' ) {
728 my $name = $teams->{team}->{$version}->{$role}->{name};
729 # Add role to contributors
730 push @{ $contributors->{$name}->{roles}->{$normalized_role} },
732 # Add openhub to teams
733 if ( exists( $contributors->{$name}->{openhub} ) ) {
734 $teams->{team}->{$version}->{$role}->{openhub} =
735 $contributors->{$name}->{openhub};
739 $teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role});
744 ## Create last name ordered array of people from contributors
746 { name => $_, ( $contributors->{$_} ? %{ $contributors->{$_} } : () ) }
748 my ($alast) = $a =~ /(\S+)$/;
749 my ($blast) = $b =~ /(\S+)$/;
750 my $cmp = lc($alast||"") cmp lc($blast||"");
753 my ($a2last) = $a =~ /(\S+)\s\S+$/;
754 my ($b2last) = $b =~ /(\S+)\s\S+$/;
755 lc($a2last||"") cmp lc($b2last||"");
756 } keys %$contributors;
758 $template->param( contributors => \@people );
759 $template->param( maintenance_team => $teams->{team}->{$dev_team} );
760 $template->param( release_team => $teams->{team}->{$short_version} );
763 if ( open( my $file, "<:encoding(UTF-8)", "$docdir" . "/history.txt" ) ) {
773 shift @lines; #remove header row
776 my ( $epoch, $date, $desc, $tag ) = split(/\t/);
777 if(!$desc && $date=~ /(?<=\d{4})\s+/) {
778 ($date, $desc)= ($`, $');
790 #foreach my $row2 (@rows2) {
793 push( @$table2, { row2 => $row2 } );
797 $template->param( table2 => $table2 );
799 $template->param( timeline_read_error => 1 );
802 output_html_with_http_headers $query, $cookie, $template->output;