[open-ils-commits] r7694 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 16 17:02:36 EDT 2007
Author: erickson
Date: 2007-08-16 16:58:30 -0400 (Thu, 16 Aug 2007)
New Revision: 7694
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Log:
svn merge -r7692:7693 svn://svn.open-ils.org/ILS/trunk/
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2007-08-16 20:54:25 UTC (rev 7693)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2007-08-16 20:58:30 UTC (rev 7694)
@@ -467,26 +467,20 @@
);
sub set_circ_due_date {
- my( $s, $c, $authtoken, $circid, $date ) = @_;
- my ($circ, $evt) = $U->fetch_circulation($circid);
- return $evt if $evt;
+ my( $self, $conn, $auth, $circ_id, $date ) = @_;
- my $reqr;
- ($reqr, $evt) = $U->checkses($authtoken);
- return $evt if $evt;
+ my $e = new_editor(xact=>1, authtoken=>$auth);
+ return $e->die_event unless $e->checkauth;
+ my $circ = $e->retrieve_action_circulation($circ_id)
+ or return $e->die_event;
- $evt = $U->check_perms($reqr->id, $circ->circ_lib, 'CIRC_OVERRIDE_DUE_DATE');
- return $evt if $evt;
-
+ return $e->die_event unless $e->allowed('CIRC_OVERRIDE_DUE_DATE', $circ->circ_lib);
$date = clense_ISO8601($date);
- $logger->activity("user ".$reqr->id.
- " updating due_date on circ $circid: $date");
-
$circ->due_date($date);
- my $stat = $U->storagereq(
- 'open-ils.storage.direct.action.circulation.update', $circ);
- return $U->DB_UPDATE_FAILED unless defined $stat;
- return $stat;
+ $e->update_action_circulation($circ) or return $e->die_event;
+ $e->commit;
+
+ return $circ->id;
}
More information about the open-ils-commits
mailing list