function system_update_8013

Add description_callback and description_arguments fields to {menu_router}.

Related topics

File

drupal/core/modules/system/system.install, line 1405
Install, update and uninstall functions for the system module.

Code

function system_update_8013() {
  if (!db_field_exists('menu_router', 'description_callback')) {
    $spec = array(
      'description' => 'A function which will alter the description. Defaults to t().',
      'type' => 'varchar',
      'length' => 255,
      'not null' => TRUE,
      'default' => '',
    );
    db_add_field('menu_router', 'description_callback', $spec);
  }
  if (!db_field_exists('menu_router', 'description_arguments')) {
    $spec = array(
      'description' => 'A serialized array of arguments for the description callback. If empty, the description will be used as the sole argument for the description callback.',
      'type' => 'varchar',
      'length' => 255,
      'not null' => TRUE,
      'default' => '',
    );
    db_add_field('menu_router', 'description_arguments', $spec);
  }
}