@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | private function load_controller(org_openpsa_invoices_billing_data_dba $bd) : controller |
| 31 | 31 | { |
| 32 | 32 | $schemadb = schemadb::from_path($this->_config->get('schemadb_billing_data')); |
| 33 | - $vat =& $schemadb->get('default')->get_field('vat'); |
|
| 33 | + $vat = & $schemadb->get('default')->get_field('vat'); |
|
| 34 | 34 | // Fill VAT select |
| 35 | 35 | if ($options = $this->get_vat_options($this->_config->get('vat_percentages'))) { |
| 36 | 36 | $vat['type_config']['options'] = $options; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $data['controller'] = $this->load_controller($bd); |
| 69 | 69 | |
| 70 | 70 | $workflow = $this->get_workflow('datamanager', ['controller' => $data['controller']]); |
| 71 | - if ( $mode == 'edit' |
|
| 71 | + if ($mode == 'edit' |
|
| 72 | 72 | && $bd->can_do('midgard:delete')) { |
| 73 | 73 | $delete = $this->get_workflow('delete', [ |
| 74 | 74 | 'object' => $bd, |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | return; |
| 83 | 83 | } |
| 84 | 84 | $parent = $this->get_parent(); |
| 85 | - if ( $parent |
|
| 85 | + if ($parent |
|
| 86 | 86 | && $parent->component == 'org.openpsa.documents') { |
| 87 | 87 | midcom::get()->auth->request_sudo('org.openpsa.documents'); |
| 88 | 88 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * if nothing matched so far and the subtype is alphanumeric, uppercase it on the theory |
| 175 | 175 | * that it's probably a file extension |
| 176 | 176 | */ |
| 177 | - if ( $st_orig == $subtype |
|
| 177 | + if ($st_orig == $subtype |
|
| 178 | 178 | && preg_match('/^[a-z0-9]+$/', $subtype)) { |
| 179 | 179 | $subtype = strtoupper($subtype); |
| 180 | 180 | } |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $backup_attachment = $backup->create_attachment($original_attachment->name, $original_attachment->title, $original_attachment->mimetype); |
| 214 | 214 | |
| 215 | 215 | $original_handle = $original_attachment->open('r'); |
| 216 | - if ( !$backup_attachment |
|
| 216 | + if (!$backup_attachment |
|
| 217 | 217 | || !$original_handle) { |
| 218 | 218 | // Failed to copy the attachment, abort |
| 219 | 219 | return $backup->delete(); |
@@ -60,7 +60,8 @@ |
||
| 60 | 60 | $guid = $parts[1]; |
| 61 | 61 | try { |
| 62 | 62 | $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
| 63 | - } catch (midcom_error $e) { |
|
| 63 | + } |
|
| 64 | + catch (midcom_error $e) { |
|
| 64 | 65 | $e->log(); |
| 65 | 66 | } |
| 66 | 67 | } |