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;
28 use File::Slurp qw( read_file );
29 use List::MoreUtils qw( any );
30 use Module::Load::Conditional qw( can_load );
31 use Config qw( %Config );
32 use Search::Elasticsearch;
33 use Try::Tiny qw( catch try );
37 use C4::Output qw( output_html_with_http_headers );
38 use C4::Auth qw( get_template_and_user get_user_subpermissions );
40 use C4::Installer::PerlModules;
43 use Koha::DateUtils qw( dt_from_string output_pref );
44 use Koha::Acquisition::Currencies;
45 use Koha::BackgroundJob;
46 use Koha::BiblioFrameworks;
48 use Koha::Patron::Categories;
51 use Koha::Config::SysPrefs;
52 use Koha::Illrequest::Config;
53 use Koha::SearchEngine::Elasticsearch;
55 use Koha::Filter::MARC::ViewPolicy;
57 use C4::Members::Statistics;
60 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
62 template_name => "about.tt",
65 flagsrequired => { catalogue => 1 },
69 my $config_timezone = C4::Context->config('timezone') // '';
70 my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone );
71 my $env_timezone = $ENV{TZ} // '';
72 my $env_invalid = !DateTime::TimeZone->is_valid_name( $env_timezone );
73 my $actual_bad_tz_fallback = 0;
75 if ( $config_timezone ne '' &&
78 $actual_bad_tz_fallback = 1;
80 elsif ( $config_timezone eq '' &&
81 $env_timezone ne '' &&
83 # No config, but bad ENV{TZ}
84 $actual_bad_tz_fallback = 1;
88 actual => C4::Context->tz->name,
89 actual_bad_tz_fallback => $actual_bad_tz_fallback,
90 config => $config_timezone,
91 config_invalid => $config_invalid,
92 environment => $env_timezone,
93 environment_invalid => $env_invalid
97 my $log4perl_config = C4::Context->config("log4perl_conf");
99 if ( ! $log4perl_config ) {
100 push @log4perl_errors, 'missing_config_entry'
103 my @lines = read_file($log4perl_config) or push @log4perl_errors, 'cannot_read_config_file';
104 for my $line ( @lines ) {
105 next unless $line =~ m|log4perl.appender.\w+.filename=(.*)|;
106 push @log4perl_errors, 'logfile_not_writable' unless -w $1;
109 eval {Koha::Logger->get};
110 push @log4perl_errors, 'cannot_init_module' and warn $@ if $@;
111 $template->param( log4perl_errors => @log4perl_errors );
115 time_zone => $time_zone,
116 current_date_and_time => output_pref({ dt => dt_from_string(), dateformat => 'iso' })
121 $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
124 my $zebraVersion = `zebraidx -V`;
126 # Check running PSGI env
127 if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {
130 psgi_server => ($ENV{ PLACK_ENV }) ? "Plack ($ENV{PLACK_ENV})" :
131 ($ENV{ MOD_PERL }) ? "mod_perl ($ENV{MOD_PERL})" :
136 # Memcached configuration
137 my $memcached_servers = $ENV{MEMCACHED_SERVERS} || C4::Context->config('memcached_servers');
138 my $memcached_namespace = $ENV{MEMCACHED_NAMESPACE} || C4::Context->config('memcached_namespace') // 'koha';
140 my $cache = Koha::Caches->get_instance;
141 my $effective_caching_method = ref($cache->cache);
142 # Memcached may have been running when plack has been initialized but could have been stopped since
143 # FIXME What are the consequences of that??
144 my $is_memcached_still_active = $cache->set_in_cache('test_for_about_page', "just a simple value");
146 my $where_is_memcached_config = 'nowhere';
147 if ( $ENV{MEMCACHED_SERVERS} and C4::Context->config('memcached_servers') ) {
148 $where_is_memcached_config = 'both';
149 } elsif ( $ENV{MEMCACHED_SERVERS} and not C4::Context->config('memcached_servers') ) {
150 $where_is_memcached_config = 'ENV_only';
151 } elsif ( C4::Context->config('memcached_servers') ) {
152 $where_is_memcached_config = 'config_only';
156 effective_caching_method => $effective_caching_method,
157 memcached_servers => $memcached_servers,
158 memcached_namespace => $memcached_namespace,
159 is_memcached_still_active => $is_memcached_still_active,
160 where_is_memcached_config => $where_is_memcached_config,
161 memcached_running => Koha::Caches->get_instance->memcached_cache,
164 # Additional system information for warnings
166 my $warnStatisticsFieldsError;
167 my $prefStatisticsFields = C4::Context->preference('StatisticsFields');
168 if ($prefStatisticsFields) {
169 $warnStatisticsFieldsError = $prefStatisticsFields
170 unless ( $prefStatisticsFields eq C4::Members::Statistics->get_fields() );
173 my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities');
174 my $prefBiblioAddsAuthorities = C4::Context->preference('BiblioAddsAuthorities');
175 my $warnPrefBiblioAddsAuthorities = ( $prefAutoCreateAuthorities && ( !$prefBiblioAddsAuthorities) );
177 my $prefEasyAnalyticalRecords = C4::Context->preference('EasyAnalyticalRecords');
178 my $prefUseControlNumber = C4::Context->preference('UseControlNumber');
179 my $warnPrefEasyAnalyticalRecords = ( $prefEasyAnalyticalRecords && $prefUseControlNumber );
181 my $AnonymousPatron = C4::Context->preference('AnonymousPatron');
182 my $warnPrefAnonymousPatronOPACPrivacy = (
183 C4::Context->preference('OPACPrivacy')
184 and not $AnonymousPatron
186 my $warnPrefAnonymousPatronAnonSuggestions = (
187 C4::Context->preference('AnonSuggestions')
188 and not $AnonymousPatron
191 my $anonymous_patron = Koha::Patrons->find( $AnonymousPatron );
192 my $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist = ( $AnonymousPatron && C4::Context->preference('AnonSuggestions') && not $anonymous_patron );
194 my $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist = ( not $anonymous_patron and Koha::Patrons->search({ privacy => 2 })->count );
196 my $warnPrefKohaAdminEmailAddress = C4::Context->preference('KohaAdminEmailAddress') !~ m/$Email::Address::mailbox/;
198 my $c = Koha::Items->filter_by_visible_in_opac->count;
199 my @warnings = C4::Context->dbh->selectrow_array('SHOW WARNINGS');
200 my $warnPrefOpacHiddenItems = $warnings[2];
202 my $invalid_yesno = Koha::Config::SysPrefs->search(
205 value => { -or => { 'is' => undef, -not_in => [ "1", "0" ] } }
208 $template->param( invalid_yesno => $invalid_yesno );
210 my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
212 my $warnIsRootUser = (! $loggedinuser);
214 my $warnNoActiveCurrency = (! defined Koha::Acquisition::Currencies->get_active);
216 my @xml_config_warnings;
218 if ( C4::Context->config('zebra_bib_index_mode')
219 and C4::Context->config('zebra_bib_index_mode') eq 'grs1' )
221 push @xml_config_warnings, { error => 'zebra_bib_index_mode_is_grs1' };
224 if ( C4::Context->config('zebra_auth_index_mode')
225 and C4::Context->config('zebra_auth_index_mode') eq 'grs1' )
227 push @xml_config_warnings, { error => 'zebra_auth_index_mode_is_grs1' };
230 my $authorityserver = C4::Context->zebraconfig('authorityserver');
231 if( ( C4::Context->config('zebra_auth_index_mode')
232 and C4::Context->config('zebra_auth_index_mode') eq 'dom' )
233 && ( $authorityserver->{config} !~ /zebra-authorities-dom.cfg/ ) )
235 push @xml_config_warnings, {
236 error => 'zebra_auth_index_mode_mismatch_warn'
240 if ( ! defined C4::Context->config('log4perl_conf') ) {
241 push @xml_config_warnings, {
242 error => 'log4perl_entry_missing'
246 if ( ! defined C4::Context->config('lockdir') ) {
247 push @xml_config_warnings, {
248 error => 'lockdir_entry_missing'
252 unless ( -w C4::Context->config('lockdir') ) {
253 push @xml_config_warnings, {
254 error => 'lockdir_not_writable',
255 lockdir => C4::Context->config('lockdir')
260 if ( ! defined C4::Context->config('upload_path') ) {
261 if ( Koha::Config::SysPrefs->find('OPACBaseURL')->value ) {
262 # OPACBaseURL seems to be set
263 push @xml_config_warnings, {
264 error => 'uploadpath_entry_missing'
267 push @xml_config_warnings, {
268 error => 'uploadpath_and_opacbaseurl_entry_missing'
273 if ( ! C4::Context->config('tmp_path') ) {
274 my $temporary_directory = C4::Context::temporary_directory;
275 push @xml_config_warnings, {
276 error => 'tmp_path_missing',
277 effective_tmp_dir => $temporary_directory,
281 # Test Zebra facets configuration
282 if ( !defined C4::Context->config('use_zebra_facets') ) {
283 push @xml_config_warnings, { error => 'use_zebra_facets_entry_missing' };
287 if ( C4::Context->preference('ILLModule') ) {
288 my $warnILLConfiguration = 0;
289 my $ill_config_from_file = C4::Context->config("interlibrary_loans");
290 my $ill_config = Koha::Illrequest::Config->new;
292 my $available_ill_backends =
293 ( scalar @{ $ill_config->available_backends } > 0 );
296 if ( !$available_ill_backends ) {
297 $template->param( no_ill_backends => 1 );
298 $warnILLConfiguration = 1;
302 if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) {
303 $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code );
304 $warnILLConfiguration = 1;
307 if ( !$ill_config_from_file->{partner_code} ) {
308 # partner code not defined
309 $template->param( ill_partner_code_not_defined => 1 );
310 $warnILLConfiguration = 1;
314 if ( !$ill_config_from_file->{branch} ) {
316 $template->param( ill_branch_not_defined => 1 );
317 $warnILLConfiguration = 1;
320 $template->param( warnILLConfiguration => $warnILLConfiguration );
326 OPACXSLTDetailsDisplay
328 OPACXSLTResultsDisplay
334 for my $p ( @xslt_prefs ) {
335 my $xsl_filename = C4::XSLT::get_xsl_filename( $p );
336 next if -e $xsl_filename;
340 value => C4::Context->preference("$p"),
341 filename => $xsl_filename
345 $template->param( warnXSLT => \@warnXSLT ) if @warnXSLT;
348 if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) {
349 # Check ES configuration health and runtime status
357 $es_conf = Koha::SearchEngine::Elasticsearch::_read_configuration();
360 if ( ref($_) eq 'Koha::Exceptions::Config::MissingEntry' ) {
361 $template->param( elasticsearch_fatal_config_error => $_->message );
362 $es_config_error = 1;
365 if ( !$es_config_error ) {
367 my $biblios_index_name = $es_conf->{index_name} . "_" . $Koha::SearchEngine::BIBLIOS_INDEX;
368 my $authorities_index_name = $es_conf->{index_name} . "_" . $Koha::SearchEngine::AUTHORITIES_INDEX;
370 my @indexes = ($biblios_index_name, $authorities_index_name);
371 # TODO: When new indexes get added, we could have other ways to
372 # fetch the list of available indexes (e.g. plugins, etc)
373 $es_status->{nodes} = $es_conf->{nodes};
374 my $es = Search::Elasticsearch->new({ nodes => $es_conf->{nodes} });
375 my $es_status->{version} = $es->info->{version}->{number};
377 foreach my $index ( @indexes ) {
380 $count = $es->indices->stats( index => $index )
381 ->{_all}{primaries}{docs}{count};
384 if ( ref($_) eq 'Search::Elasticsearch::Error::Missing' ) {
385 push @{ $es_status->{errors} }, "Index not found ($index)";
388 elsif ( ref($_) eq 'Search::Elasticsearch::Error::NoNodes' ) {
392 # TODO: when time comes, we will cover more use cases
397 push @{ $es_status->{indexes} },
399 index_name => $index,
403 $es_status->{running} = $es_running;
405 $template->param( elasticsearch_status => $es_status );
409 if ( C4::Context->preference('RESTOAuth2ClientCredentials') ) {
410 # Do we have the required deps?
411 unless ( can_load( modules => { 'Net::OAuth2::AuthorizationServer' => undef }) ) {
412 $template->param( oauth2_missing_deps => 1 );
416 # Sco Patron should not contain any other perms than circulate => self_checkout
417 if ( C4::Context->preference('WebBasedSelfCheck')
418 and C4::Context->preference('AutoSelfCheckAllowed')
420 my $userid = C4::Context->preference('AutoSelfCheckID');
421 my $all_permissions = C4::Auth::get_user_subpermissions( $userid );
422 my ( $has_self_checkout_perm, $has_other_permissions );
423 while ( my ( $module, $permissions ) = each %$all_permissions ) {
424 if ( $module eq 'self_check' ) {
425 while ( my ( $permission, $flag ) = each %$permissions ) {
426 if ( $permission eq 'self_checkout_module' ) {
427 $has_self_checkout_perm = 1;
429 $has_other_permissions = 1;
433 $has_other_permissions = 1;
437 AutoSelfCheckPatronDoesNotHaveSelfCheckPerm => not ( $has_self_checkout_perm ),
438 AutoSelfCheckPatronHasTooManyPerm => $has_other_permissions,
442 # Test YAML system preferences
443 # FIXME: This is list of current YAML formatted prefs, should by type of preference
445 "UpdateNotForLoanStatusOnCheckin",
447 "BibtexExportAdditionalFields",
448 "RisExportAdditionalFields",
449 "UpdateItemWhenLostFromHoldList",
451 "MarcItemFieldsToOrder",
452 "UpdateitemLocationOnCheckin",
456 foreach my $syspref (@yaml_prefs) {
457 my $yaml = C4::Context->preference( $syspref );
459 eval { YAML::XS::Load( Encode::encode_utf8("$yaml\n\n") ); };
461 push @bad_yaml_prefs, $syspref;
465 $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
468 my $dbh = C4::Context->dbh;
469 my $patrons = $dbh->selectall_arrayref(
470 q|select b.borrowernumber from borrowers b join deletedborrowers db on b.borrowernumber=db.borrowernumber|,
473 my $biblios = $dbh->selectall_arrayref(
474 q|select b.biblionumber from biblio b join deletedbiblio db on b.biblionumber=db.biblionumber|,
477 my $items = $dbh->selectall_arrayref(
478 q|select i.itemnumber from items i join deleteditems di on i.itemnumber=di.itemnumber|,
481 my $checkouts = $dbh->selectall_arrayref(
482 q|select i.issue_id from issues i join old_issues oi on i.issue_id=oi.issue_id|,
485 my $holds = $dbh->selectall_arrayref(
486 q|select r.reserve_id from reserves r join old_reserves o on r.reserve_id=o.reserve_id|,
489 if ( @$patrons or @$biblios or @$items or @$checkouts or @$holds ) {
492 ai_patrons => $patrons,
493 ai_biblios => $biblios,
495 ai_checkouts => $checkouts,
503 my $dbh = C4::Context->dbh;
504 my $units = Koha::CirculationRules->search({ rule_name => 'lengthunit', rule_value => { -not_in => ['days', 'hours'] } });
506 if ( $units->count ) {
508 warnIssuingRules => 1,
514 # Guarantor relationships warnings
516 my $dbh = C4::Context->dbh;
517 my ($bad_relationships_count) = $dbh->selectall_arrayref(q{
520 SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data'
522 SELECT relationship FROM borrowers WHERE relationship='_bad_data') a
525 $bad_relationships_count = $bad_relationships_count->[0]->[0];
527 my $existing_relationships = $dbh->selectall_arrayref(q{
528 SELECT DISTINCT(relationship)
530 SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL
532 SELECT relationship FROM borrowers WHERE relationship IS NOT NULL) a
535 my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') );
536 $valid_relationships{ _bad_data } = 1; # we handle this case in another way
538 my $wrong_relationships = [ grep { !$valid_relationships{ $_->[0] } } @{$existing_relationships} ];
539 if ( @$wrong_relationships or $bad_relationships_count ) {
542 warnRelationships => 1,
545 if ( $wrong_relationships ) {
547 wrong_relationships => $wrong_relationships
550 if ($bad_relationships_count) {
552 bad_relationships_count => $bad_relationships_count,
559 # Test 'bcrypt_settings' config for Pseudonymization
560 $template->param( config_bcrypt_settings_no_set => 1 )
561 if C4::Context->preference('Pseudonymization')
562 and not C4::Context->config('bcrypt_settings');
566 my @frameworkcodes = Koha::BiblioFrameworks->search->get_column('frameworkcode');
567 my @hidden_biblionumbers;
568 push @frameworkcodes, ""; # it's not in the biblio_frameworks table!
569 for my $frameworkcode ( @frameworkcodes ) {
570 my $shouldhidemarc_opac = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
572 frameworkcode => $frameworkcode,
576 push @hidden_biblionumbers, { frameworkcode => $frameworkcode, interface => 'opac' }
577 if $shouldhidemarc_opac->{biblionumber};
579 my $shouldhidemarc_intranet = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
581 frameworkcode => $frameworkcode,
582 interface => "intranet"
585 push @hidden_biblionumbers, { frameworkcode => $frameworkcode, interface => 'intranet' }
586 if $shouldhidemarc_intranet->{biblionumber};
588 $template->param( warnHiddenBiblionumbers => \@hidden_biblionumbers );
592 # BackgroundJob - test connection to message broker
594 Koha::BackgroundJob->connect;
598 $template->param( warnConnectBroker => $@ );
602 my %versions = C4::Context::get_versions();
605 kohaVersion => $versions{'kohaVersion'},
606 osVersion => $versions{'osVersion'},
607 perlPath => $perl_path,
608 perlVersion => $versions{'perlVersion'},
609 perlIncPath => [ map { perlinc => $_ }, @INC ],
610 mysqlVersion => $versions{'mysqlVersion'},
611 apacheVersion => $versions{'apacheVersion'},
612 zebraVersion => $zebraVersion,
613 prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities,
614 prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
615 warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
616 warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
617 warnPrefAnonymousPatronOPACPrivacy => $warnPrefAnonymousPatronOPACPrivacy,
618 warnPrefAnonymousPatronAnonSuggestions => $warnPrefAnonymousPatronAnonSuggestions,
619 warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist => $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist,
620 warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist => $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist,
621 warnPrefKohaAdminEmailAddress => $warnPrefKohaAdminEmailAddress,
622 warnPrefOpacHiddenItems => $warnPrefOpacHiddenItems,
623 errZebraConnection => $errZebraConnection,
624 warnIsRootUser => $warnIsRootUser,
625 warnNoActiveCurrency => $warnNoActiveCurrency,
626 warnNoTemplateCaching => ( C4::Context->config('template_cache_dir') ? 0 : 1 ),
627 xml_config_warnings => \@xml_config_warnings,
628 warnStatisticsFieldsError => $warnStatisticsFieldsError,
633 my $perl_modules = C4::Installer::PerlModules->new;
634 $perl_modules->versions_info;
636 my @pm_types = qw(missing_pm upgrade_pm current_pm);
638 foreach my $pm_type(@pm_types) {
639 my $modules = $perl_modules->get_attr($pm_type);
640 foreach (@$modules) {
641 my ($module, $stats) = each %$_;
646 version => $stats->{'cur_ver'},
647 missing => ($pm_type eq 'missing_pm' ? 1 : 0),
648 upgrade => ($pm_type eq 'upgrade_pm' ? 1 : 0),
649 current => ($pm_type eq 'current_pm' ? 1 : 0),
650 require => $stats->{'required'},
651 reqversion => $stats->{'min_ver'},
652 maxversion => $stats->{'max_ver'},
653 excversion => $stats->{'exc_ver'}
659 @components = sort {$a->{'name'} cmp $b->{'name'}} @components;
664 foreach (@components) {
666 unless (++$counter % 4) {
667 push (@$table, {row => $row});
671 # Processing the last line (if there are any modules left)
672 if (scalar(@$row) > 0) {
673 # Extending $row to the table size
675 # Pushing the last line
676 push (@$table, {row => $row});
680 $template->param( table => $table );
683 ## ------------------------------------------
684 ## Koha contributions
686 if ( defined C4::Context->config('docdir') ) {
687 $docdir = C4::Context->config('docdir');
689 # if no <docdir> is defined in koha-conf.xml, use the default location
690 # this is a work-around to stop breakage on upgraded Kohas, bug 8911
691 $docdir = C4::Context->config('intranetdir') . '/docs';
696 -e "$docdir" . "/teams.yaml"
697 ? YAML::XS::LoadFile( "$docdir" . "/teams.yaml" )
699 my $dev_team = (sort {$b <=> $a} (keys %{$teams->{team}}))[0];
700 my $short_version = substr($versions{'kohaVersion'},0,5);
701 my $minor = substr($versions{'kohaVersion'},3,2);
702 my $development_version = ( $minor eq '05' || $minor eq '11' ) ? 0 : 1;
703 $template->param( short_version => $short_version );
704 $template->param( development_version => $development_version );
708 -e "$docdir" . "/contributors.yaml"
709 ? YAML::XS::LoadFile( "$docdir" . "/contributors.yaml" )
711 delete $contributors->{_others_};
712 for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) {
713 for my $role ( keys %{ $teams->{team}->{$version} } ) {
714 my $normalized_role = "$role";
715 $normalized_role =~ s/s$//;
716 if ( ref( $teams->{team}->{$version}->{$role} ) eq 'ARRAY' ) {
717 for my $contributor ( @{ $teams->{team}->{$version}->{$role} } ) {
718 my $name = $contributor->{name};
719 # Add role to contributors
720 push @{ $contributors->{$name}->{roles}->{$normalized_role} },
722 # Add openhub to teams
723 if ( exists( $contributors->{$name}->{openhub} ) ) {
724 $contributor->{openhub} = $contributors->{$name}->{openhub};
728 elsif ( $role ne 'release_date' ) {
729 my $name = $teams->{team}->{$version}->{$role}->{name};
730 # Add role to contributors
731 push @{ $contributors->{$name}->{roles}->{$normalized_role} },
733 # Add openhub to teams
734 if ( exists( $contributors->{$name}->{openhub} ) ) {
735 $teams->{team}->{$version}->{$role}->{openhub} =
736 $contributors->{$name}->{openhub};
740 $teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role});
745 ## Create last name ordered array of people from contributors
747 { name => $_, ( $contributors->{$_} ? %{ $contributors->{$_} } : () ) }
749 my ($alast) = $a =~ /(\S+)$/;
750 my ($blast) = $b =~ /(\S+)$/;
751 my $cmp = lc($alast||"") cmp lc($blast||"");
754 my ($a2last) = $a =~ /(\S+)\s\S+$/;
755 my ($b2last) = $b =~ /(\S+)\s\S+$/;
756 lc($a2last||"") cmp lc($b2last||"");
757 } keys %$contributors;
759 $template->param( contributors => \@people );
760 $template->param( maintenance_team => $teams->{team}->{$dev_team} );
761 $template->param( release_team => $teams->{team}->{$short_version} );
764 if ( open( my $file, "<:encoding(UTF-8)", "$docdir" . "/history.txt" ) ) {
774 shift @lines; #remove header row
777 my ( $epoch, $date, $desc, $tag ) = split(/\t/);
778 if(!$desc && $date=~ /(?<=\d{4})\s+/) {
779 ($date, $desc)= ($`, $');
791 #foreach my $row2 (@rows2) {
794 push( @$table2, { row2 => $row2 } );
798 $template->param( table2 => $table2 );
800 $template->param( timeline_read_error => 1 );
803 output_html_with_http_headers $query, $cookie, $template->output;