diff --git a/print.module b/print.module index 66d80016edf1c92ea61971e765577c9e6c583197..a1fbd0599bd23cb08b7df2a78912dd718745d9cf 100644 --- a/print.module +++ b/print.module @@ -124,7 +124,7 @@ function print_theme() { * Clones the node theme registry for print_node so that it works with existing node templates */ function print_theme_registry_alter(&$theme_registry) { - $theme_registry['print_node']['theme paths'] += $theme_registry['node']['theme paths']; +// $theme_registry['print_node']['theme path'] += $theme_registry['node']['theme path']; } /** diff --git a/print.pages.inc b/print.pages.inc index 146dfaec4cdafbf5bde7fd3b8a6cd0d429898c5d..0cf1d6c14e6baf7d1521c78b5deb8f49be9f5e38 100644 --- a/print.pages.inc +++ b/print.pages.inc @@ -197,12 +197,7 @@ function _print_var_generator($node, $message = NULL, $cid = NULL) { // If we are sending a message via e-mail, the CSS must be embedded if (!empty($message)) { $style = ''; - $css_files = array(); - foreach ($drupal_css as $types) { - foreach ($types as $values) { - $css_files = array_merge($css_files, array_keys($values)); - } - } + $css_files = array_keys($drupal_css); if (!empty($print_css)) { // Convert to a local path, by removing the base_path $pattern = '!^' . base_path() . '!'; @@ -340,8 +335,8 @@ function _print_var_generator($node, $message = NULL, $cid = NULL) { if (module_exists('taxonomy')) { // TODO make this work when taxonomy works again // $terms = taxonomy_link('taxonomy terms', $node); - $terms = taxonomy_preview_terms($node); - $print['taxonomy'] = theme('links', $terms); +// $terms = taxonomy_preview_terms($node); + $print['taxonomy'] = theme('links', array('links' => $terms)); } $print['node'] = $node; diff --git a/print_pdf/print_pdf.class.inc b/print_pdf/print_pdf.class.inc index 0f78d10cf3a49f0d1cb955c4a98fcd20a815fd86..92f782eaeb903dbdb9d7fd839f650e06c663a29a 100644 --- a/print_pdf/print_pdf.class.inc +++ b/print_pdf/print_pdf.class.inc @@ -20,6 +20,6 @@ class PrintTCPDF extends TCPDF { //Page footer public function Footer() { - theme('print_pdf_tcpdf_footer2', $this); + theme('print_pdf_tcpdf_footer2', array('pdf' => $this)); } } diff --git a/print_pdf/print_pdf.pages.inc b/print_pdf/print_pdf.pages.inc index 67aaea4bd0e2eba873899629666c49a419f39818..5d02a2b8e555aefc75bb65ab28423c8434ba99f7 100644 --- a/print_pdf/print_pdf.pages.inc +++ b/print_pdf/print_pdf.pages.inc @@ -150,7 +150,7 @@ function _print_pdf_dompdf($print, $html, $filename) { $dompdf->set_protocol($protocol); // dompdf can't handle footers cleanly, so disable the following -// $html = theme('print_pdf_dompdf_footer', $html); +// $html = theme('print_pdf_dompdf_footer', array('html' => $html)); // If dompdf Unicode support is disabled, try to convert to ISO-8859-1 and then to HTML entities if (!variable_get('print_pdf_dompdf_unicode', PRINT_PDF_DOMPDF_UNICODE_DEFAULT)) { @@ -254,9 +254,9 @@ function _print_pdf_tcpdf($print, $html, $filename) { $pdf->setRTL(TRUE); } - $pdf = theme('print_pdf_tcpdf_header', $pdf, $html, $font); - $pdf = theme('print_pdf_tcpdf_footer', $pdf, $html, $font); - $pdf = theme('print_pdf_tcpdf_page', $pdf); + $pdf = theme('print_pdf_tcpdf_header', array('pdf' => $pdf, 'html' => $html, 'font' => $font)); + $pdf = theme('print_pdf_tcpdf_footer', array('pdf' => $pdf, 'html' => $html, 'font' => $font)); + $pdf = theme('print_pdf_tcpdf_page', array('pdf' => $pdf)); //initialize document $pdf->AliasNbPages(); @@ -264,7 +264,7 @@ function _print_pdf_tcpdf($print, $html, $filename) { // add a page $pdf->AddPage(); - $pdf = theme('print_pdf_tcpdf_content', $pdf, $html, $font); + $pdf = theme('print_pdf_tcpdf_content', array('pdf' => $pdf, 'html' => $html, 'font' => $font)); // reset pointer to the last page $pdf->lastPage(); @@ -350,9 +350,9 @@ function _print_pdf_wkhtmltopdf($print, $html, $filename) { * contents of the body of the HTML from the original node * @see theme_print_pdf_tcpdf_footer() */ -function theme_print_pdf_dompdf_footer($html) { - preg_match('!!si', $html, $tpl_footer); - $html = str_replace($tpl_footer[0], '', $html); +function theme_print_pdf_dompdf_footer($vars) { + preg_match('!!si', $vars['html'], $tpl_footer); + $html = str_replace($tpl_footer[0], '', $vars['html']); $text = '