summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2009-04-23 09:29:32 (GMT)
committer Joao Ventura2009-04-23 09:29:32 (GMT)
commit0d04837983ac976a6bfc0e0f6ec4938f1ea18d89 (patch)
treee7e76414ed2172dd5f5f23bdc41ffcb5a4411709
parent1091535fa94abc43f648e84688c72b0ec30ce786 (diff)
Coder fixes
-rw-r--r--print.module2
-rw-r--r--print_pdf/print_pdf.pages.inc14
2 files changed, 7 insertions, 9 deletions
diff --git a/print.module b/print.module
index 3c37de2..5be876d 100644
--- a/print.module
+++ b/print.module
@@ -303,7 +303,7 @@ function print_nodeapi(&$node, $op = 'view', $teaser, $page) {
(preg_match('!^print!i', $_GET['q']) == 0)) {
$link = print_insert_link(NULL, $node);
if ($link) {
- $node->content['print_links']['#value'] = preg_replace('!</span>$!', $link .'</span>', $node->content['print_links']['#value']);
+ $node->content['print_links']['#value'] = preg_replace('!</span>$!', $link .'</span>', $node->content['print_links']['#value']);
}
}
break;
diff --git a/print_pdf/print_pdf.pages.inc b/print_pdf/print_pdf.pages.inc
index ab056b0..39e19e5 100644
--- a/print_pdf/print_pdf.pages.inc
+++ b/print_pdf/print_pdf.pages.inc
@@ -135,10 +135,10 @@ function _print_pdf_dompdf($print, $html, $filename) {
// else if (function_exists('iconv')) {
// $html = iconv('UTF-8', 'ISO-8859-1', $html);
// }
- else if (function_exists('mb_convert_encoding')) {
+ elseif (function_exists('mb_convert_encoding')) {
$html = mb_convert_encoding($html, 'ISO-8859-1', 'UTF-8');
}
- else if (function_exists('recode_string')) {
+ elseif (function_exists('recode_string')) {
$html = recode_string('UTF-8..ISO_8859-1', $html);
}
$html = htmlspecialchars_decode(htmlentities($html, ENT_NOQUOTES, 'ISO-8859-1'), ENT_NOQUOTES);
@@ -263,19 +263,17 @@ function _print_pdf_wkhtmltopdf($print, $html, $filename) {
$xdisplay = rand(10, 500);
$xcmd = realpath($xvfb_binary) ." :$xdisplay -screen 0 320x200x24 -dpi ". WKHTMLTOPDF_DPI .
' -terminate -nolisten tcp -tst'.
- (defined('WKHTMLTOPDF_XVFB_FONT_PATH') ? ' -fp ' . WKHTMLTOPDF_XVFB_FONT_PATH : '');
+ (defined('WKHTMLTOPDF_XVFB_FONT_PATH') ? ' -fp '. WKHTMLTOPDF_XVFB_FONT_PATH : '');
$xdescriptor = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
$xprocess = proc_open($xcmd, $xdescriptor, $xpipes, NULL, NULL);
}
$descriptor = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
- $cmd = realpath($print_pdf_pdf_tool) . " --page-size $print_pdf_paper_size --orientation $print_pdf_page_orientation" .
- ' --dpi ' . WKHTMLTOPDF_DPI . (defined('WKHTMLTOPDF_OPTIONS') ? WKHTMLTOPDF_OPTIONS : '') .
- ' - -';
+ $cmd = realpath($print_pdf_pdf_tool) ." --page-size $print_pdf_paper_size --orientation $print_pdf_page_orientation".
+ ' --dpi '. WKHTMLTOPDF_DPI . (defined('WKHTMLTOPDF_OPTIONS') ? WKHTMLTOPDF_OPTIONS : '') .' - -';
- $process = proc_open($cmd, $descriptor, $pipes, NULL,
- isset($xvfb_binary) ? array('DISPLAY' => ':' . $xdisplay) : NULL);
+ $process = proc_open($cmd, $descriptor, $pipes, NULL, isset($xvfb_binary) ? array('DISPLAY' => ':'. $xdisplay) : NULL);
if (is_resource($process)) {
fwrite($pipes[0], $html);