audio_recordings.pm: active audio uploads
If audio files become inactive because a new file is uploaded, the new file is marked as active and the old file is marked as not active. This allows fastly querying events and their active upload file. Before this change all event's audio files were found and needed to be filtered afterwards to get a set of unique events.
This commit is contained in:
@@ -1148,7 +1148,7 @@ sub get_query($$$) {
|
||||
|
||||
# add recordings table
|
||||
if ( $params->{recordings} eq '1' ) {
|
||||
$query .= "\n left join calcms_audio_recordings ar on e.id=ar.event_id";
|
||||
$query .= "\n left join calcms_audio_recordings ar on e.id=ar.event_id and ar.active=1";
|
||||
}
|
||||
|
||||
if ( scalar @$where_cond > 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user