#133144: views filters weren't getting deleted when a view was deleted, causing cruft...
authorEarl Miles
Wed, 11 Apr 2007 23:58:38 +0000 (23:58 +0000)
committerEarl Miles
Wed, 11 Apr 2007 23:58:38 +0000 (23:58 +0000)
CHANGELOG.txt
views.module

index 7e9bc55..ebfbec3 100644 (file)
@@ -34,6 +34,7 @@ Views 4.7.x-dev
     o #130139: (simplymenotu) change changelog to top-down format.
     o #130196: (the greenman) Views filters improperly ignored table aliasing.
     o #130381: (mgull) Clear the page cache after a view is saved or deleted so that anonymous users will see changes.
+    o #133144: views filters weren't getting deleted when a view was deleted, causing cruft buildup.
 
   New features:
     o #105620: (Attempt 2) allow modules to alter views tables + arguments
index 785546e..e673c63 100644 (file)
@@ -1035,6 +1035,8 @@ function _views_delete_view($view) {
   db_query("DELETE FROM {view_sort} where vid=%d", $view->vid);
   db_query("DELETE FROM {view_argument} where vid=%d", $view->vid);
   db_query("DELETE FROM {view_tablefield} where vid=%d", $view->vid);
+  db_query("DELETE FROM {view_filter} where vid=%d", $view->vid);
+  db_query("DELETE FROM {view_exposed_filter} where vid=%d", $view->vid);
 
   cache_clear_all(); // in Drupal 4.7 this clears everything.
 }