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;
29 use List::MoreUtils qw/ any /;
31 use Module::Load::Conditional qw(can_load);
34 use Search::Elasticsearch;
36 use YAML qw/LoadFile/;
41 use C4::Installer::PerlModules;
44 use Koha::DateUtils qw(dt_from_string output_pref);
45 use Koha::Acquisition::Currencies;
46 use Koha::BackgroundJob;
47 use Koha::BiblioFrameworks;
49 use Koha::Patron::Categories;
52 use Koha::Config::SysPrefs;
53 use Koha::Illrequest::Config;
54 use Koha::SearchEngine::Elasticsearch;
56 use Koha::Filter::MARC::ViewPolicy;
58 use C4::Members::Statistics;
61 #use Smart::Comments '####';
64 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
66 template_name => "about.tt",
69 flagsrequired => { catalogue => 1 },
74 my $config_timezone = C4::Context->config('timezone') // '';
75 my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone );
76 my $env_timezone = $ENV{TZ} // '';
77 my $env_invalid = !DateTime::TimeZone->is_valid_name( $env_timezone );
78 my $actual_bad_tz_fallback = 0;
80 if ( $config_timezone ne '' &&
83 $actual_bad_tz_fallback = 1;
85 elsif ( $config_timezone eq '' &&
86 $env_timezone ne '' &&
88 # No config, but bad ENV{TZ}
89 $actual_bad_tz_fallback = 1;
93 actual => C4::Context->tz->name,
94 actual_bad_tz_fallback => $actual_bad_tz_fallback,
95 config => $config_timezone,
96 config_invalid => $config_invalid,
97 environment => $env_timezone,
98 environment_invalid => $env_invalid
102 my $log4perl_config = C4::Context->config("log4perl_conf");
104 if ( ! $log4perl_config ) {
105 push @log4perl_errors, 'missing_config_entry'
108 my @lines = read_file($log4perl_config) or push @log4perl_errors, 'cannot_read_config_file';
109 for my $line ( @lines ) {
110 next unless $line =~ m|log4perl.appender.\w+.filename=(.*)|;
111 push @log4perl_errors, 'logfile_not_writable' unless -w $1;
114 eval {Koha::Logger->get};
115 push @log4perl_errors, 'cannot_init_module' and warn $@ if $@;
116 $template->param( log4perl_errors => @log4perl_errors );
120 time_zone => $time_zone,
121 current_date_and_time => output_pref({ dt => dt_from_string(), dateformat => 'iso' })
126 $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
129 my $zebraVersion = `zebraidx -V`;
131 # Check running PSGI env
132 if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {
135 psgi_server => ($ENV{ PLACK_ENV }) ? "Plack ($ENV{PLACK_ENV})" :
136 ($ENV{ MOD_PERL }) ? "mod_perl ($ENV{MOD_PERL})" :
141 # Memcached configuration
142 my $memcached_servers = $ENV{MEMCACHED_SERVERS} || C4::Context->config('memcached_servers');
143 my $memcached_namespace = $ENV{MEMCACHED_NAMESPACE} || C4::Context->config('memcached_namespace') // 'koha';
145 my $cache = Koha::Caches->get_instance;
146 my $effective_caching_method = ref($cache->cache);
147 # Memcached may have been running when plack has been initialized but could have been stopped since
148 # FIXME What are the consequences of that??
149 my $is_memcached_still_active = $cache->set_in_cache('test_for_about_page', "just a simple value");
151 my $where_is_memcached_config = 'nowhere';
152 if ( $ENV{MEMCACHED_SERVERS} and C4::Context->config('memcached_servers') ) {
153 $where_is_memcached_config = 'both';
154 } elsif ( $ENV{MEMCACHED_SERVERS} and not C4::Context->config('memcached_servers') ) {
155 $where_is_memcached_config = 'ENV_only';
156 } elsif ( C4::Context->config('memcached_servers') ) {
157 $where_is_memcached_config = 'config_only';
161 effective_caching_method => $effective_caching_method,
162 memcached_servers => $memcached_servers,
163 memcached_namespace => $memcached_namespace,
164 is_memcached_still_active => $is_memcached_still_active,
165 where_is_memcached_config => $where_is_memcached_config,
166 memcached_running => Koha::Caches->get_instance->memcached_cache,
169 # Additional system information for warnings
171 my $warnStatisticsFieldsError;
172 my $prefStatisticsFields = C4::Context->preference('StatisticsFields');
173 if ($prefStatisticsFields) {
174 $warnStatisticsFieldsError = $prefStatisticsFields
175 unless ( $prefStatisticsFields eq C4::Members::Statistics->get_fields() );
178 my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities');
179 my $prefBiblioAddsAuthorities = C4::Context->preference('BiblioAddsAuthorities');
180 my $warnPrefBiblioAddsAuthorities = ( $prefAutoCreateAuthorities && ( !$prefBiblioAddsAuthorities) );
182 my $prefEasyAnalyticalRecords = C4::Context->preference('EasyAnalyticalRecords');
183 my $prefUseControlNumber = C4::Context->preference('UseControlNumber');
184 my $warnPrefEasyAnalyticalRecords = ( $prefEasyAnalyticalRecords && $prefUseControlNumber );
186 my $AnonymousPatron = C4::Context->preference('AnonymousPatron');
187 my $warnPrefAnonymousPatronOPACPrivacy = (
188 C4::Context->preference('OPACPrivacy')
189 and not $AnonymousPatron
191 my $warnPrefAnonymousPatronAnonSuggestions = (
192 C4::Context->preference('AnonSuggestions')
193 and not $AnonymousPatron
196 my $anonymous_patron = Koha::Patrons->find( $AnonymousPatron );
197 my $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist = ( $AnonymousPatron && C4::Context->preference('AnonSuggestions') && not $anonymous_patron );
199 my $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist = ( not $anonymous_patron and Koha::Patrons->search({ privacy => 2 })->count );
201 my $warnPrefKohaAdminEmailAddress = not Email::Valid->address(C4::Context->preference('KohaAdminEmailAddress'));
203 my $c = Koha::Items->filter_by_visible_in_opac->count;
204 my @warnings = C4::Context->dbh->selectrow_array('SHOW WARNINGS');
205 my $warnPrefOpacHiddenItems = $warnings[2];
207 my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
209 my $warnIsRootUser = (! $loggedinuser);
211 my $warnNoActiveCurrency = (! defined Koha::Acquisition::Currencies->get_active);
213 my @xml_config_warnings;
215 my $context = C4::Context->new;
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 if( ( C4::Context->config('zebra_auth_index_mode')
230 and C4::Context->config('zebra_auth_index_mode') eq 'dom' )
231 && ( $context->{'server'}->{'authorityserver'}->{'config'} !~ /zebra-authorities-dom.cfg/ ) )
233 push @xml_config_warnings, {
234 error => 'zebra_auth_index_mode_mismatch_warn'
238 if ( ! defined C4::Context->config('log4perl_conf') ) {
239 push @xml_config_warnings, {
240 error => 'log4perl_entry_missing'
244 if ( ! defined C4::Context->config('lockdir') ) {
245 push @xml_config_warnings, {
246 error => 'lockdir_entry_missing'
250 unless ( -w C4::Context->config('lockdir') ) {
251 push @xml_config_warnings, {
252 error => 'lockdir_not_writable',
253 lockdir => C4::Context->config('lockdir')
258 if ( ! defined C4::Context->config('upload_path') ) {
259 if ( Koha::Config::SysPrefs->find('OPACBaseURL')->value ) {
260 # OPACBaseURL seems to be set
261 push @xml_config_warnings, {
262 error => 'uploadpath_entry_missing'
265 push @xml_config_warnings, {
266 error => 'uploadpath_and_opacbaseurl_entry_missing'
271 if ( ! C4::Context->config('tmp_path') ) {
272 my $temporary_directory = C4::Context::temporary_directory;
273 push @xml_config_warnings, {
274 error => 'tmp_path_missing',
275 effective_tmp_dir => $temporary_directory,
279 # Test Zebra facets configuration
280 if ( !defined C4::Context->config('use_zebra_facets') ) {
281 push @xml_config_warnings, { error => 'use_zebra_facets_entry_missing' };
285 if ( C4::Context->preference('ILLModule') ) {
286 my $warnILLConfiguration = 0;
287 my $ill_config_from_file = C4::Context->config("interlibrary_loans");
288 my $ill_config = Koha::Illrequest::Config->new;
290 my $available_ill_backends =
291 ( scalar @{ $ill_config->available_backends } > 0 );
294 if ( !$available_ill_backends ) {
295 $template->param( no_ill_backends => 1 );
296 $warnILLConfiguration = 1;
300 if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) {
301 $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code );
302 $warnILLConfiguration = 1;
305 if ( !$ill_config_from_file->{partner_code} ) {
306 # partner code not defined
307 $template->param( ill_partner_code_not_defined => 1 );
308 $warnILLConfiguration = 1;
312 if ( !$ill_config_from_file->{branch} ) {
314 $template->param( ill_branch_not_defined => 1 );
315 $warnILLConfiguration = 1;
318 $template->param( warnILLConfiguration => $warnILLConfiguration );
321 if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) {
322 # Check ES configuration health and runtime status
330 $es_conf = Koha::SearchEngine::Elasticsearch::_read_configuration();
333 if ( ref($_) eq 'Koha::Exceptions::Config::MissingEntry' ) {
334 $template->param( elasticsearch_fatal_config_error => $_->message );
335 $es_config_error = 1;
338 if ( !$es_config_error ) {
340 my $biblios_index_name = $es_conf->{index_name} . "_" . $Koha::SearchEngine::BIBLIOS_INDEX;
341 my $authorities_index_name = $es_conf->{index_name} . "_" . $Koha::SearchEngine::AUTHORITIES_INDEX;
343 my @indexes = ($biblios_index_name, $authorities_index_name);
344 # TODO: When new indexes get added, we could have other ways to
345 # fetch the list of available indexes (e.g. plugins, etc)
346 $es_status->{nodes} = $es_conf->{nodes};
347 my $es = Search::Elasticsearch->new({ nodes => $es_conf->{nodes} });
348 my $es_status->{version} = $es->info->{version}->{number};
350 foreach my $index ( @indexes ) {
353 $count = $es->indices->stats( index => $index )
354 ->{_all}{primaries}{docs}{count};
357 if ( ref($_) eq 'Search::Elasticsearch::Error::Missing' ) {
358 push @{ $es_status->{errors} }, "Index not found ($index)";
361 elsif ( ref($_) eq 'Search::Elasticsearch::Error::NoNodes' ) {
365 # TODO: when time comes, we will cover more use cases
370 push @{ $es_status->{indexes} },
372 index_name => $index,
376 $es_status->{running} = $es_running;
378 $template->param( elasticsearch_status => $es_status );
382 if ( C4::Context->preference('RESTOAuth2ClientCredentials') ) {
383 # Do we have the required deps?
384 unless ( can_load( modules => { 'Net::OAuth2::AuthorizationServer' => undef }) ) {
385 $template->param( oauth2_missing_deps => 1 );
389 # Sco Patron should not contain any other perms than circulate => self_checkout
390 if ( C4::Context->preference('WebBasedSelfCheck')
391 and C4::Context->preference('AutoSelfCheckAllowed')
393 my $userid = C4::Context->preference('AutoSelfCheckID');
394 my $all_permissions = C4::Auth::get_user_subpermissions( $userid );
395 my ( $has_self_checkout_perm, $has_other_permissions );
396 while ( my ( $module, $permissions ) = each %$all_permissions ) {
397 if ( $module eq 'self_check' ) {
398 while ( my ( $permission, $flag ) = each %$permissions ) {
399 if ( $permission eq 'self_checkout_module' ) {
400 $has_self_checkout_perm = 1;
402 $has_other_permissions = 1;
406 $has_other_permissions = 1;
410 AutoSelfCheckPatronDoesNotHaveSelfCheckPerm => not ( $has_self_checkout_perm ),
411 AutoSelfCheckPatronHasTooManyPerm => $has_other_permissions,
415 if ( C4::Context->preference('EnablePayPalOpacPayments') ) {
416 $template->param( paypal_enabled => 1 );
419 # Test YAML system preferences
420 # FIXME: This is list of current YAML formatted prefs, should by type of preference
422 "UpdateNotForLoanStatusOnCheckin",
424 "BibtexExportAdditionalFields",
425 "RisExportAdditionalFields",
426 "UpdateItemWhenLostFromHoldList",
428 "MarcItemFieldsToOrder",
429 "UpdateitemLocationOnCheckin",
433 foreach my $syspref (@yaml_prefs) {
434 my $yaml = C4::Context->preference( $syspref );
436 eval { YAML::Load( "$yaml\n\n" ); };
438 push @bad_yaml_prefs, $syspref;
442 $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
445 my $dbh = C4::Context->dbh;
446 my $patrons = $dbh->selectall_arrayref(
447 q|select b.borrowernumber from borrowers b join deletedborrowers db on b.borrowernumber=db.borrowernumber|,
450 my $biblios = $dbh->selectall_arrayref(
451 q|select b.biblionumber from biblio b join deletedbiblio db on b.biblionumber=db.biblionumber|,
454 my $items = $dbh->selectall_arrayref(
455 q|select i.itemnumber from items i join deleteditems di on i.itemnumber=di.itemnumber|,
458 my $checkouts = $dbh->selectall_arrayref(
459 q|select i.issue_id from issues i join old_issues oi on i.issue_id=oi.issue_id|,
462 my $holds = $dbh->selectall_arrayref(
463 q|select r.reserve_id from reserves r join old_reserves o on r.reserve_id=o.reserve_id|,
466 if ( @$patrons or @$biblios or @$items or @$checkouts or @$holds ) {
469 ai_patrons => $patrons,
470 ai_biblios => $biblios,
472 ai_checkouts => $checkouts,
480 my $dbh = C4::Context->dbh;
481 my $units = Koha::CirculationRules->search({ rule_name => 'lengthunit', rule_value => { -not_in => ['days', 'hours'] } });
483 if ( $units->count ) {
485 warnIssuingRules => 1,
491 # Guarantor relationships warnings
493 my $dbh = C4::Context->dbh;
494 my ($bad_relationships_count) = $dbh->selectall_arrayref(q{
497 SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data'
499 SELECT relationship FROM borrowers WHERE relationship='_bad_data') a
502 $bad_relationships_count = $bad_relationships_count->[0]->[0];
504 my $existing_relationships = $dbh->selectall_arrayref(q{
505 SELECT DISTINCT(relationship)
507 SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL
509 SELECT relationship FROM borrowers WHERE relationship IS NOT NULL) a
512 my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') );
513 $valid_relationships{ _bad_data } = 1; # we handle this case in another way
515 my $wrong_relationships = [ grep { !$valid_relationships{ $_->[0] } } @{$existing_relationships} ];
516 if ( @$wrong_relationships or $bad_relationships_count ) {
519 warnRelationships => 1,
522 if ( $wrong_relationships ) {
524 wrong_relationships => $wrong_relationships
527 if ($bad_relationships_count) {
529 bad_relationships_count => $bad_relationships_count,
536 # Test 'bcrypt_settings' config for Pseudonymization
537 $template->param( config_bcrypt_settings_no_set => 1 )
538 if C4::Context->preference('Pseudonymization')
539 and not C4::Context->config('bcrypt_settings');
543 my @frameworkcodes = Koha::BiblioFrameworks->search->get_column('frameworkcode');
544 my @hidden_biblionumbers;
545 push @frameworkcodes, ""; # it's not in the biblio_frameworks table!
546 for my $frameworkcode ( @frameworkcodes ) {
547 my $shouldhidemarc_opac = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
549 frameworkcode => $frameworkcode,
553 push @hidden_biblionumbers, { frameworkcode => $frameworkcode, interface => 'opac' }
554 if $shouldhidemarc_opac->{biblionumber};
556 my $shouldhidemarc_intranet = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
558 frameworkcode => $frameworkcode,
559 interface => "intranet"
562 push @hidden_biblionumbers, { frameworkcode => $frameworkcode, interface => 'intranet' }
563 if $shouldhidemarc_intranet->{biblionumber};
565 $template->param( warnHiddenBiblionumbers => \@hidden_biblionumbers );
569 # BackgroundJob - test connection to message broker
571 Koha::BackgroundJob->connect;
575 $template->param( warnConnectBroker => $@ );
579 my %versions = C4::Context::get_versions();
582 kohaVersion => $versions{'kohaVersion'},
583 osVersion => $versions{'osVersion'},
584 perlPath => $perl_path,
585 perlVersion => $versions{'perlVersion'},
586 perlIncPath => [ map { perlinc => $_ }, @INC ],
587 mysqlVersion => $versions{'mysqlVersion'},
588 apacheVersion => $versions{'apacheVersion'},
589 zebraVersion => $zebraVersion,
590 prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities,
591 prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
592 warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
593 warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
594 warnPrefAnonymousPatronOPACPrivacy => $warnPrefAnonymousPatronOPACPrivacy,
595 warnPrefAnonymousPatronAnonSuggestions => $warnPrefAnonymousPatronAnonSuggestions,
596 warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist => $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist,
597 warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist => $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist,
598 warnPrefKohaAdminEmailAddress => $warnPrefKohaAdminEmailAddress,
599 warnPrefOpacHiddenItems => $warnPrefOpacHiddenItems,
600 errZebraConnection => $errZebraConnection,
601 warnIsRootUser => $warnIsRootUser,
602 warnNoActiveCurrency => $warnNoActiveCurrency,
603 warnNoTemplateCaching => ( C4::Context->config('template_cache_dir') ? 0 : 1 ),
604 xml_config_warnings => \@xml_config_warnings,
605 warnStatisticsFieldsError => $warnStatisticsFieldsError,
610 my $perl_modules = C4::Installer::PerlModules->new;
611 $perl_modules->versions_info;
613 my @pm_types = qw(missing_pm upgrade_pm current_pm);
615 foreach my $pm_type(@pm_types) {
616 my $modules = $perl_modules->get_attr($pm_type);
617 foreach (@$modules) {
618 my ($module, $stats) = each %$_;
623 version => $stats->{'cur_ver'},
624 missing => ($pm_type eq 'missing_pm' ? 1 : 0),
625 upgrade => ($pm_type eq 'upgrade_pm' ? 1 : 0),
626 current => ($pm_type eq 'current_pm' ? 1 : 0),
627 require => $stats->{'required'},
628 reqversion => $stats->{'min_ver'},
629 maxversion => $stats->{'max_ver'},
630 excversion => $stats->{'exc_ver'}
636 @components = sort {$a->{'name'} cmp $b->{'name'}} @components;
641 foreach (@components) {
643 unless (++$counter % 4) {
644 push (@$table, {row => $row});
648 # Processing the last line (if there are any modules left)
649 if (scalar(@$row) > 0) {
650 # Extending $row to the table size
652 # Pushing the last line
653 push (@$table, {row => $row});
657 $template->param( table => $table );
660 ## ------------------------------------------
661 ## Koha contributions
663 if ( defined C4::Context->config('docdir') ) {
664 $docdir = C4::Context->config('docdir');
666 # if no <docdir> is defined in koha-conf.xml, use the default location
667 # this is a work-around to stop breakage on upgraded Kohas, bug 8911
668 $docdir = C4::Context->config('intranetdir') . '/docs';
673 -e "$docdir" . "/teams.yaml"
674 ? LoadFile( "$docdir" . "/teams.yaml" )
676 my $dev_team = (sort {$b <=> $a} (keys %{$teams->{team}}))[0];
677 my $short_version = substr($versions{'kohaVersion'},0,5);
678 my $minor = substr($versions{'kohaVersion'},3,2);
679 my $development_version = ( $minor eq '05' || $minor eq '11' ) ? 0 : 1;
680 $template->param( short_version => $short_version );
681 $template->param( development_version => $development_version );
685 -e "$docdir" . "/contributors.yaml"
686 ? LoadFile( "$docdir" . "/contributors.yaml" )
688 for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) {
689 for my $role ( keys %{ $teams->{team}->{$version} } ) {
690 my $normalized_role = "$role";
691 $normalized_role =~ s/s$//;
692 if ( ref( $teams->{team}->{$version}->{$role} ) eq 'ARRAY' ) {
693 for my $contributor ( @{ $teams->{team}->{$version}->{$role} } ) {
694 my $name = $contributor->{name};
695 # Add role to contributors
696 push @{ $contributors->{$name}->{roles}->{$normalized_role} },
698 # Add openhub to teams
699 if ( exists( $contributors->{$name}->{openhub} ) ) {
700 $contributor->{openhub} = $contributors->{$name}->{openhub};
704 elsif ( $role ne 'release_date' ) {
705 my $name = $teams->{team}->{$version}->{$role}->{name};
706 # Add role to contributors
707 push @{ $contributors->{$name}->{roles}->{$normalized_role} },
709 # Add openhub to teams
710 if ( exists( $contributors->{$name}->{openhub} ) ) {
711 $teams->{team}->{$version}->{$role}->{openhub} =
712 $contributors->{$name}->{openhub};
716 $teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role});
721 ## Create last name ordered array of people from contributors
723 { name => $_, ( $contributors->{$_} ? %{ $contributors->{$_} } : () ) }
725 my ($alast) = ( split( /\s/, $a ) )[-1];
726 my ($blast) = ( split( /\s/, $b ) )[-1];
727 lc($alast) cmp lc($blast)
728 } keys %{$contributors};
730 $template->param( contributors => \@people );
731 $template->param( maintenance_team => $teams->{team}->{$dev_team} );
732 $template->param( release_team => $teams->{team}->{$short_version} );
735 if ( open( my $file, "<:encoding(UTF-8)", "$docdir" . "/history.txt" ) ) {
745 shift @lines; #remove header row
748 my ( $epoch, $date, $desc, $tag ) = split(/\t/);
749 if(!$desc && $date=~ /(?<=\d{4})\s+/) {
750 ($date, $desc)= ($`, $');
762 #foreach my $row2 (@rows2) {
765 push( @$table2, { row2 => $row2 } );
769 $template->param( table2 => $table2 );
771 $template->param( timeline_read_error => 1 );
774 output_html_with_http_headers $query, $cookie, $template->output;