@@ -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 = []; |
@@ -93,7 +93,8 @@ |
||
| 93 | 93 | // ->source will always contain the document GUID |
| 94 | 94 | $data['document'] = new org_openpsa_documents_document_dba($document->source); |
| 95 | 95 | $this->datamanager->set_storage($data['document']); |
| 96 | - } catch (midcom_error $e) { |
|
| 96 | + } |
|
| 97 | + catch (midcom_error $e) { |
|
| 97 | 98 | $e->log(); |
| 98 | 99 | continue; |
| 99 | 100 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <div class="content-with-sidebar"> |
| 2 | 2 | <div class="main"> |
| 3 | 3 | <?php |
| 4 | - $data['view']->display_view(); |
|
| 4 | + $data['view']->display_view(); |
|
| 5 | 5 | $prefix = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX); |
| 6 | 6 | midcom::get()->dynamic_load($prefix . 'members/' . $data['group']->guid . '/'); |
| 7 | 7 | ?> |
@@ -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)) { |
@@ -100,7 +100,8 @@ |
||
| 100 | 100 | $oldparent = new org_openpsa_projects_task_dba($this->old_task); |
| 101 | 101 | $oldparent->update_cache(); |
| 102 | 102 | } |
| 103 | - } catch (midcom_error $e) { |
|
| 103 | + } |
|
| 104 | + catch (midcom_error $e) { |
|
| 104 | 105 | $e->log(); |
| 105 | 106 | } |
| 106 | 107 | |
@@ -8,7 +8,8 @@ |
||
| 8 | 8 | if ($customer->orgOpenpsaObtype <= org_openpsa_contacts_group_dba::MYCONTACTS) { |
| 9 | 9 | $customer = false; |
| 10 | 10 | } |
| 11 | -} catch (midcom_error $e) { |
|
| 11 | +} |
|
| 12 | +catch (midcom_error $e) { |
|
| 12 | 13 | $customer = false; |
| 13 | 14 | } |
| 14 | 15 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | <div class="value"><?php echo $formatter->date($invoice->deliverydate); ?></div></div> |
| 35 | 35 | <?php } ?> |
| 36 | 36 | |
| 37 | - <div class="field"><div class="title"><?php echo $data['l10n_midcom']->get('description');?>: </div> |
|
| 37 | + <div class="field"><div class="title"><?php echo $data['l10n_midcom']->get('description'); ?>: </div> |
|
| 38 | 38 | <div class="description value">&(view['description']:h);</div></div> |
| 39 | 39 | |
| 40 | 40 | <?php |
@@ -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"; |
@@ -103,12 +103,12 @@ |
||
| 103 | 103 | if (!empty($guid)) { |
| 104 | 104 | //pass the urls & titles for the tabs |
| 105 | 105 | $tabdata[] = [ |
| 106 | - 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
| 107 | - 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
| 106 | + 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
| 107 | + 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
| 108 | 108 | ]; |
| 109 | 109 | $tabdata[] = [ |
| 110 | - 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
| 111 | - 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
| 110 | + 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
| 111 | + 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
| 112 | 112 | ]; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -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); |
@@ -103,7 +103,8 @@ |
||
| 103 | 103 | try { |
| 104 | 104 | midcom_db_topic::get_cached($node_guid); |
| 105 | 105 | $available_generators[$component] = midcom::get()->i18n->get_string($component, $component); |
| 106 | - } catch (midcom_error $e) { |
|
| 106 | + } |
|
| 107 | + catch (midcom_error $e) { |
|
| 107 | 108 | debug_add("topic for component '{$component}' not found or accessible"); |
| 108 | 109 | } |
| 109 | 110 | } |