Skip to content
Snippets Groups Projects
Commit 55ac7bcb authored by Raman Arora's avatar Raman Arora
Browse files

Merge branch 'release-4.7.0' of https://github.com/sleuthkit/sleuthkit into...

Merge branch 'release-4.7.0' of https://github.com/sleuthkit/sleuthkit into 5664-contact-account-type
parents 06b86507 79d1b57e
Branches
Tags
No related merge requests found
...@@ -323,11 +323,11 @@ EventTypeHierarchyLevel.event=Event ...@@ -323,11 +323,11 @@ EventTypeHierarchyLevel.event=Event
DataSourcesFilter.displayName.text=Data Source DataSourcesFilter.displayName.text=Data Source
DescriptionFilter.mode.exclude=Exclude DescriptionFilter.mode.exclude=Exclude
DescriptionFilter.mode.include=Include DescriptionFilter.mode.include=Include
hashHitsFilter.displayName.text=Hash Sets hashHitsFilter.displayName.text=Hash Hits Only
hideKnownFilter.displayName.text=Hide Known Files hideKnownFilter.displayName.text=Hide Known Files
# {0} - sub filter displaynames # {0} - sub filter displaynames
IntersectionFilter.displayName.text=Intersection IntersectionFilter.displayName.text=Intersection
tagsFilter.displayName.text=Tagged Items tagsFilter.displayName.text=Tagged Items Only
TextFilter.displayName.text=Text Filter TextFilter.displayName.text=Text Filter
TypeFilter.displayName.text=Event Type TypeFilter.displayName.text=Event Type
FileTypesFilter.displayName.text=File Types FileTypesFilter.displayName.text=File Types
\ No newline at end of file
...@@ -805,6 +805,10 @@ public Set<Long> updateEventsForArtifactTagDeleted(BlackboardArtifact artifact) ...@@ -805,6 +805,10 @@ public Set<Long> updateEventsForArtifactTagDeleted(BlackboardArtifact artifact)
} }
private void updateEventSourceTaggedFlag(CaseDbConnection conn, Collection<Long> eventDescriptionIDs, int flagValue) throws TskCoreException { private void updateEventSourceTaggedFlag(CaseDbConnection conn, Collection<Long> eventDescriptionIDs, int flagValue) throws TskCoreException {
if (eventDescriptionIDs.isEmpty()) {
return;
}
String sql = "UPDATE tsk_event_descriptions SET tagged = " + flagValue + " WHERE event_description_id IN (" + buildCSVString(eventDescriptionIDs) + ")"; //NON-NLS String sql = "UPDATE tsk_event_descriptions SET tagged = " + flagValue + " WHERE event_description_id IN (" + buildCSVString(eventDescriptionIDs) + ")"; //NON-NLS
try (Statement updateStatement = conn.createStatement()) { try (Statement updateStatement = conn.createStatement()) {
updateStatement.executeUpdate(sql); updateStatement.executeUpdate(sql);
...@@ -831,12 +835,16 @@ public Set<Long> updateEventsForHashSetHit(Content content) throws TskCoreExcept ...@@ -831,12 +835,16 @@ public Set<Long> updateEventsForHashSetHit(Content content) throws TskCoreExcept
caseDB.acquireSingleUserCaseWriteLock(); caseDB.acquireSingleUserCaseWriteLock();
try (CaseDbConnection con = caseDB.getConnection(); Statement updateStatement = con.createStatement();) { try (CaseDbConnection con = caseDB.getConnection(); Statement updateStatement = con.createStatement();) {
Map<Long, Long> eventIDs = getEventAndDescriptionIDs(con, content.getId(), true); Map<Long, Long> eventIDs = getEventAndDescriptionIDs(con, content.getId(), true);
String sql = "UPDATE tsk_event_descriptions SET hash_hit = 1" + " WHERE event_description_id IN (" + buildCSVString(eventIDs.values()) + ")"; //NON-NLS if (! eventIDs.isEmpty()) {
try { String sql = "UPDATE tsk_event_descriptions SET hash_hit = 1" + " WHERE event_description_id IN (" + buildCSVString(eventIDs.values()) + ")"; //NON-NLS
updateStatement.executeUpdate(sql); //NON-NLS try {
updateStatement.executeUpdate(sql); //NON-NLS
return eventIDs.keySet();
} catch (SQLException ex) {
throw new TskCoreException("Error setting hash_hit of events.", ex);//NON-NLS
}
} else {
return eventIDs.keySet(); return eventIDs.keySet();
} catch (SQLException ex) {
throw new TskCoreException("Error setting hash_hit of events.", ex);//NON-NLS
} }
} catch (SQLException ex) { } catch (SQLException ex) {
throw new TskCoreException("Error setting hash_hit of events.", ex);//NON-NLS throw new TskCoreException("Error setting hash_hit of events.", ex);//NON-NLS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment