Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.259
diff -u -p -r1.259 statistics.module
--- modules/statistics/statistics.module	25 May 2007 15:04:42 -0000	1.259
+++ modules/statistics/statistics.module	2 Jun 2007 19:09:23 -0000
@@ -58,11 +58,15 @@ function statistics_exit() {
     // We are counting content views.
     if ((arg(0) == 'node') && is_numeric(arg(1)) && arg(2) == '') {
       // A node has been viewed, so update the node's counters.
-      db_query('UPDATE {node_counter} SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = %d WHERE nid = %d', time(), arg(1));
-      // If we affected 0 rows, this is the first time viewing the node.
-      if (!db_affected_rows()) {
-        // We must create a new row to store counters for the new node.
-        db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, 1, 1, %d)', arg(1), time());
+      $node = node_load(arg(1));
+      // Don't increment the counter if the admin or author viewed the node.
+      if ($node->uid != 1 && $node->uid != $user->uid) {
+        db_query('UPDATE {node_counter} SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = %d WHERE nid = %d', time(), arg(1));
+        // If we affected 0 rows, this is the first time viewing the node.
+        if (!db_affected_rows()) {
+          // We must create a new row to store counters for the new node.
+          db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, 1, 1, %d)', arg(1), time());
+        }
       }
     }
   }
