@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | $config['name'] = $name; |
| 34 | 34 | $field = $this->prepare_field($config); |
| 35 | - if ( isset($config['default']) |
|
| 35 | + if (isset($config['default']) |
|
| 36 | 36 | && (!$this->object->id || $field instanceof transientnode)) { |
| 37 | 37 | $field->set_value($config['default']); |
| 38 | 38 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | private function prepare_field(array $config) |
| 66 | 66 | { |
| 67 | - if ( empty($config['storage']['location']) |
|
| 67 | + if (empty($config['storage']['location']) |
|
| 68 | 68 | // This line is needed because a parameter default is set by the schema parser and then ignored |
| 69 | 69 | // by the type. The things we do for backwards compatibility... |
| 70 | 70 | || $config['storage']['location'] === 'parameter') { |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | private function load_controller(org_openpsa_invoices_billing_data_dba $bd) |
| 31 | 31 | { |
| 32 | 32 | $schemadb = schemadb::from_path($this->_config->get('schemadb_billing_data')); |
| 33 | - $vat =& $schemadb->get('default')->get_field('vat'); |
|
| 34 | - $due =& $schemadb->get('default')->get_field('due'); |
|
| 33 | + $vat = & $schemadb->get('default')->get_field('vat'); |
|
| 34 | + $due = & $schemadb->get('default')->get_field('due'); |
|
| 35 | 35 | // Fill VAT select |
| 36 | 36 | $vat_array = explode(',', $this->_config->get('vat_percentages')); |
| 37 | 37 | if (!empty($vat_array)) { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $data['controller'] = $this->load_controller($bd); |
| 75 | 75 | |
| 76 | 76 | $workflow = $this->get_workflow('datamanager', ['controller' => $data['controller']]); |
| 77 | - if ( $mode == 'edit' |
|
| 77 | + if ($mode == 'edit' |
|
| 78 | 78 | && $bd->can_do('midgard:delete')) { |
| 79 | 79 | $delete = $this->get_workflow('delete', [ |
| 80 | 80 | 'object' => $bd, |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // OPML subscription list import support |
| 85 | - if ( array_key_exists('net_nemein_rss_manage_opml', $_FILES) |
|
| 85 | + if (array_key_exists('net_nemein_rss_manage_opml', $_FILES) |
|
| 86 | 86 | && is_uploaded_file($_FILES['net_nemein_rss_manage_opml']['tmp_name'])) { |
| 87 | 87 | $opml_file = $_FILES['net_nemein_rss_manage_opml']['tmp_name']; |
| 88 | 88 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | // workaround for weird mgd API behavior where setting empty (i.e. deleting) a |
| 27 | 27 | // nonexistent parameter returns false |
| 28 | - if ( ($this->value === false || $this->value === null || $this->value === "") |
|
| 28 | + if (($this->value === false || $this->value === null || $this->value === "") |
|
| 29 | 29 | && $this->load() === null) { |
| 30 | 30 | return true; |
| 31 | 31 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $this->_group = new org_openpsa_contacts_group_dba(); |
| 74 | 74 | |
| 75 | - if ( $this->_type == 'organization' |
|
| 75 | + if ($this->_type == 'organization' |
|
| 76 | 76 | && $this->_parent_group) { |
| 77 | 77 | $this->_group->owner = $this->_parent_group->id; |
| 78 | 78 | } else { |
@@ -50,6 +50,6 @@ |
||
| 50 | 50 | $indexer = new org_openpsa_documents_midcom_indexer($this->_topic); |
| 51 | 51 | $indexer->index($controller->get_datamanager()); |
| 52 | 52 | |
| 53 | - return $controller->get_datamanager()->get_storage()->get_value()->name. "/"; |
|
| 53 | + return $controller->get_datamanager()->get_storage()->get_value()->name . "/"; |
|
| 54 | 54 | } |
| 55 | 55 | } |
@@ -130,13 +130,13 @@ |
||
| 130 | 130 | */ |
| 131 | 131 | private function modify_schema(schema $schema) |
| 132 | 132 | { |
| 133 | - $vat_field =& $schema->get_field('vat'); |
|
| 134 | - $pdf_field =& $schema->get_field('pdf_file'); |
|
| 135 | - $due_field =& $schema->get_field('due'); |
|
| 136 | - $sent_field =& $schema->get_field('sent'); |
|
| 137 | - $paid_field =& $schema->get_field('paid'); |
|
| 138 | - $customer_field =& $schema->get_field('customer'); |
|
| 139 | - $contact_field =& $schema->get_field('customerContact'); |
|
| 133 | + $vat_field = & $schema->get_field('vat'); |
|
| 134 | + $pdf_field = & $schema->get_field('pdf_file'); |
|
| 135 | + $due_field = & $schema->get_field('due'); |
|
| 136 | + $sent_field = & $schema->get_field('sent'); |
|
| 137 | + $paid_field = & $schema->get_field('paid'); |
|
| 138 | + $customer_field = & $schema->get_field('customer'); |
|
| 139 | + $contact_field = & $schema->get_field('customerContact'); |
|
| 140 | 140 | |
| 141 | 141 | // Fill VAT select |
| 142 | 142 | $vat_array = explode(',', $this->_config->get('vat_percentages')); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | foreach ($this->schemadb->all() as $schema) { |
| 53 | 53 | $schema->set('operations', $operations); |
| 54 | 54 | if ($schema->has_field('title')) { |
| 55 | - $field =& $schema->get_field('title'); |
|
| 55 | + $field = & $schema->get_field('title'); |
|
| 56 | 56 | $field['hidden'] = true; |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | // Get the calendar root event |
| 24 | 24 | if ($root_event = org_openpsa_calendar_interface::find_root_event()) { |
| 25 | - $field =& $schemadb->get('default')->get_field('calendar'); |
|
| 25 | + $field = & $schemadb->get('default')->get_field('calendar'); |
|
| 26 | 26 | $field['type_config']['privilege_object'] = $root_event; |
| 27 | 27 | $field['type_config']['assignee'] = 'group:' . $group->guid; |
| 28 | 28 | } |