Commit 900821c7 authored by Steven Ayers's avatar Steven Ayers Committed by Steven Ayers
Browse files

Issue #3311288 by bluegeek9: Update #7130-problem

parent 2ac294ef
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -214,7 +214,12 @@ function visitors_exit($destination = NULL) {
    $fields['visitors_area_code']      = $geoip_data['area_code'];
  }

  try {
    db_insert('visitors')
      ->fields($fields)
      ->execute();
  }
  catch (\Exception $e) {
    watchdog_exception('visitors', $e);
  }
}
+13 −6
Original line number Diff line number Diff line
@@ -148,6 +148,8 @@ function visitors_update_7130(&$sandbox) {
    $packed = inet_pton($ip_address);

    if ($packed != FALSE) {

      try {
        db_update('visitors')
          ->fields(array(
            'visitors_ip' => $packed,
@@ -155,6 +157,11 @@ function visitors_update_7130(&$sandbox) {
          ->condition('visitors_id', $log->visitors_id)
          ->execute();
      }
      catch (\Exception $e) {
        watchdog_exception('visitors', $e);
      }

    }

    $sandbox['progress'] += 1;
    $sandbox['last_id'] = $log->visitors_id;