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 => $localization->code, |
54 |
code => $localization->code, |
53 |
lang => $localization->lang, |
55 |
lang => $localization->lang, |
54 |
translation => $localization->translation, |
56 |
translation => $localization->translation, |
|
|
57 |
is_changed => $is_changed, |
55 |
); |
58 |
); |
56 |
C4::Service->return_success( $response ); |
59 |
C4::Service->return_success( $response ); |
57 |
} |
60 |
} |
58 |
- |
|
|