Merge branch '2.4' of github.com:MISP/MISP into 2.4

pull/5443/head
Raphaël Vinot 2019-12-02 09:44:25 +01:00
commit a48299078a
2 changed files with 17 additions and 4 deletions

View File

@ -597,8 +597,10 @@ class MispObject extends AppModel
$this->Event->unpublishEvent($eventId);
$objectId = $this->id;
$partialFails = array();
foreach ($object['Object']['Attribute'] as $attribute) {
$this->Attribute->captureAttribute($attribute, $eventId, $user, $objectId, $log);
if (!empty($object['Object']['Attribute'])) {
foreach ($object['Object']['Attribute'] as $attribute) {
$this->Attribute->captureAttribute($attribute, $eventId, $user, $objectId, $log);
}
}
return true;
} else {

View File

@ -9,8 +9,19 @@
'<div class="bold" style="margin-left:8px">%s</div>%s',
h($action),
sprintf(
'<div style="margin-left:16px;"><span class="bold">Total</span>: %s %s</div>',
h($userData['total']),
'<div style="margin-left:16px;"><span class="bold">%s</span>: %s %s</div>',
__('Total'),
sprintf(
'%s Users (%s requests)',
sprintf(
'<span class="bold red">%s</span>',
count($userData) -1
),
sprintf(
'<span class="red">%s</span>',
h($userData['total'])
)
),
sprintf(
'<i class="fas fa-plus-circle" role="button" aria-label="%s" data-toggle="collapse" data-target="#deprecationDetails%s%s"></i>',
__('View details on the usage of %s on the %s controller', h($action), h($controller)),