You are here

function globallink_settings_menus_process_batch1 in GlobalLink Connect for Drupal 7.7

Menu batch process start.

1 string reference to 'globallink_settings_menus_process_batch1'
prepare_menus_button_submit in ./globallink_settings.inc
Menu batch sets .

File

./globallink_settings.inc, line 765

Code

function globallink_settings_menus_process_batch1($progress, $limit, $result, $resultLinks, &$context) {
  foreach ($result as $key => $value) {
    $update = db_query("UPDATE {menu_custom} SET i18n_mode = :i18n_mode WHERE  menu_name = :menu_name", array(
      ':menu_name' => $value->menu_name,
      ':i18n_mode' => 5,
    ));
  }
  foreach ($resultLinks as $key => $value) {
    $updateLinks = db_query("UPDATE {menu_links} SET language = :language WHERE  menu_name = :menu_name", array(
      ':menu_name' => $value->menu_name,
      ':language' => "en",
    ));
  }
  $progress = $progress + $limit;
  $context['message'] = 'Now processing ' . $progress . ' - ' . $context['results'][0] . ' Updated';
}