Added clearing of caches to table adoption; todo remains with Views cache.
authorJoachim Noreiko
Wed, 16 Nov 2011 15:19:19 +0000 (15:19 +0000)
committerJoachim Noreiko
Wed, 16 Nov 2011 15:19:19 +0000 (15:19 +0000)
includes/DataTable.inc

index 7188439..4b1ea6a 100644 (file)
@@ -163,6 +163,20 @@ class DataTable {
       }
     }
 
+    // Clear caches.
+    drupal_get_schema($this->name, TRUE);
+
+    // Have views read new views information about table.
+    // @todo: this doesn't seem to quite cut it.
+    if (module_exists('views')) {
+      views_invalidate_cache();
+    }
+
+    // data ui exposes path to a new default view.
+    if (module_exists('data_ui')) {
+      menu_rebuild();
+    }
+
     return FALSE;
   }