Revision 724

Date:
2018/09/26 13:44:05
Author:
ahitrov
Revision Log:
One more hotfix

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/lib/Contenido/Object.pm

     
    315 315 #надо использовать все extra поля кроме тех что находятся в virtual_fields списке
    316 316 if ($state->db_encode_data) {
    317 317 return Encode::decode('utf-8', $json_n->encode ({map { $_=> Encode::decode($state->db_encode_data, $self->{$_}, Encode::FB_HTMLCREF) } grep { !$virtual_fields->{$_} && (defined $self->{$_}) } @$extra_fields}));
    318 } elsif ( $DBD::Pg::VERSION >= '3' && $] < '5.026' ) {
    319 return Encode::decode('utf-8', $json_n->encode ({map { $_=>$self->{$_} } grep { !$virtual_fields->{$_} && (defined $self->{$_}) } @$extra_fields}));
    318 320 } else {
    319 my $content = Encode::decode('utf-8', $json_n->encode ({map { $_=>$self->{$_} } grep { !$virtual_fields->{$_} && (defined $self->{$_}) } @$extra_fields}));
    321 my $content = $json_n->encode ({map { $_=>$self->{$_} } grep { !$virtual_fields->{$_} && (defined $self->{$_}) } @$extra_fields});
    320 322 return $content;
    321 323 }
    322 324 } else {
     
    543 545 if ($state->db_encode_data) {
    544 546 push @values, Encode::decode($state->db_encode_data, $value, Encode::FB_HTMLCREF);
    545 547 } elsif ($DBD::Pg::VERSION >= '3' && $] < '5.026') {
    548 warn "Decode for ".$DBD::Pg::VERSION." and $]\n";
    546 549 push @values, Encode::decode('utf-8', $value, Encode::FB_HTMLCREF);
    547 550 } else {
    548 551 push @values, $value;
     
    581 584 foreach (@binary_fields) {
    582 585 $sth->bind_param($_, undef, {pg_type => DBD::Pg::PG_BYTEA});
    583 586 }
    587 warn Data::Dumper::Dumper(\@values) if $DEBUG;
    584 588 unless ($sth->execute(@values, $self->{id})) {
    585 589 $log->error("DBI execute error on $sql\n".Data::Dumper::Dumper( $DBD::Pg::VERSION >= '3' ? Data::Recursive::Encode->encode_utf8( \@values ) : \@values ));
    586 590 $sth->finish();