← Index
Performance Profile   « block view • line view • sub view »
For opac/opac-main.pl
  Run on Thu Jul 17 22:22:09 2008
Reported on Thu Jul 17 22:22:21 2008

Fileopac/opac-main.pl
Statements Executed12
Total Time0.000429 seconds

Subroutines — ordered by inclusive time then name
CallsInclusive
Time
Subroutine
00main::BEGIN

LineStmts.Exclusive
Time
Avg.Code
110.000210.00021#!/usr/bin/perl
2
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
18
19use strict;
2013e-063e-06require Exporter;
21use CGI;
22use C4::Auth; # get_template_and_user
23use C4::Output;
24use C4::VirtualShelves;
25use C4::Branch; # GetBranches
26use C4::Members; # GetMember
27use C4::NewsChannels; # get_opac_news
28use C4::Acquisition; # GetRecentAcqui
29
3010.000040.00004my $input = new CGI;
# spent 0.00700s making 1 calls to CGI::new
3110.000010.00001my $dbh = C4::Context->dbh;
# spent 0.00030s making 1 calls to C4::Context::dbh
32
3310.000020.00002my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
# spent 0.12511s making 1 calls to C4::Auth::get_template_and_user
34 {
35 template_name => "opac-main.tmpl",
36 type => "opac",
37 query => $input,
38 authnotrequired => 1,
39 flagsrequired => { borrow => 1 },
40 }
41);
42
4310.000010.00001my $borrower = GetMember( $borrowernumber, 'borrowernumber' );
# spent 0.00044s making 1 calls to C4::Members::GetMember
4410.000010.00001$template->param(
# spent 0.00002s making 1 calls to HTML::Template::Pro::param
45 textmessaging => $borrower->{textmessaging},
46);
47
48# display news
49# use cookie setting for language, bug default to syspref if it's not set
5019e-069e-06my $news_lang = $input->cookie('KohaOpacLanguage') || 'en';
# spent 0.00008s making 1 calls to CGI::cookie
5119e-069e-06my $all_koha_news = &GetNewsToDisplay($news_lang);
# spent 0.00138s making 1 calls to C4::NewsChannels::GetNewsToDisplay
5211e-061e-06my $koha_news_count = scalar @$all_koha_news;
53
5418e-068e-06$template->param(
# spent 0.00003s making 1 calls to HTML::Template::Pro::param
55 koha_news => $all_koha_news,
56 koha_news_count => $koha_news_count
57);
58
5910.000090.00009output_html_with_http_headers $input, $cookie, $template->output;
# spent 0.00634s making 1 calls to C4::Output::output_html_with_http_headers # spent 0.00266s making 1 calls to HTML::Template::Pro::output