@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | // Get parent from DB and compare to catch moves |
| 72 | 72 | if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) { |
| 73 | 73 | $parent_entry = $this->get_guid($parent->guid); |
| 74 | - if ( $parent_entry |
|
| 74 | + if ($parent_entry |
|
| 75 | 75 | && $parent_entry[MIDCOM_NAV_ID] != $cached_node_id) { |
| 76 | 76 | $this->backend->delete($parent_entry[MIDCOM_NAV_ID] . '-leaves'); |
| 77 | 77 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $parent_id = $napobject[MIDCOM_NAV_NODEID]; |
| 87 | 87 | $parent_entry = $this->get_node($parent_id); |
| 88 | 88 | |
| 89 | - if ( $parent_entry |
|
| 89 | + if ($parent_entry |
|
| 90 | 90 | && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) { |
| 91 | 91 | unset($parent_entry[MIDCOM_NAV_SUBNODES]); |
| 92 | 92 | $this->put_node($parent_id, $parent_entry); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) { |
| 97 | 97 | $parent_entry_from_object = $this->get_guid($parent->guid); |
| 98 | 98 | |
| 99 | - if ( !empty($parent_entry_from_object[MIDCOM_NAV_ID]) |
|
| 99 | + if (!empty($parent_entry_from_object[MIDCOM_NAV_ID]) |
|
| 100 | 100 | && !empty($parent_entry[MIDCOM_NAV_ID]) |
| 101 | 101 | && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) { |
| 102 | 102 | unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $nav = new midcom_helper_nav; |
| 123 | 123 | if ($object instanceof midcom_db_topic) { |
| 124 | 124 | $napobject = $nav->get_node($object->id); |
| 125 | - } elseif ( ($node = $nav->find_closest_topic($object)) |
|
| 125 | + } elseif (($node = $nav->find_closest_topic($object)) |
|
| 126 | 126 | && $nodeobject = $nav->get_node($node->id)) { |
| 127 | 127 | $napobject = $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id); |
| 128 | 128 | } |