1.20.x system.install system_update_1037()

Set the default value for canonical_secure option. Check if old menu item exists and remove it.

Related topics

File

modules/system/system.install, line 2615
Install, update and uninstall functions for the system module.

Code

function system_update_1037() {
  config_set('system.core', 'canonical_secure', 0);

  $res = db_query("SELECT mlid FROM {menu_links} WHERE menu_name = 'management' AND link_title = 'Clean URLs'");
  if ($res->rowCount()) {
    $mlid = $res->fetch()->mlid;
    db_delete('menu_links')
      ->condition('mlid', $mlid, '=')
      ->execute();
  }
}