From: Galen Charlton Date: Fri, 12 Feb 2016 22:10:25 +0000 (-0500) Subject: LP#1545178: remove two unused methods X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fgmcharlt%2Flp1545178_remove_unused_closed_date_methods;p=working%2FEvergreen.git 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 --- 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 @@ -2746,64 +2746,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', signature => { 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` +