/[drupal]/contributions/modules/statistics_advanced/statistics_advanced.module
ViewVC logotype

Diff of /contributions/modules/statistics_advanced/statistics_advanced.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.20, Wed Jan 14 02:07:33 2009 UTC revision 1.1.2.21, Wed Jan 14 02:29:35 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: statistics_advanced.module,v 1.1.2.20 2009/01/14 02:07:33 davereid Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 118  function _statistics_advanced_is_403_or_ Line 118  function _statistics_advanced_is_403_or_
118      $headers = drupal_set_header();      $headers = drupal_set_header();
119    }    }
120    elseif (variable_get('cache', CACHE_DISABLED) == CACHE_NORMAL) {    elseif (variable_get('cache', CACHE_DISABLED) == CACHE_NORMAL) {
121      $headers = db_result(db_query("SELECT headers FROM {cache_page} WHERE cid = :cid", array(':cid' => $base_root . request_uri())));      $headers = db_result(db_query("SELECT headers FROM {cache_page} WHERE cid = '%s'", array(':cid' => $base_root . request_uri())));
122    }    }
123    
124    return preg_match('/404 Not Found|403 Forbidden/i', $headers);    return preg_match('/404 Not Found|403 Forbidden/i', $headers);
# Line 142  function statistics_advanced_exit() { Line 142  function statistics_advanced_exit() {
142      /*else {      /*else {
143        // If the node has been previously read by the user and has changed since        // If the node has been previously read by the user and has changed since
144        // the last read, count it as a new read.        // the last read, count it as a new read.
145        $changed = db_result(db_query("SELECT changed FROM {node} WHERE nid = :nid", array(':nid' => arg(1))));        $changed = db_result(db_query("SELECT changed FROM {node} WHERE nid = %d", array(':nid' => arg(1))));
146        $last_read = _statistics_advanced_ignore('nodecounter');        $last_read = _statistics_advanced_ignore('nodecounter');
147        if ($last_read && $changed > $last_read) {        if ($last_read && $changed > $last_read) {
148          _statistics_advanced_ignore('nodecounter', FALSE);          _statistics_advanced_ignore('nodecounter', FALSE);

Legend:
Removed from v.1.1.2.20  
changed lines
  Added in v.1.1.2.21

  ViewVC Help
Powered by ViewVC 1.1.2