[open-ils-commits] r8975 - trunk/Open-ILS/src/perlmods/OpenILS/Application

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 11 15:26:06 EDT 2008


Author: miker
Date: 2008-03-11 14:52:51 -0400 (Tue, 11 Mar 2008)
New Revision: 8975

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm
Log:
split on pipes, not between every character; also, commit after an update

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm	2008-03-11 18:34:54 UTC (rev 8974)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm	2008-03-11 18:52:51 UTC (rev 8975)
@@ -124,7 +124,7 @@
     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 @@
             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 @@
                             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 @@
 
     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 {



More information about the open-ils-commits mailing list