@@ -94,7 +94,7 @@ |
||
94 | 94 | 'midcom' => array( |
95 | 95 | 'style-init' => '', |
96 | 96 | 'style-finish' => '', |
97 | - ) |
|
97 | + ) |
|
98 | 98 | ), |
99 | 99 | 'nodes' => array(), |
100 | 100 | ); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function __construct(array &$data) |
24 | 24 | { |
25 | - $this->_data =& $data; |
|
25 | + $this->_data = & $data; |
|
26 | 26 | midcom::get()->head->enable_jquery_ui(array('accordion')); |
27 | 27 | } |
28 | 28 | |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | return; |
34 | 34 | } |
35 | 35 | |
36 | - if ( midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style') |
|
37 | - && ( $this->_data['handler_id'] !== '____mfa-asgard-object_create' |
|
36 | + if (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style') |
|
37 | + && ($this->_data['handler_id'] !== '____mfa-asgard-object_create' |
|
38 | 38 | || $this->_data['current_type'] == 'midgard_element')) { |
39 | 39 | $help_element = $this->_get_help_style_elementnames($this->_data['object']); |
40 | - } elseif ( midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element') |
|
40 | + } elseif (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element') |
|
41 | 41 | && $this->_data['handler_id'] !== '____mfa-asgard-object_create') { |
42 | 42 | $help_element = $this->_get_help_element(); |
43 | 43 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | private function _get_help_element() |
51 | 51 | { |
52 | - if ( empty($this->_data['object']->name) |
|
52 | + if (empty($this->_data['object']->name) |
|
53 | 53 | || empty($this->_data['object']->style)) { |
54 | 54 | // We cannot help with empty elements |
55 | 55 | return; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function send() |
30 | 30 | { |
31 | 31 | $context = midcom_core_context::get(); |
32 | - $data =& $context->get_custom_key('request_data'); |
|
32 | + $data = & $context->get_custom_key('request_data'); |
|
33 | 33 | midcom::get()->style->enter_context($context->id); |
34 | 34 | |
35 | 35 | if (isset($data['view_title'])) { |
@@ -217,7 +217,8 @@ |
||
217 | 217 | |
218 | 218 | try { |
219 | 219 | $account = new midcom_core_account($person); |
220 | - } catch (midcom_error $e) { |
|
220 | + } |
|
221 | + catch (midcom_error $e) { |
|
221 | 222 | midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), sprintf($this->_l10n->get('failed to get the user with id %s'), $person->id), 'error'); |
222 | 223 | return; |
223 | 224 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), $this->_l10n_midcom->get('updated')); |
59 | 59 | return new midcom_response_relocate("__mfa/asgard_midgard.admin.user/group/edit/{$data['group']->guid}/"); |
60 | 60 | } |
61 | - debug_add('Failed to update the group, last error was '. midcom_connection::get_error_string(), MIDCOM_LOG_ERROR); |
|
61 | + debug_add('Failed to update the group, last error was ' . midcom_connection::get_error_string(), MIDCOM_LOG_ERROR); |
|
62 | 62 | debug_print_r('We operated on this object', $data['group'], MIDCOM_LOG_ERROR); |
63 | 63 | |
64 | 64 | throw new midcom_error('Failed to update the group, see error level log for details'); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->_group = new midcom_db_group(); |
43 | 43 | if (!$this->_group->create()) { |
44 | 44 | debug_print_r('We operated on this object:', $this->_group); |
45 | - throw new midcom_error('Failed to create a new group. Last Midgard error was: '. midcom_connection::get_error_string()); |
|
45 | + throw new midcom_error('Failed to create a new group. Last Midgard error was: ' . midcom_connection::get_error_string()); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | return $this->_group; |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->_person = new midcom_db_person(); |
43 | 43 | if (!$this->_person->create()) { |
44 | 44 | debug_print_r('We operated on this object:', $this->_person); |
45 | - throw new midcom_error('Failed to create a new person. Last Midgard error was: '. midcom_connection::get_error_string()); |
|
45 | + throw new midcom_error('Failed to create a new person. Last Midgard error was: ' . midcom_connection::get_error_string()); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | return $this->_person; |
@@ -27,8 +27,8 @@ |
||
27 | 27 | if (!empty($fields["username"])) { |
28 | 28 | $user = midcom::get()->auth->get_user_by_name($fields["username"]); |
29 | 29 | |
30 | - if ( $user |
|
31 | - && ( !isset($fields['person']) |
|
30 | + if ($user |
|
31 | + && (!isset($fields['person']) |
|
32 | 32 | || $user->guid != $fields['person'])) { |
33 | 33 | $result["username"] = sprintf(midcom::get()->i18n->get_string("username %s is already in use", "midgard.admin.user"), $fields['username']); |
34 | 34 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | class org_openpsa_projects_midcom_indexer extends midcom_helper_datamanager2_indexer_client |
15 | 15 | { |
16 | - public function prepare_document(midcom_services_indexer_document &$document, midcom_helper_datamanager2_datamanager $dm) |
|
16 | + public function prepare_document(midcom_services_indexer_document & $document, midcom_helper_datamanager2_datamanager $dm) |
|
17 | 17 | { |
18 | 18 | $document->title = $dm->storage->object->get_label(); |
19 | 19 | if (is_a($dm->storage->object, 'org_openpsa_projects_task_dba')) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | midcom::get()->auth->require_valid_user(); |
37 | 37 | //Look for action among POST variables, then load main handler... |
38 | - if ( empty($_POST['org_openpsa_projects_workflow_action']) |
|
38 | + if (empty($_POST['org_openpsa_projects_workflow_action']) |
|
39 | 39 | || !is_array($_POST['org_openpsa_projects_workflow_action'])) { |
40 | 40 | throw new midcom_error('Incomplete request'); |
41 | 41 | } |