Completed
Push — master ( f6e48a...088fe8 )
by Andreas
18:26
created
lib/midcom/services/cache/module/nap.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             // Get parent from DB and compare to catch moves
78 78
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
79 79
                 $parent_entry = $this->get_guid($parent->guid);
80
-                if (   $parent_entry
80
+                if ($parent_entry
81 81
                     && $parent_entry[MIDCOM_NAV_ID] != $cached_node_id) {
82 82
                     $this->_cache->delete($this->_prefix . '-' . $parent_entry[MIDCOM_NAV_ID] . '-leaves');
83 83
                 }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $parent_id = $napobject[MIDCOM_NAV_NODEID];
93 93
             $parent_entry = $this->get_node($parent_id);
94 94
 
95
-            if (   $parent_entry
95
+            if ($parent_entry
96 96
                 && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) {
97 97
                 unset($parent_entry[MIDCOM_NAV_SUBNODES]);
98 98
                 $this->put_node($parent_id, $parent_entry);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
103 103
                 $parent_entry_from_object = $this->get_guid($parent->guid);
104 104
 
105
-                if (    !empty($parent_entry_from_object[MIDCOM_NAV_ID])
105
+                if (!empty($parent_entry_from_object[MIDCOM_NAV_ID])
106 106
                      && !empty($parent_entry[MIDCOM_NAV_ID])
107 107
                      && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) {
108 108
                     unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $nav = new midcom_helper_nav;
129 129
             if ($object instanceof midcom_db_topic) {
130 130
                 $napobject = $nav->get_node($object->id);
131
-            } elseif (   ($node = $nav->find_closest_topic($object))
131
+            } elseif (($node = $nav->find_closest_topic($object))
132 132
                       && $nodeobject = $nav->get_node($node->id)) {
133 133
                 $napobject = $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id);
134 134
             }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         }
154 154
         $lang_id = midcom::get()->i18n->get_current_language();
155 155
         $result = $this->_cache->fetch("{$this->_prefix}-{$key}");
156
-        if (   !is_array($result)
156
+        if (!is_array($result)
157 157
             || !isset($result[$lang_id])) {
158 158
             return false;
159 159
         }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         $lang_id = midcom::get()->i18n->get_current_language();
179 179
         $result = $this->_cache->fetch("{$this->_prefix}-{$key}");
180
-        if (   !is_array($result)
180
+        if (!is_array($result)
181 181
             || !isset($result[$lang_id])) {
182 182
             return false;
183 183
         }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
         $lang_id = midcom::get()->i18n->get_current_language();
243 243
         $result = $this->_cache->fetch("{$this->_prefix}-{$guid}");
244
-        if (   !is_array($result)
244
+        if (!is_array($result)
245 245
             || !isset($result[$lang_id])) {
246 246
             return false;
247 247
         }
Please login to merge, or discard this patch.