Commit 35faea08 authored by jcnventura's avatar jcnventura

Issue #1410262: remove unnecessary call to t() when using print_mail for non-node pages.

parent a56227d6
......@@ -48,6 +48,9 @@ function print_mail_form($form, &$form_state) {
$path = 'node/' . $path;
}
}
else {
$path = drupal_get_normal_path($path);
}
$print_mail_hourly_threshold = variable_get('print_mail_hourly_threshold', PRINT_MAIL_HOURLY_THRESHOLD);
......@@ -108,10 +111,14 @@ function print_mail_form($form, &$form_state) {
'#required' => TRUE,
);
if (!empty($title)) {
if (drupal_substr($path, 0, 5) == 'node/') {
$title = t($title);
}
$form['fld_title'] = array(
'#type' => 'item',
'#title' => t('Page to be sent'),
'#markup' => l(t($title), $path, array('attributes' => array('title' => t('View page')))),
'#markup' => l($title, $path, array('attributes' => array('title' => t('View page')))),
);
}
$form['txt_message'] = 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