You are here

function eck_update_7008 in Entity Construction Kit (ECK) 7.3

Same name and namespace in other branches
  1. 7.2 eck.install \eck_update_7008()

Update 7008.

File

./eck.install, line 486
ECK's requirements, schemas, and logic for install and uninstall.

Code

function eck_update_7008() {

  // Well it seems that the way to fix the menu display problems is by deleting
  // the offending links and letting them get repopulated when the cache is
  // flushed.
  module_load_include('inc', 'eck', 'classes');
  foreach (EntityType::loadAll() as $entity_type) {
    foreach (Bundle::loadByEntityType($entity_type) as $bundle) {
      $query = db_delete('menu_links');
      $query
        ->condition('link_path', "admin/structure/entity-type/{$entity_type->name}/{$bundle->name}/delete");
      $query
        ->execute();
    }
  }
}