From 49590f0f0600be28ab28c6f55487c9992993a398 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 12 Feb 2016 17:10:25 -0500 Subject: [PATCH] LP#1545178: remove two unused methods This patch removes two methods that were both broken and not in use: * open-ils.actor.org_unit.closed_date.create * open-ils.actor.org_unit.closed_date.delete To test: [1] This patch has no user-visible impact whatsoever, but to check for regressions, verify the proper functioning of the closed dates editor. Signed-off-by: Galen Charlton Signed-off-by: Ben Shum --- .../perlmods/lib/OpenILS/Application/Actor.pm | 58 ------------------- .../Development/remove_unused_methods.adoc | 8 +++ 2 files changed, 8 insertions(+), 58 deletions(-) create mode 100644 docs/RELEASE_NOTES_NEXT/Development/remove_unused_methods.adoc diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index d752589c19..e5b43162cd 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -2745,64 +2745,6 @@ sub fetch_patron_messages { } -__PACKAGE__->register_method( - method => 'create_closed_date', - api_name => 'open-ils.actor.org_unit.closed_date.create', - signature => q/ - Creates a new closing entry for the given org_unit - @param authtoken The login session key - @param note The closed_date object - / -); -sub create_closed_date { - my( $self, $conn, $authtoken, $cd ) = @_; - - my( $user, $evt ) = $U->checkses($authtoken); - return $evt if $evt; - - $evt = $U->check_perms($user->id, $cd->org_unit, 'CREATE_ORG_UNIT_CLOSING'); - return $evt if $evt; - - $logger->activity("user ".$user->id." creating library closing for ".$cd->org_unit); - - my $id = $U->storagereq( - 'open-ils.storage.direct.actor.org_unit.closed_date.create', $cd ); - return $U->DB_UPDATE_FAILED($cd) unless $id; - return $id; -} - - -__PACKAGE__->register_method( - method => 'delete_closed_date', - api_name => 'open-ils.actor.org_unit.closed_date.delete', - signature => q/ - Deletes a closing entry for the given org_unit - @param authtoken The login session key - @param noteid The close_date id - / -); -sub delete_closed_date { - my( $self, $conn, $authtoken, $cd ) = @_; - - my( $user, $evt ) = $U->checkses($authtoken); - return $evt if $evt; - - my $cd_obj; - ($cd_obj, $evt) = fetch_closed_date($cd); - return $evt if $evt; - - $evt = $U->check_perms($user->id, $cd->org_unit, 'DELETE_ORG_UNIT_CLOSING'); - return $evt if $evt; - - $logger->activity("user ".$user->id." deleting library closing for ".$cd->org_unit); - - my $stat = $U->storagereq( - 'open-ils.storage.direct.actor.org_unit.closed_date.delete', $cd ); - return $U->DB_UPDATE_FAILED($cd) unless $stat; - return $stat; -} - - __PACKAGE__->register_method( method => 'usrname_exists', api_name => 'open-ils.actor.username.exists', diff --git a/docs/RELEASE_NOTES_NEXT/Development/remove_unused_methods.adoc b/docs/RELEASE_NOTES_NEXT/Development/remove_unused_methods.adoc new file mode 100644 index 0000000000..945b93d094 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Development/remove_unused_methods.adoc @@ -0,0 +1,8 @@ +Removal of unused methods +^^^^^^^^^^^^^^^^^^^^^^^^^ +The following public methods, which were both broken and not in use, +are removed: + + * `open-ils.actor.org_unit.closed_date.create` + * `open-ils.actor.org_unit.closed_date.delete` + -- 2.43.2