LP#1545178: remove two unused methods
authorGalen Charlton <gmc@esilibrary.com>
Fri, 12 Feb 2016 22:10:25 +0000 (17:10 -0500)
committerBen Shum <ben@evergreener.net>
Wed, 24 Feb 2016 04:00:04 +0000 (23:00 -0500)
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 <gmc@esilibrary.com>
Signed-off-by: Ben Shum <ben@evergreener.net>
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
docs/RELEASE_NOTES_NEXT/Development/remove_unused_methods.adoc [new file with mode: 0644]

index d752589..e5b4316 100644 (file)
@@ -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 (file)
index 0000000..945b93d
--- /dev/null
@@ -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`
+