--- views/modules/statistics/views_handler_field_accesslog_path.inc.orig	2009-09-07 15:14:50.000000000 -0700
+++ views/modules/statistics/views_handler_field_accesslog_path.inc	2009-09-07 15:14:30.000000000 -0700
@@ -18,6 +18,7 @@
     $options = parent::option_definition();
 
     $options['display_as_link'] = array('default' => TRUE);
+    $options['display_as_link_target'] = array('default' => '');
 
     return $options;
   }
@@ -32,12 +33,31 @@
       '#type' => 'checkbox',
       '#default_value' => !empty($this->options['display_as_link']),
     );
+    $options = array(
+      '' => '<none>',
+      '_blank' => 'New window (_blank)',
+      '_top' => 'Top Window (_top)',
+      '_self' => 'Same Window (_self)',
+      '_parent' => 'Parent Window (_parent)',
+    );
+    $form['display_as_link_target'] = array(
+      '#title' => t('Link target'),
+      '#description' => t('This option adds a target attribute to the link. WARNING: The target attribute is not XHTML compatible. If you need XHTML code, select &lt;none&gt;.'),
+      '#type' => 'select',
+      '#default_value' => $this->options['display_as_link_target'],
+      '#options' => $options,
+    );
   }
 
   function render($values) {
     $title = check_plain($values->{$this->field_alias});
     if (!empty($this->options['display_as_link'])) {
-      return l($title, $values->{$this->aliases['path']}, array('html' => TRUE));
+      $options = array('html' => TRUE);
+      $target = $this->options['display_as_link_target'];
+      if ($target) {
+        $options['attributes']['target'] = $target;
+      }
+      return l($title, $values->{$this->aliases['path']}, $options);
     }
     else {
       return $title;
