@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | // Get parent from DB and compare to catch moves |
55 | 55 | if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) { |
56 | 56 | $parent_entry = $this->get_guid($parent->guid); |
57 | - if ( $parent_entry |
|
57 | + if ($parent_entry |
|
58 | 58 | && $parent_entry[MIDCOM_NAV_ID] != $cached_node_id) { |
59 | 59 | $this->backend->deleteItem($parent_entry[MIDCOM_NAV_ID] . '-leaves'); |
60 | 60 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $parent_id = $napobject[MIDCOM_NAV_NODEID]; |
70 | 70 | $parent_entry = $this->get_node($parent_id); |
71 | 71 | |
72 | - if ( $parent_entry |
|
72 | + if ($parent_entry |
|
73 | 73 | && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) { |
74 | 74 | unset($parent_entry[MIDCOM_NAV_SUBNODES]); |
75 | 75 | $this->put_node($parent_id, $parent_entry); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) { |
80 | 80 | $parent_entry_from_object = $this->get_guid($parent->guid); |
81 | 81 | |
82 | - if ( !empty($parent_entry_from_object[MIDCOM_NAV_ID]) |
|
82 | + if (!empty($parent_entry_from_object[MIDCOM_NAV_ID]) |
|
83 | 83 | && !empty($parent_entry[MIDCOM_NAV_ID]) |
84 | 84 | && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) { |
85 | 85 | unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | if ($object instanceof midcom_db_topic) { |
104 | 104 | return $nav->get_node($object->id); |
105 | 105 | } |
106 | - if ( ($node = $nav->find_closest_topic($object)) |
|
106 | + if (($node = $nav->find_closest_topic($object)) |
|
107 | 107 | && $nodeobject = $nav->get_node($node->id)) { |
108 | 108 | return $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id); |
109 | 109 | } |