Lines 37-43
sub update_translation {
Link Here
|
37 |
$localization->translation( $translation ) |
37 |
$localization->translation( $translation ) |
38 |
} |
38 |
} |
39 |
my %params; |
39 |
my %params; |
|
|
40 |
my $is_changed; |
40 |
if ( $localization->is_changed ) { |
41 |
if ( $localization->is_changed ) { |
|
|
42 |
$is_changed = 1; |
41 |
unless ( Koha::Localizations->search( { entity => $localization->entity, code => $localization->code, lang => $lang, localization_id => { '!=' => $localization->localization_id }, } )->count ) { |
43 |
unless ( Koha::Localizations->search( { entity => $localization->entity, code => $localization->code, lang => $lang, localization_id => { '!=' => $localization->localization_id }, } )->count ) { |
42 |
$localization->store; |
44 |
$localization->store; |
43 |
} else { |
45 |
} else { |
Lines 52-57
sub update_translation {
Link Here
|
52 |
code => Encode::encode('utf-8', $localization->code), |
54 |
code => Encode::encode('utf-8', $localization->code), |
53 |
lang => Encode::encode('utf-8', $localization->lang), |
55 |
lang => Encode::encode('utf-8', $localization->lang), |
54 |
translation => Encode::encode('utf-8', $localization->translation), |
56 |
translation => Encode::encode('utf-8', $localization->translation), |
|
|
57 |
is_changed => $is_changed, |
55 |
); |
58 |
); |
56 |
C4::Service->return_success( $response ); |
59 |
C4::Service->return_success( $response ); |
57 |
} |
60 |
} |
58 |
- |
|
|