@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | if ($result === true) { |
| 21 | 21 | $result = []; |
| 22 | 22 | } |
| 23 | - if ( empty($fields['end']) |
|
| 23 | + if (empty($fields['end']) |
|
| 24 | 24 | && empty($fields['continuous'])) { |
| 25 | 25 | $result['end'] = midcom::get()->i18n->get_string('select either end date or continuous', 'org.openpsa.sales'); |
| 26 | 26 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | public function validate_units(array $fields) |
| 34 | 34 | { |
| 35 | 35 | $result = []; |
| 36 | - if ( empty($fields['invoiceByActualUnits']) |
|
| 36 | + if (empty($fields['invoiceByActualUnits']) |
|
| 37 | 37 | && empty($fields['plannedUnits'])) { |
| 38 | 38 | $result['plannedUnits'] = midcom::get()->i18n->get_string('select either planned units or invoice by actual units', 'org.openpsa.sales'); |
| 39 | 39 | return $result; |
@@ -237,7 +237,7 @@ |
||
| 237 | 237 | $invoice_item->pricePerUnit = $deliverable->pricePerUnit; |
| 238 | 238 | $invoice_item->deliverable = $deliverable->id; |
| 239 | 239 | //calculate price |
| 240 | - if ( $deliverable->invoiceByActualUnits |
|
| 240 | + if ($deliverable->invoiceByActualUnits |
|
| 241 | 241 | || $deliverable->plannedUnits == 0) { |
| 242 | 242 | $invoice_item->units = $hours; |
| 243 | 243 | } else { |
@@ -194,7 +194,7 @@ |
||
| 194 | 194 | return false; |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - if ( !empty($this->_old_username) |
|
| 197 | + if (!empty($this->_old_username) |
|
| 198 | 198 | && $this->_old_username !== $new_username) { |
| 199 | 199 | if (!$history = @unserialize($this->_person->get_parameter('midcom', 'username_history'))) { |
| 200 | 200 | $history = []; |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | { |
| 91 | 91 | if ($this->invoiceable) { |
| 92 | 92 | $task = new org_openpsa_projects_task_dba($this->task); |
| 93 | - $time_slot = (float)$task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot'); |
|
| 93 | + $time_slot = (float) $task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot'); |
|
| 94 | 94 | if (empty($time_slot)) { |
| 95 | 95 | $time_slot = (float) midcom_baseclasses_components_configuration::get('org.openpsa.projects', 'config')->get('default_minimum_time_slot'); |
| 96 | 96 | if (empty($time_slot)) { |
@@ -174,7 +174,7 @@ |
||
| 174 | 174 | } |
| 175 | 175 | if (!midcom::get()->auth->admin) { |
| 176 | 176 | $user_id = midcom::get()->auth->acl->get_user_id(); |
| 177 | - if ( !$this->data[$type . '_guid'] |
|
| 177 | + if (!$this->data[$type . '_guid'] |
|
| 178 | 178 | || !midcom::get()->auth->acl->can_do_byguid('midgard:read', $this->data[$type . '_guid'], midcom_db_topic::class, $user_id)) { |
| 179 | 179 | return null; |
| 180 | 180 | } |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | $config = array_merge($defaults, $config); |
| 40 | 40 | |
| 41 | 41 | $node_url = $siteconfig->get_node_full_url($component); |
| 42 | - if ( $node_url |
|
| 43 | - && ( !$user_id |
|
| 42 | + if ($node_url |
|
| 43 | + && (!$user_id |
|
| 44 | 44 | || midcom::get()->auth->acl->can_do_byguid('midgard:read', $siteconfig->get_node_guid($component), midcom_db_topic::class, $user_id))) { |
| 45 | 45 | $providers[] = [ |
| 46 | 46 | 'placeholder' => midcom::get()->i18n->get_string('search title', $component), |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | echo '<div id="tabs">'; |
| 116 | 116 | echo "\n<ul>\n"; |
| 117 | 117 | foreach ($tabdata as $key => $tab) { |
| 118 | - echo "<li><a id='key_" . $key ."' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>"; |
|
| 118 | + echo "<li><a id='key_" . $key . "' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>"; |
|
| 119 | 119 | } |
| 120 | 120 | echo "\n</ul>\n"; |
| 121 | 121 | echo "</div>\n"; |
@@ -32,11 +32,11 @@ |
||
| 32 | 32 | $object = $dm->get_storage()->get_value(); |
| 33 | 33 | |
| 34 | 34 | $document = $indexer->new_document($dm); |
| 35 | - if ( $config->get('enable_scheduling') |
|
| 35 | + if ($config->get('enable_scheduling') |
|
| 36 | 36 | && is_a($object, org_openpsa_products_product_dba::class)) { |
| 37 | 37 | // Check start/end for products |
| 38 | - if ( $object->start > time() |
|
| 39 | - || ( $object->end != 0 |
|
| 38 | + if ($object->start > time() |
|
| 39 | + || ($object->end != 0 |
|
| 40 | 40 | && $object->end < time())) { |
| 41 | 41 | // Not in market, remove from index |
| 42 | 42 | $indexer->delete($document->RI); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | if ($object instanceof midcom_db_attachment) { |
| 94 | 94 | // Faster linking to attachments |
| 95 | 95 | $parent = $object->get_parent(); |
| 96 | - if ( is_a($parent, midcom_db_topic::class) |
|
| 96 | + if (is_a($parent, midcom_db_topic::class) |
|
| 97 | 97 | && $nav->is_node_in_tree($parent->id, $nav->get_root_node())) { |
| 98 | 98 | $napobj = $nav->get_node($parent->id); |
| 99 | 99 | return $napobj[MIDCOM_NAV_FULLURL] . $object->name; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $prefix = $nap->get_node($this->_topic->id)[MIDCOM_NAV_ABSOLUTEURL]; |
| 35 | 35 | |
| 36 | 36 | $tree = new org_openpsa_widgets_tree(org_openpsa_contacts_group_dba::class, 'owner'); |
| 37 | - $tree->link_callback = function ($guid) use ($prefix) { |
|
| 37 | + $tree->link_callback = function($guid) use ($prefix) { |
|
| 38 | 38 | return $prefix . 'group/' . $guid . '/'; |
| 39 | 39 | }; |
| 40 | 40 | $tree->constraints[] = ['orgOpenpsaObtype', '<', org_openpsa_contacts_group_dba::MYCONTACTS]; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $my_company_guid = $this->_config->get('owner_organization'); |
| 54 | 54 | |
| 55 | - if ( empty($my_company_guid) |
|
| 55 | + if (empty($my_company_guid) |
|
| 56 | 56 | || !mgd_is_guid($my_company_guid)) { |
| 57 | 57 | if (midcom::get()->auth->admin) { |
| 58 | 58 | midcom::get()->uimessages->add( |