Bugzilla – Attachment 44857 Details for
Bug 15185
3 subroutines are unused in C4::Circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 15185: Remove Check*Holidays subroutines in C4::Circulation
SIGNED-OFFBug-15185-Remove-CheckHolidays-subroutin.patch (text/plain), 3.16 KB, created by
Héctor Eduardo Castro Avalos
on 2015-11-13 19:02:08 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15185: Remove Check*Holidays subroutines in C4::Circulation
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2015-11-13 19:02:08 UTC
Size:
3.16 KB
patch
obsolete
>From 59d699382122f55a414d121622e97b71b509bf20 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 13 Nov 2015 11:43:36 +0000 >Subject: [PATCH] [SIGNED-OFF]Bug 15185: Remove Check*Holidays subroutines in > C4::Circulation > >These 3 subroutines are not used anymore: >- CheckRepeatableHolidays >- CheckSpecialHolidays >- CheckRepeatableSpecialHolidays > >Moreover we have subroutines in Koha::Calendar to do this job. > >Test plan: > git grep CheckRepeatableHolidays > git grep CheckSpecialHolidays > git grep CheckRepeatableSpecialHolidays >should not return any results. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Subroutines removed >--- > C4/Circulation.pm | 86 ----------------------------------------------------- > 1 file changed, 86 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 18cc9d5..e75ec5e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3531,92 +3531,6 @@ sub CalcDateDue { > } > > >-=head2 CheckRepeatableHolidays >- >- $countrepeatable = CheckRepeatableHoliday($itemnumber,$week_day,$branchcode); >- >-This function checks if the date due is a repeatable holiday >- >-C<$date_due> = returndate calculate with no day check >-C<$itemnumber> = itemnumber >-C<$branchcode> = localisation of issue >- >-=cut >- >-sub CheckRepeatableHolidays{ >-my($itemnumber,$week_day,$branchcode)=@_; >-my $dbh = C4::Context->dbh; >-my $query = qq|SELECT count(*) >- FROM repeatable_holidays >- WHERE branchcode=? >- AND weekday=?|; >-my $sth = $dbh->prepare($query); >-$sth->execute($branchcode,$week_day); >-my $result=$sth->fetchrow; >-return $result; >-} >- >- >-=head2 CheckSpecialHolidays >- >- $countspecial = CheckSpecialHolidays($years,$month,$day,$itemnumber,$branchcode); >- >-This function check if the date is a special holiday >- >-C<$years> = the years of datedue >-C<$month> = the month of datedue >-C<$day> = the day of datedue >-C<$itemnumber> = itemnumber >-C<$branchcode> = localisation of issue >- >-=cut >- >-sub CheckSpecialHolidays{ >-my ($years,$month,$day,$itemnumber,$branchcode) = @_; >-my $dbh = C4::Context->dbh; >-my $query=qq|SELECT count(*) >- FROM `special_holidays` >- WHERE year=? >- AND month=? >- AND day=? >- AND branchcode=? >- |; >-my $sth = $dbh->prepare($query); >-$sth->execute($years,$month,$day,$branchcode); >-my $countspecial=$sth->fetchrow ; >-return $countspecial; >-} >- >-=head2 CheckRepeatableSpecialHolidays >- >- $countspecial = CheckRepeatableSpecialHolidays($month,$day,$itemnumber,$branchcode); >- >-This function check if the date is a repeatble special holidays >- >-C<$month> = the month of datedue >-C<$day> = the day of datedue >-C<$itemnumber> = itemnumber >-C<$branchcode> = localisation of issue >- >-=cut >- >-sub CheckRepeatableSpecialHolidays{ >-my ($month,$day,$itemnumber,$branchcode) = @_; >-my $dbh = C4::Context->dbh; >-my $query=qq|SELECT count(*) >- FROM `repeatable_holidays` >- WHERE month=? >- AND day=? >- AND branchcode=? >- |; >-my $sth = $dbh->prepare($query); >-$sth->execute($month,$day,$branchcode); >-my $countspecial=$sth->fetchrow ; >-return $countspecial; >-} >- >- >- > sub CheckValidBarcode{ > my ($barcode) = @_; > my $dbh = C4::Context->dbh; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15185
:
44836
|
44857
|
44870