diff --git a/redirect.generate.inc b/redirect.generate.inc index 69f0994..6120ae1 100644 --- a/redirect.generate.inc +++ b/redirect.generate.inc @@ -141,12 +141,12 @@ function redirect_generate_batch_generate($num, array &$context) { if (mt_rand(0, 1)) { $query = \Drupal::database(); $query->update('redirect') - ->fields(array( - 'count' => mt_rand(1, 500), - 'access' => mt_rand(REQUEST_TIME - 31536000, REQUEST_TIME), - )) - ->condition('rid', $redirect->id()) - ->execute(); + ->fields(array( + 'count' => mt_rand(1, 500), + 'access' => mt_rand(REQUEST_TIME - 31536000, REQUEST_TIME), + )) + ->condition('rid', $redirect->id()) + ->execute(); } $context['results'][] = $redirect->id(); diff --git a/redirect.install b/redirect.install index 64cabf7..d781020 100644 --- a/redirect.install +++ b/redirect.install @@ -38,8 +38,8 @@ function redirect_update_8100(&$sandbox) { $new_hash = Redirect::generateHash($row->redirect_source__path, (array) $query, $row->language); if ($row->hash != $new_hash) { // Do a direct query to speed things up. - $query = \Drupal::database(); - $query->update('redirect') + $query = \Drupal::database(); + $query->update('redirect') ->fields(['hash' => $new_hash]) ->condition('rid', $row->rid) ->execute();