You are here

function globallink_settings_blocks_process in GlobalLink Connect for Drupal 7.7

Block batch process start .

1 string reference to 'globallink_settings_blocks_process'
prepare_blocks_button_submit in ./globallink_settings.inc
Block batch sets .

File

./globallink_settings.inc, line 698

Code

function globallink_settings_blocks_process($progress, $limit, $result, &$context) {
  foreach ($result as $key => $value) {
    $update = db_query("UPDATE {block} SET i18n_mode = :i18n_mode WHERE bid = :bid", array(
      ':bid' => $value->bid,
      ':i18n_mode' => 1,
    ));
    $block_arr = array(
      'module' => $value->module,
      'delta' => $value->delta,
      'title' => $value->title,
    );
    i18n_block_update_strings($block_arr, 1);
  }
  $progress = $progress + $limit;
  $context['message'] = 'Now processing ' . $progress . ' - ' . $context['results'][0] . ' Updated';
}