@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ]); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - if ( midcom::get()->config->get('midcom_services_rcs_enable') |
|
| 57 | + if (midcom::get()->config->get('midcom_services_rcs_enable') |
|
| 58 | 58 | && $object->can_do('midgard:update') |
| 59 | 59 | && $object->_use_rcs) { |
| 60 | 60 | $buttons[] = [ |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | $icon = 'stock-icons/16x16/page-' . $icontype . '.png'; |
| 87 | - if ( !midcom::get()->config->get('show_hidden_objects') |
|
| 87 | + if (!midcom::get()->config->get('show_hidden_objects') |
|
| 88 | 88 | && !$object->metadata->is_visible()) { |
| 89 | 89 | // Take scheduling into account |
| 90 | 90 | $icon = 'stock-icons/16x16/page-' . $icontype . '-notpublished.png'; |
@@ -338,8 +338,8 @@ discard block |
||
| 338 | 338 | $classes = []; |
| 339 | 339 | |
| 340 | 340 | if ($child[MIDCOM_NAV_TYPE] === 'node') { |
| 341 | - if ( $item[MIDCOM_NAV_ID] === $this->_nap->get_current_node() |
|
| 342 | - && ( !$this->_nap->get_current_leaf() |
|
| 341 | + if ($item[MIDCOM_NAV_ID] === $this->_nap->get_current_node() |
|
| 342 | + && (!$this->_nap->get_current_leaf() |
|
| 343 | 343 | || !$this->_nap->get_leaf($this->_nap->get_current_leaf()))) { |
| 344 | 344 | $classes[] = $this->css_active; |
| 345 | 345 | } |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | // Add information about the object's status |
| 389 | - if ( $this->object_status_to_class |
|
| 389 | + if ($this->object_status_to_class |
|
| 390 | 390 | && isset($item[MIDCOM_NAV_OBJECT]) |
| 391 | 391 | && $css_status_class = midcom::get()->metadata->get_object_classes($item[MIDCOM_NAV_OBJECT])) { |
| 392 | 392 | $classes[] = $css_status_class; |
@@ -405,12 +405,12 @@ discard block |
||
| 405 | 405 | echo "<a href=\"{$item[MIDCOM_NAV_ABSOLUTEURL]}\"{$link_class}>{$item[MIDCOM_NAV_NAME]}</a>"; |
| 406 | 406 | // If either of the follow nodes switches is on, follow all the nodes |
| 407 | 407 | |
| 408 | - if ( $item[MIDCOM_NAV_TYPE] === 'node' |
|
| 408 | + if ($item[MIDCOM_NAV_TYPE] === 'node' |
|
| 409 | 409 | && !$this->show_only_current |
| 410 | - && ( $this->list_levels === 0 |
|
| 410 | + && ($this->list_levels === 0 |
|
| 411 | 411 | || $this->_level < $this->list_levels)) { |
| 412 | - if ( $this->follow_all |
|
| 413 | - || ( $this->follow_selected |
|
| 412 | + if ($this->follow_all |
|
| 413 | + || ($this->follow_selected |
|
| 414 | 414 | && in_array($item[MIDCOM_NAV_ID], $this->node_path, true))) { |
| 415 | 415 | $this->_level++; |
| 416 | 416 | $this->_list_child_elements($item[MIDCOM_NAV_ID]); |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | $rows = $mc->get_rows(['id', 'name', 'guid'], 'id'); |
| 151 | 151 | |
| 152 | 152 | foreach ($images as $image) { |
| 153 | - if ( !isset($rows[$image->attachment]) |
|
| 153 | + if (!isset($rows[$image->attachment]) |
|
| 154 | 154 | || !isset($rows[$image->image]) |
| 155 | 155 | || !isset($rows[$image->thumbnail])) { |
| 156 | 156 | continue; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | $recipient = $_ENV["RECIPIENT"]; |
| 47 | 47 | $token_length = strlen($recipient) - strlen($prefix) - strlen($suffix); |
| 48 | -if ( $token_length <= 0 |
|
| 48 | +if ($token_length <= 0 |
|
| 49 | 49 | || substr($recipient, 0, strlen($prefix)) != $prefix |
| 50 | 50 | || substr($recipient, strlen($prefix) + $token_length) != $suffix) { |
| 51 | 51 | error_log("Recipient address does not match address template: $recipient"); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | fclose($fh); |
| 62 | 62 | exit(0); |
| 63 | 63 | } |
| 64 | -} elseif ( substr($BOUNCE_LOGGER, 0, strlen("http://")) == "http://" |
|
| 64 | +} elseif (substr($BOUNCE_LOGGER, 0, strlen("http://")) == "http://" |
|
| 65 | 65 | || substr($BOUNCE_LOGGER, 0, strlen("https://")) == "https://") { |
| 66 | 66 | $client = new org_openpsa_httplib(); |
| 67 | 67 | $client->post($BOUNCE_LOGGER, ["token" => $token]); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | return; |
| 75 | 75 | } |
| 76 | 76 | $parent = $this->get_parent(); |
| 77 | - if ( $parent |
|
| 77 | + if ($parent |
|
| 78 | 78 | && $parent->component == 'org.openpsa.documents') { |
| 79 | 79 | midcom::get()->auth->request_sudo('org.openpsa.documents'); |
| 80 | 80 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * if nothing matched so far and the subtype is alphanumeric, uppercase it on the theory |
| 171 | 171 | * that it's probably a file extension |
| 172 | 172 | */ |
| 173 | - if ( $st_orig == $subtype |
|
| 173 | + if ($st_orig == $subtype |
|
| 174 | 174 | && preg_match('/^[a-z0-9]+$/', $subtype)) { |
| 175 | 175 | $subtype = strtoupper($subtype); |
| 176 | 176 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $properties = $this->get_properties(); |
| 186 | 186 | // Copy current properties |
| 187 | 187 | foreach ($properties as $key) { |
| 188 | - if ( $key != 'guid' |
|
| 188 | + if ($key != 'guid' |
|
| 189 | 189 | && $key != 'id' |
| 190 | 190 | && $key != 'metadata') { |
| 191 | 191 | $backup->$key = $this->{$key}; |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | $backup_attachment = $backup->create_attachment($original_attachment->name, $original_attachment->title, $original_attachment->mimetype); |
| 218 | 218 | |
| 219 | 219 | $original_handle = $original_attachment->open('r'); |
| 220 | - if ( !$backup_attachment |
|
| 220 | + if (!$backup_attachment |
|
| 221 | 221 | || !$original_handle) { |
| 222 | 222 | // Failed to copy the attachment, abort |
| 223 | 223 | return $backup->delete(); |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // OPML subscription list import support |
| 85 | - if ( array_key_exists('net_nemein_rss_manage_opml', $_FILES) |
|
| 85 | + if (array_key_exists('net_nemein_rss_manage_opml', $_FILES) |
|
| 86 | 86 | && is_uploaded_file($_FILES['net_nemein_rss_manage_opml']['tmp_name'])) { |
| 87 | 87 | $opml_file = $_FILES['net_nemein_rss_manage_opml']['tmp_name']; |
| 88 | 88 | |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $this->_group = new org_openpsa_contacts_group_dba(); |
| 74 | 74 | |
| 75 | - if ( $this->_type == 'organization' |
|
| 75 | + if ($this->_type == 'organization' |
|
| 76 | 76 | && $this->_parent_group) { |
| 77 | 77 | $this->_group->owner = $this->_parent_group->id; |
| 78 | 78 | } else { |
@@ -50,6 +50,6 @@ |
||
| 50 | 50 | $indexer = new org_openpsa_documents_midcom_indexer($this->_topic); |
| 51 | 51 | $indexer->index($controller->get_datamanager()); |
| 52 | 52 | |
| 53 | - return $controller->get_datamanager()->get_storage()->get_value()->name. "/"; |
|
| 53 | + return $controller->get_datamanager()->get_storage()->get_value()->name . "/"; |
|
| 54 | 54 | } |
| 55 | 55 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | // Get the calendar root event |
| 24 | 24 | if ($root_event = org_openpsa_calendar_interface::find_root_event()) { |
| 25 | - $field =& $schemadb->get('default')->get_field('calendar'); |
|
| 25 | + $field = & $schemadb->get('default')->get_field('calendar'); |
|
| 26 | 26 | $field['type_config']['privilege_object'] = $root_event; |
| 27 | 27 | $field['type_config']['assignee'] = 'group:' . $group->guid; |
| 28 | 28 | } |