Merge branch 'weekend_fixes' into 2.4

pull/3816/head
iglocska 2018-10-28 14:28:08 +01:00
commit d652927261
2 changed files with 6 additions and 2 deletions

View File

@ -751,7 +751,7 @@ class ServersController extends AppController
}
$file = new File($server['Server'][$subm]['name']);
$ext = $file->ext();
if (($ext != 'pem') || !$server['Server'][$subm]['size'] > 0) {
if (!$server['Server'][$subm]['size'] > 0) {
$this->Flash->error('Incorrect extension or empty file.');
$this->redirect(array('action' => 'index'));
}

View File

@ -4385,7 +4385,11 @@ class Event extends AppModel
if (!empty($object['data'])) {
$object['image'] = $object['data'];
} else {
$object['image'] = $this->Attribute->base64EncodeAttachment($object);
if ($object['objectType'] === 'proposal') {
$object['image'] = $this->ShadowAttribute->base64EncodeAttachment($object);
} else {
$object['image'] = $this->Attribute->base64EncodeAttachment($object);
}
}
}
if (isset($object['distribution']) && $object['distribution'] != 4) {