From: Dobrica Pavlinusic Date: Thu, 24 Jun 2010 23:26:52 +0000 (+0200) Subject: fix $out generation X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=commitdiff_plain;h=2a4536220b569be9c2c09781fe11973e7bf2f8c0 fix $out generation --- diff --git a/lib/MojoFacets/Data.pm b/lib/MojoFacets/Data.pm index 0560587..ededa58 100644 --- a/lib/MojoFacets/Data.pm +++ b/lib/MojoFacets/Data.pm @@ -549,8 +549,10 @@ sub __all_filters { join(',', sort(@_), 'order', $order); } +our $out; + sub __commit_path_code { - my ( $path, $i, $code, $commit_changed ) = @_; + my ( $path, $i, $code, $commit_changed, $out_ref ) = @_; my $items = $loaded->{$path}->{data}->{items} || die "no items for $path"; my $row = $items->[$i]; @@ -668,12 +670,14 @@ sub items { if ( $commit ) { warn "# commit on ", $#$filtered + 1, " items:\n$code\n"; - my $out; + $out = undef; foreach ( 0 .. $#$filtered ) { my $i = $filtered->[$_]; __commit_path_code( $path, $i, $code, \$commit_changed ); } + warn "out ",dump($out); + $self->_save_change({ path => $path, time => $self->param('time') || time(),