From 052fe274dba50b98334e8aa8f4aed4db22bbd003 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 11 Mar 2008 18:52:51 +0000 Subject: [PATCH] split on pipes, not between every character; also, commit after an update git-svn-id: svn://svn.open-ils.org/ILS/trunk@8975 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm b/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm index 30342f6655..e19d707004 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm @@ -124,7 +124,7 @@ sub CRUD_action_object_permcheck { my $perm_field_value = $action_node->getAttribute('permission'); if ($perm_field_value) { - my @perms = split '|', $action_node->getAttribute('permission'); + my @perms = split '\|', $action_node->getAttribute('permission'); my @context_ous; if ($action_node->getAttribute('global_required')) { @@ -134,7 +134,7 @@ sub CRUD_action_object_permcheck { my $context_field_value = $action_node->getAttribute('context_field'); if ($context_field_value) { - push @context_ous, $obj->$_ for ( split '|', $context_field_value ); + push @context_ous, $obj->$_ for ( split '\|', $context_field_value ); } else { for my $context_node ( $xpc->findnodes( "perm:context", $action_node ) ) { my $context_field = $context_node->getAttribute('field'); @@ -154,7 +154,7 @@ sub CRUD_action_object_permcheck { push @context_ous, $remote_object->$context_field; } } else { - push @context_ous, $obj->$_ for ( split '|', $context_field ); + push @context_ous, $obj->$_ for ( split '\|', $context_field ); } } } @@ -184,7 +184,9 @@ sub CRUD_action_object_permcheck { return $obj if ($self->{action} eq 'retrieve'); - return $e->session->request("open-ils.cstore.direct.$o_type.$self->{action}" => $obj )->gather(1); + my $val = $e->session->request("open-ils.cstore.direct.$o_type.$self->{action}" => $obj )->gather(1); + + $e->commit; } sub search_permacrud { -- 2.43.2