View | Details | Raw Unified | Return to bug 35597
Collapse All | Expand All

(-)a/C4/Suggestions.pm (-3 / +1 lines)
Lines 294-302 sub ModSuggestion { Link Here
294
            ) or warn "can't enqueue letter $letter";
294
            ) or warn "can't enqueue letter $letter";
295
        }
295
        }
296
    }
296
    }
297
    if ( C4::Context->preference("SuggestionsLog") ) {
297
298
        logaction( 'SUGGESTION', 'MODIFY', $suggestion->{suggestionid}, $suggestion_object );
299
    }
300
    return 1;    # No useful if the exception is raised earlier
298
    return 1;    # No useful if the exception is raised earlier
301
}
299
}
302
300
(-)a/Koha/Suggestion.pm (-5 / +7 lines)
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
- 

Return to bug 35597