You are here

function globallink_settings_nodes_process in GlobalLink Connect for Drupal 7.7

Nodes batch process start.

1 string reference to 'globallink_settings_nodes_process'
prepare_nodes_button_submit in ./globallink_settings.inc
Nodes batch sets .

File

./globallink_settings.inc, line 1025

Code

function globallink_settings_nodes_process($progress, $limit, $result, &$context) {
  $source = language_default()->language;
  foreach ($result as $key => $value) {
    $update = db_query("UPDATE {node} SET language = :language WHERE nid = :nid", array(
      ':language' => $source,
      ':nid' => $value->nid,
    ));
  }
  $progress = $progress + $limit;
  $context['message'] = 'Now processing ' . $progress . ' - ' . $context['results'][0] . ' Updated';
}