mirror of https://github.com/MISP/MISP
chg: [internal] Remove unused method Tag::findEventTags
parent
4ddab29b7d
commit
962929dcbd
|
@ -386,25 +386,6 @@ class Tag extends AppModel
|
|||
return $existingTag['Tag']['id'];
|
||||
}
|
||||
|
||||
// find all tags that belong to a given eventId
|
||||
public function findEventTags($eventId)
|
||||
{
|
||||
$tags = array();
|
||||
$params = array(
|
||||
'recursive' => 1,
|
||||
'contain' => 'EventTag',
|
||||
);
|
||||
$result = $this->find('all', $params);
|
||||
foreach ($result as $tag) {
|
||||
foreach ($tag['EventTag'] as $eventTag) {
|
||||
if ($eventTag['event_id'] == $eventId) {
|
||||
$tags[] = $tag['Tag'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $tags;
|
||||
}
|
||||
|
||||
public function random_color()
|
||||
{
|
||||
$colour = '#';
|
||||
|
|
Loading…
Reference in New Issue