@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $workflow = $this->get_workflow('datamanager', ['controller' => $data['controller']]); |
45 | 45 | $response = $workflow->run($request); |
46 | 46 | |
47 | - if ( $workflow->get_state() == 'save' |
|
47 | + if ($workflow->get_state() == 'save' |
|
48 | 48 | && $this->create_account($this->person, $data["controller"]->get_form_values())) { |
49 | 49 | midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('person %s created'), $this->person->name)); |
50 | 50 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $person = new midcom_db_person($guid); |
78 | 78 | $accounthelper = new org_openpsa_user_accounthelper($person); |
79 | 79 | if ($accounthelper->welcome_email()) { |
80 | - midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('password reset and mail to %s sent'), $person->email )); |
|
80 | + midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('password reset and mail to %s sent'), $person->email)); |
|
81 | 81 | } else { |
82 | 82 | midcom::get()->uimessages->add($this->_l10n->get($this->_component), $accounthelper->errstr, 'error'); |
83 | 83 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $accounthelper = new org_openpsa_user_accounthelper($this->person); |
134 | 134 | |
135 | 135 | // Update account |
136 | - if ( !$accounthelper->set_account($controller->get_form_values()["username"], $password) |
|
136 | + if (!$accounthelper->set_account($controller->get_form_values()["username"], $password) |
|
137 | 137 | && midcom_connection::get_error() != MGD_ERR_OK) { |
138 | 138 | // Failure, give a message |
139 | 139 | midcom::get()->uimessages->add($this->_l10n->get($this->_component), $this->_l10n->get("failed to update the user account, reason") . ': ' . $accounthelper->errstr, 'error'); |
@@ -63,7 +63,8 @@ |
||
63 | 63 | if ($group > 0) { |
64 | 64 | try { |
65 | 65 | $this->parent = new org_openpsa_products_product_group_dba($group); |
66 | - } catch (midcom_error $e) { |
|
66 | + } |
|
67 | + catch (midcom_error $e) { |
|
67 | 68 | $e->log(); |
68 | 69 | } |
69 | 70 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ]); |
39 | 39 | } |
40 | 40 | |
41 | - if ( $this->_article->topic === $this->_topic->id |
|
41 | + if ($this->_article->topic === $this->_topic->id |
|
42 | 42 | && $this->_article->can_do('midgard:delete')) { |
43 | 43 | $delete = $this->get_workflow('delete', ['object' => $this->_article]); |
44 | 44 | $buttons[] = $delete->get_button($this->router->generate('delete', ['guid' => $this->_article->guid])); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if ($this->_config->get('comments_enable')) { |
74 | 74 | if ($node = net_nehmer_comments_interface::get_node($this->_topic, $this->_config->get('comments_topic'))) { |
75 | 75 | $data['comments_url'] = $node[MIDCOM_NAV_RELATIVEURL] . "comment/{$this->_article->guid}/"; |
76 | - if ( $this->_topic->can_do('midgard:update') |
|
76 | + if ($this->_topic->can_do('midgard:update') |
|
77 | 77 | && $this->_topic->can_do('net.nehmer.comments:moderation')) { |
78 | 78 | net_nehmer_comments_viewer::add_head_elements(); |
79 | 79 | } |