Lines 73-78
sub store {
Link Here
|
73 |
my $new_suggestion = !$self->in_storage; |
73 |
my $new_suggestion = !$self->in_storage; |
74 |
|
74 |
|
75 |
my $result = $self->SUPER::store(); |
75 |
my $result = $self->SUPER::store(); |
|
|
76 |
|
77 |
if ( C4::Context->preference("SuggestionsLog") ) { |
78 |
my $action = $new_suggestion ? 'CREATE' : 'MODIFY'; |
79 |
logaction( 'SUGGESTION', $action, $result->suggestionid, $self ); |
80 |
} |
81 |
|
76 |
if ( $emailpurchasesuggestions && $self->STATUS eq 'ASKED' ) { |
82 |
if ( $emailpurchasesuggestions && $self->STATUS eq 'ASKED' ) { |
77 |
|
83 |
|
78 |
if ( |
84 |
if ( |
Lines 114-123
sub store {
Link Here
|
114 |
) or warn "can't enqueue letter $letter"; |
120 |
) or warn "can't enqueue letter $letter"; |
115 |
} |
121 |
} |
116 |
} |
122 |
} |
117 |
my $suggestion_object = Koha::Suggestions->find( $result->suggestionid ); |
123 |
|
118 |
if ( $new_suggestion && C4::Context->preference("SuggestionsLog") ) { |
|
|
119 |
logaction( 'SUGGESTION', 'CREATE', $result->suggestionid, $suggestion_object ); |
120 |
} |
121 |
return $result; |
124 |
return $result; |
122 |
} |
125 |
} |
123 |
|
126 |
|
124 |
- |
|
|