@@ -3,7 +3,7 @@ |
||
3 | 3 | $title = $this->data['midcom_services_auth_access_denied_title']; |
4 | 4 | $login_warning = $this->data['midcom_services_auth_access_denied_login_warning']; |
5 | 5 | |
6 | -midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.services.auth/style.css'); |
|
6 | +midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.services.auth/style.css'); |
|
7 | 7 | ?> |
8 | 8 | <!DOCTYPE html> |
9 | 9 | <html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>"> |
@@ -2,7 +2,7 @@ |
||
2 | 2 | $title = $this->data['midcom_services_auth_show_login_page_title']; |
3 | 3 | $login_warning = $this->data['midcom_services_auth_show_login_page_login_warning']; |
4 | 4 | |
5 | -midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.services.auth/style.css'); |
|
5 | +midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.services.auth/style.css'); |
|
6 | 6 | ?> |
7 | 7 | <!DOCTYPE html> |
8 | 8 | <html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>"> |
@@ -63,7 +63,7 @@ |
||
63 | 63 | public function _on_created() |
64 | 64 | { |
65 | 65 | //Remove the resource if necessary |
66 | - if ( $this->type == self::DECLINED |
|
66 | + if ($this->type == self::DECLINED |
|
67 | 67 | && $this->targetPerson) { |
68 | 68 | $qb = org_openpsa_projects_task_resource_dba::new_query_builder(); |
69 | 69 | $qb->add_constraint('task', '=', $this->task); |
@@ -95,7 +95,8 @@ |
||
95 | 95 | org_openpsa_projects_workflow::accept($task, 0, $this->comment); |
96 | 96 | return; |
97 | 97 | } |
98 | - } catch (midcom_error $e) { |
|
98 | + } |
|
99 | + catch (midcom_error $e) { |
|
99 | 100 | $e->log(); |
100 | 101 | } |
101 | 102 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $status_changer_label = $this->l10n->get('system'); |
69 | 69 | $target_person_label = $this->l10n->get('system'); |
70 | 70 | |
71 | - if ( $status_change->metadata->creator |
|
71 | + if ($status_change->metadata->creator |
|
72 | 72 | && $status_change->metadata->creator != $fallback_creator->guid) { |
73 | 73 | $status_changer = org_openpsa_widgets_contact::get($status_change->metadata->creator); |
74 | 74 | $status_changer_label = $status_changer->show_inline(); |
@@ -88,7 +88,8 @@ |
||
88 | 88 | $style = midcom_db_style::get_cached($style_id); |
89 | 89 | $styleeditor_url = midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$style->guid}/"; |
90 | 90 | $enabled = true; |
91 | - } catch (midcom_error $e) { |
|
91 | + } |
|
92 | + catch (midcom_error $e) { |
|
92 | 93 | $e->log(); |
93 | 94 | } |
94 | 95 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | $buttons = []; |
56 | 56 | $workflow = new midcom\workflow\datamanager; |
57 | - if ( $this->topic->can_do('midgard:update') |
|
57 | + if ($this->topic->can_do('midgard:update') |
|
58 | 58 | && $this->topic->can_do('midcom.admin.folder:topic_management')) { |
59 | 59 | $buttons[] = $workflow->get_button("__ais/folder/edit/", [ |
60 | 60 | MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('edit folder', 'midcom.admin.folder'), |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ]; |
90 | 90 | } |
91 | 91 | $buttons = array_merge($buttons, $this->get_approval_controls($this->topic, false)); |
92 | - if ( $this->topic->can_do('midcom.admin.folder:template_management') |
|
92 | + if ($this->topic->can_do('midcom.admin.folder:template_management') |
|
93 | 93 | && midcom::get()->auth->can_user_do('midgard.admin.asgard:manage_objects', class: 'midgard_admin_asgard_plugin')) { |
94 | 94 | $enabled = false; |
95 | 95 | $styleeditor_url = ''; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | MIDCOM_TOOLBAR_ACCESSKEY => 'f', |
123 | 123 | ]); |
124 | 124 | } |
125 | - if ( $this->topic->guid !== midcom::get()->config->get('midcom_root_topic_guid') |
|
125 | + if ($this->topic->guid !== midcom::get()->config->get('midcom_root_topic_guid') |
|
126 | 126 | && $this->topic->can_do('midgard:delete')) { |
127 | 127 | $workflow = new midcom\workflow\delete(['object' => $this->topic, 'recursive' => true]); |
128 | 128 | $buttons[] = $workflow->get_button("__ais/folder/delete/", [ |
@@ -4,7 +4,8 @@ |
||
4 | 4 | try { |
5 | 5 | $person = new midcom_db_person($metadata->locker); |
6 | 6 | $name = $person->name; |
7 | -} catch (midcom_error $e) { |
|
7 | +} |
|
8 | +catch (midcom_error $e) { |
|
8 | 9 | $name = $this->data['handler']->_l10n_midcom->get('unknown user'); |
9 | 10 | $e->log(); |
10 | 11 | } |
@@ -63,7 +63,8 @@ |
||
63 | 63 | |
64 | 64 | try { |
65 | 65 | $attachment = new midcom_db_attachment($guid); |
66 | - } catch (midcom_error $e) { |
|
66 | + } |
|
67 | + catch (midcom_error $e) { |
|
67 | 68 | $e->log(); |
68 | 69 | return "<span class=\"missing_photo\" title=\"{$guid}\">{$fulltag}</span>{$after}"; |
69 | 70 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | return $this->render_link($parts[1], $parts[2]) . $after; |
220 | 220 | |
221 | 221 | // Macro [something: <data>] (for example [abbr: BOFH - Bastard Operator From Hell] or [photo: <GUID>]) |
222 | - case ( preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
222 | + case (preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
223 | 223 | && method_exists($this, "_run_macro_{$macro_parts[1]}")): |
224 | 224 | $method = "_run_macro_{$macro_parts[1]}"; |
225 | 225 | return $this->$method($macro_parts[2], $match[0], $after); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | // No page matched, link to creation |
248 | 248 | $folder = $wikipage_match['folder'] ?? $wikipage_match['latest_parent']; |
249 | 249 | |
250 | - if ( isset($folder[MIDCOM_NAV_OBJECT]) |
|
250 | + if (isset($folder[MIDCOM_NAV_OBJECT]) |
|
251 | 251 | && $folder[MIDCOM_NAV_OBJECT]->can_do('midgard:create')) { |
252 | 252 | $workflow = $this->get_workflow('datamanager'); |
253 | 253 | return "<a href=\"{$folder[MIDCOM_NAV_ABSOLUTEURL]}create/?wikiword={$wikipage_match['remaining_path']}\" " . $workflow->render_attributes() . " class=\"wiki_missing\" title=\"" . $this->_l10n->get('click to create') . "\">{$text}</a>"; |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $links[$parts[1]] = $parts[2]; |
283 | 283 | } |
284 | 284 | // Ignore macros [something: <data>] (for example [abbr: BOFH - Bastard Operator From Hell] or [photo: <GUID>]) |
285 | - elseif ( !preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
285 | + elseif (!preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts) |
|
286 | 286 | || !method_exists($this, "_run_macro_{$macro_parts[1]}")) { |
287 | 287 | // MediaWiki-style link [wikipage] (no text) |
288 | 288 | $links[$fulltext] = $fulltext; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $qb->add_constraint('name', '<>', ''); |
47 | 47 | |
48 | 48 | // Unless in Auto-Index mode or the index article is hidden, we skip the index article. |
49 | - if ( !$this->_config->get('autoindex') |
|
49 | + if (!$this->_config->get('autoindex') |
|
50 | 50 | && !$this->_config->get('indexinnav')) { |
51 | 51 | $qb->add_constraint('name', '<>', 'index'); |
52 | 52 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $qb = midcom::get()->dbfactory->new_query_builder($this->config['type_config']['mapping_class_name']); |
100 | 100 | $qb->add_constraint($this->config['type_config']['master_fieldname'], '=', $this->get_master_foreign_key()); |
101 | 101 | |
102 | - if ( $this->config['type_config']['sortable'] |
|
102 | + if ($this->config['type_config']['sortable'] |
|
103 | 103 | && preg_match('/^(ASC|DESC)/i', $this->config['type_config']['sortable_sort_order'], $regs)) { |
104 | 104 | $order = strtoupper($regs[1]); |
105 | 105 | $qb->add_order('metadata.score', $order); |