Commit 08a27ec2 authored by sangus's avatar sangus Committed by jcnventura

Issue #2348737 by sangus, jcnventura: Data too long for column 'path'

parent 7af42679
......@@ -41,7 +41,7 @@ function print_controller_html() {
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_page_counter')
->key(array('path' => $nodepath))
->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
......
......@@ -74,7 +74,7 @@ function print_epub_controller() {
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_epub_page_counter')
->key(array('path' => $nodepath))
->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
......
......@@ -115,7 +115,7 @@ function print_mail_form_for_path($form, &$form_state, $path, $query = NULL, $us
if (count($form_state['input']) == 0) {
$nodepath = drupal_get_normal_path($path);
db_merge('print_mail_page_counter')
->key(array('path' => $nodepath))
->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
......
......@@ -74,7 +74,7 @@ function print_pdf_controller() {
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_pdf_page_counter')
->key(array('path' => $nodepath))
->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
......
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