You are here

domain_menu_access.install in Domain Menu Access 7

Same filename and directory in other branches
  1. 8 domain_menu_access.install
  2. 6 domain_menu_access.install

Domain Menu Access module (un)installation functions.

File

domain_menu_access.install
View source
<?php

/**
 * @file
 * Domain Menu Access module (un)installation functions.
 */

/**
 * Implements hook_uninstall().
 */
function domain_menu_access_uninstall() {
  $res = db_query("SELECT mlid, options FROM {menu_links}");
  foreach ($res as $row) {
    $options = unserialize($row->options);
    if (isset($options['domain_menu_access'])) {
      unset($options['domain_menu_access']);
      db_update('menu_links')
        ->fields(array(
        'options' => serialize($options),
      ))
        ->condition('mlid', $row->mlid)
        ->execute();
    }
  }
}

Functions