@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $images = $qb->execute(); |
| 62 | 62 | $failed = 0; |
| 63 | 63 | foreach ($images as $image) { |
| 64 | - if ( !$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter')) |
|
| 64 | + if (!$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter')) |
|
| 65 | 65 | || !$image->generate_image('image', $this->_config->get('image_filter'))) { |
| 66 | 66 | $failed++; |
| 67 | 67 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $attachment->title = $title; |
| 242 | 242 | $attachment->mimetype = $file->getMimeType(); |
| 243 | 243 | $attachment->parentguid = $image->guid; |
| 244 | - if ( !$attachment->create() |
|
| 244 | + if (!$attachment->create() |
|
| 245 | 245 | || !$attachment->copy_from_file($file->getRealPath())) { |
| 246 | 246 | throw new midcom_error('Failed to create attachment: ' . midcom_connection::get_error_string()); |
| 247 | 247 | } |
@@ -129,7 +129,8 @@ |
||
| 129 | 129 | try { |
| 130 | 130 | $this->$function($request->request, $request->files); |
| 131 | 131 | $this->_response->success = true; |
| 132 | - } catch (midcom_error $e) { |
|
| 132 | + } |
|
| 133 | + catch (midcom_error $e) { |
|
| 133 | 134 | $this->_response->success = false; |
| 134 | 135 | $this->_response->error = $e->getMessage(); |
| 135 | 136 | } |