| 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 |
| 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); |
| 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); |