Issue with uploading attachments fixed

Uploading an attachment would fail while trying to set the event to
unpublished. Fixed.
pull/63/head
Andras Iklody 2013-01-28 15:51:54 +01:00
parent 2d6d806cca
commit cd78baeb14
1 changed files with 1 additions and 2 deletions

View File

@ -182,7 +182,6 @@ class AttributesController extends AppController {
//debug(CakeSession::read('Message.flash'));
// debug(tru);
}
}
// we added all the attributes,
if ($fails) {
@ -337,8 +336,8 @@ class AttributesController extends AppController {
*/
public function add_attachment($eventId = null) {
if ($this->request->is('post')) {
$this->loadModel('Event');
// only own attributes verified by isAuthorized
// Check if there were problems with the file upload
// only keep the last part of the filename, this should prevent directory attacks
$filename = basename($this->request->data['Attribute']['value']['name']);