[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5900: GetAllIssues performance issues

Chris Nighswonger cnighswonger at foundations.edu
Tue Apr 5 02:02:04 CEST 2011


This patch does not apply cleanly to 3.2.x. If it should apply, please fixup
and resubmit with [3.2.x] in the subject line.

Kind Regards,
Chris


On Sat, Mar 26, 2011 at 10:53 AM, Nicole C. Engard <
nengard at bywatersolutions.com> wrote:

> From: Jared Camins-Esakov <jcamins at bywatersolutions.com>
>
> Previously GetAllIssues was called before authenticating. Given how
> expensive
> GetAllIssues is, this is problematic and could be used for used for DOSing
> the
> server. There should be no functional change from this patch.
>
> Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
> ---
>  members/readingrec.pl |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/members/readingrec.pl b/members/readingrec.pl
> index f7631db..3ee6a8f 100755
> --- a/members/readingrec.pl
> +++ b/members/readingrec.pl
> @@ -40,6 +40,14 @@ my $data = undef;
>  my $borrowernumber = undef;
>  my $cardnumber = undef;
>
> +my ($template, $loggedinuser, $cookie)=
> get_template_and_user({template_name => "members/readingrec.tmpl",
> +                               query => $input,
> +                               type => "intranet",
> +                               authnotrequired => 0,
> +                               flagsrequired => {borrowers => 1},
> +                               debug => 1,
> +                               });
> +
>  if ($input->param('cardnumber')) {
>     $cardnumber = $input->param('cardnumber');
>     $data = GetMember(cardnumber => $cardnumber);
> @@ -54,14 +62,6 @@ my $order = 'date_due desc';
>  my $limit = 0;
>  my ( $issues ) = GetAllIssues($borrowernumber,$order,$limit);
>
> -my ($template, $loggedinuser, $cookie)=
> get_template_and_user({template_name => "members/readingrec.tmpl",
> -                               query => $input,
> -                               type => "intranet",
> -                               authnotrequired => 0,
> -                               flagsrequired => {borrowers => 1},
> -                               debug => 1,
> -                               });
> -
>  my @loop_reading;
>
>  foreach my $issue (@{$issues}){
> --
> 1.7.2.3
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20110404/e945f2e8/attachment.htm>


More information about the Koha-patches mailing list