[open-ils-commits] r10928 - in branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application: . Cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 27 17:58:45 EDT 2008
Author: erickson
Date: 2008-10-27 17:58:36 -0400 (Mon, 27 Oct 2008)
New Revision: 10928
Modified:
branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
Log:
more moving of code out to the common packages
Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm 2008-10-27 21:49:26 UTC (rev 10927)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm 2008-10-27 21:58:36 UTC (rev 10928)
@@ -179,7 +179,7 @@
}
return $editor->event unless
- $editor->allowed('UPDATE_COPY', copy_perm_org($vol, $copy));
+ $editor->allowed('UPDATE_COPY', $class->copy_perm_org($vol, $copy));
$copy->editor($editor->requestor->id);
$copy->edit_date('now');
@@ -220,7 +220,7 @@
my($class, $editor, $override, $vol, $copy ) = @_;
return $editor->event unless
- $editor->allowed('DELETE_COPY',copy_perm_org($vol, $copy));
+ $editor->allowed('DELETE_COPY', $class->copy_perm_org($vol, $copy));
my $stat = $U->copy_status($copy->status)->id;
@@ -393,4 +393,12 @@
}
-
+sub copy_perm_org {
+ my($class, $vol, $copy) = @_;
+ my $org = $vol->owning_lib;
+ if( $vol->id == OILS_PRECAT_CALL_NUMBER ) {
+ $org = ref($copy->circ_lib) ? $copy->circ_lib->id : $copy->circ_lib;
+ }
+ $logger->debug("using copy perm org $org");
+ return $org;
+}
Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-10-27 21:49:26 UTC (rev 10927)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-10-27 21:58:36 UTC (rev 10928)
@@ -607,17 +607,6 @@
-sub copy_perm_org {
- my( $vol, $copy ) = @_;
- my $org = $vol->owning_lib;
- if( $vol->id == OILS_PRECAT_CALL_NUMBER ) {
- $org = ref($copy->circ_lib) ? $copy->circ_lib->id : $copy->circ_lib;
- }
- $logger->debug("using copy perm org $org");
- return $org;
-}
-
-
__PACKAGE__->register_method (
method => 'delete_bib_record',
api_name => 'open-ils.cat.biblio.record_entry.delete');
More information about the open-ils-commits
mailing list