Closed (fixed)
Project:
Printer, email and PDF versions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
11 Mar 2005 at 02:10 UTC
Updated:
13 Jan 2006 at 18:41 UTC
There a two minor issues when printing links at the bottom of the page.
1. mailto links get the base_url in front of them
2. If your not using clean urls then the ?q= is printed twice.
I'm no programmer, but I made the following changes to the print_friendly_urls function to fix these issues.
Original code
if ($url) {
$urls[] = strpos($url, '://') ? $url : $base_url. '/'. url($url);
return count($urls);
}
New code
if ($url) {
/* $urls[] = strpos($url, '://') ? $url : $base_url. '/'. url($url); */
if (strpos($url, '://') | strpos($url, 'to:')) {
$urls[] = $url;
} else {
$urls[] = $base_url. '/'. $url;
}
return count($urls);
}
Thanks
Comments
Comment #1
deekayen commentedComment #2
deekayen commentedcommitted to cvs
Comment #3
peterjohnhartman commentedcommited to DRUPAL-4-7.
Comment #4
(not verified) commented