Commit d53a01f5 authored by jcnventura's avatar jcnventura

Issue #1640438: Paths stored in the page_counter tables sometimes use the alias.

parent 2f41be38
......@@ -30,7 +30,7 @@ function print_controller_html() {
drupal_send_headers();
print $html;
$nodepath = (isset($node->path) && is_string($node->path)) ? drupal_get_normal_path($node->path) : 'node/' . $path;
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_page_counter')
->key(array('path' => $nodepath))
->fields(array(
......
......@@ -66,7 +66,7 @@ function print_epub_controller() {
exit;
}
$nodepath = (isset($node->path) && is_string($node->path)) ? drupal_get_normal_path($node->path) : 'node/' . $path;
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_epub_page_counter')
->key(array('path' => $nodepath))
->fields(array(
......
......@@ -66,7 +66,7 @@ function print_pdf_controller() {
exit;
}
$nodepath = (isset($node->path) && is_string($node->path)) ? drupal_get_normal_path($node->path) : 'node/' . $path;
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_pdf_page_counter')
->key(array('path' => $nodepath))
->fields(array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment