ranged non-cat types; depth aware full-path (my_orgs)
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Publisher / actor.pm
index 738649c..8225898 100644 (file)
@@ -257,13 +257,15 @@ sub org_unit_full_path {
        my $self = shift;
        my $client = shift;
        my $id = shift;
+       my $depth = shift;
 
        return undef unless ($id);
 
        my $func = 'actor.org_unit_full_path(?)';
+       my $func = 'actor.org_unit_full_path(?,?)' if defined($depth);
 
        my $sth = actor::org_unit->db_Main->prepare_cached("SELECT * FROM $func");
-       $sth->execute(''.$id);
+       $sth->execute($id, $depth);
 
        $client->respond( $_->to_fieldmapper ) for ( map { actor::org_unit->construct($_) } $sth->fetchall_hash );