@@ -94,7 +94,8 @@ |
||
94 | 94 | } |
95 | 95 | try { |
96 | 96 | $this->_storage = new midgard_group($id); |
97 | - } catch (Exception $e) { |
|
97 | + } |
|
98 | + catch (Exception $e) { |
|
98 | 99 | debug_add('Tried to load a midcom_core_group, but got error ' . $e->getMessage(), MIDCOM_LOG_ERROR); |
99 | 100 | debug_print_r('Passed argument was:', $id); |
100 | 101 | throw new midcom_error($e->getMessage()); |
@@ -27,7 +27,8 @@ |
||
27 | 27 | try { |
28 | 28 | midcom::get()->dbfactory->get_object_by_guid($result->fromGuid); |
29 | 29 | midcom::get()->dbfactory->get_object_by_guid($result->toGuid); |
30 | - } catch (midcom_error $e) { |
|
30 | + } |
|
31 | + catch (midcom_error $e) { |
|
31 | 32 | echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n"; |
32 | 33 | $result->delete(); |
33 | 34 | } |
@@ -28,7 +28,8 @@ |
||
28 | 28 | foreach ($qb->execute() as $feed) { |
29 | 29 | try { |
30 | 30 | midcom_db_topic::get_cached($feed->node); |
31 | - } catch (midcom_error $e) { |
|
31 | + } |
|
32 | + catch (midcom_error $e) { |
|
32 | 33 | debug_add("Node #{$feed->node} does not exist, skipping feed #{$feed->id}", MIDCOM_LOG_ERROR); |
33 | 34 | continue; |
34 | 35 | } |
@@ -32,7 +32,8 @@ |
||
32 | 32 | foreach ($qb->execute() as $article) { |
33 | 33 | try { |
34 | 34 | $dm->set_storage($article); |
35 | - } catch (midcom_error $e) { |
|
35 | + } |
|
36 | + catch (midcom_error $e) { |
|
36 | 37 | $e->log(MIDCOM_LOG_WARN); |
37 | 38 | continue; |
38 | 39 | } |
@@ -112,7 +112,8 @@ |
||
112 | 112 | foreach ($qb->execute() as $article) { |
113 | 113 | try { |
114 | 114 | $datamanager->set_storage($article); |
115 | - } catch (midcom_error $e) { |
|
115 | + } |
|
116 | + catch (midcom_error $e) { |
|
116 | 117 | $e->log(); |
117 | 118 | continue; |
118 | 119 | } |
@@ -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 | } |
@@ -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 |
@@ -76,7 +76,8 @@ |
||
76 | 76 | } else { |
77 | 77 | try { |
78 | 78 | $this->initialize_index_article($topic); |
79 | - } catch (midcom_error $e) { |
|
79 | + } |
|
80 | + catch (midcom_error $e) { |
|
80 | 81 | // Could not create index |
81 | 82 | $topic->delete(); |
82 | 83 | throw $e; |