summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2008-02-28 00:08:58 (GMT)
committer Joao Ventura2008-02-28 00:08:58 (GMT)
commit185f5271890343d5917b63b59512dceaf53d8113 (patch)
tree38001d6093fb8cbbad3fee81aa40ba330302aef9
parentebc686388756ef8c2d831e360f77b625797543c4 (diff)
Fix #227625: add print['url'] var with absolute source url
-rw-r--r--print.module20
1 files changed, 10 insertions, 10 deletions
diff --git a/print.module b/print.module
index ac5e0ec..db8580b 100644
--- a/print.module
+++ b/print.module
@@ -442,18 +442,18 @@ function _print_var_generator($node, $cid = NULL) {
$print["logo"] = $print["logo"] ? "<img class=\"print-logo\" src=\"". $print["logo"] ."\" alt=\"\" />\n" : "";
/* Grab and format the src URL */
+ if (empty($print_sourceurl_settings['forcenode'])) {
+ $print["url"] = url($path, NULL, NULL, TRUE);
+ }
+ else {
+ $print["url"] = $base_url .'/'. (((bool)variable_get('clean_url', '0')) ? '' : '?q=') . $path;
+ }
+ if ($cid) {
+ $print["url"] .= "#comment-$cid";
+ }
if ($print_sourceurl_settings['enabled'] == 1) {
- if (empty($print_sourceurl_settings['forcenode'])) {
- $print["source_url"] = url($path, NULL, NULL, TRUE);
- }
- else {
- $print["source_url"] = $base_url .'/'. (((bool)variable_get('clean_url', '0')) ? '' : '?q=') . $path;
- }
- if ($cid) {
- $print["source_url"] .= "#comment-$cid";
- }
$print["printdate"] = $print_sourceurl_settings['date'] ? (" (". $themed['retrieved'] ." ". format_date(time(), 'small') .")") : "";
- $print["source_url"] = "<strong>". $themed['sourceURL'] . $print["printdate"] .":</strong> <a href=\"". $print["source_url"] ."\">". $print["source_url"] ."</a>";
+ $print["source_url"] = "<strong>". $themed['sourceURL'] . $print["printdate"] .":</strong> <a href=\"". $print["url"] ."\">". $print["url"] ."</a>";
}
else {
$print["source_url"] = "";