Commit 03df5561 authored by jcnventura's avatar jcnventura

Make HEAD compatible with Drupal 7

parent 51a9980d
; $Id$
name = "Printer-friendly pages (core)"
description = "Adds a printer-friendly version link to content and administrative pages."
core=6.x
core=7.x
package = "Printer, e-mail and PDF versions"
files[] = print.module
files[] = print.admin.inc
files[] = print.pages.inc
......@@ -49,7 +49,10 @@ define('PRINT_ALLOW_BOOK_LINK', 2);
* Implementation of hook_perm().
*/
function print_perm() {
return array('access print', 'administer print');
return array(
'access print' => t('Access the printer-friendly page'),
'administer print' => t('Perform maintenance tasks for the print module'),
);
}
/**
......@@ -77,7 +80,6 @@ function print_menu() {
'page callback' => 'print_controller_html',
'access arguments' => array('access print'),
'type' => MENU_CALLBACK,
'file' => 'print.pages.inc',
);
$items['admin/settings/print'] = array(
'title' => 'Printer-friendly pages',
......@@ -85,7 +87,6 @@ function print_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('print_html_settings'),
'access arguments' => array('administer print'),
'file' => 'print.admin.inc',
);
$items['admin/settings/print/html'] = array(
'title' => 'Web page',
......@@ -99,7 +100,6 @@ function print_menu() {
'access arguments' => array('administer print'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
'file' => 'print.admin.inc',
);
return $items;
......
......@@ -24,7 +24,7 @@ function print_mail_form($form_state) {
if (!flood_is_allowed('print_mail', $print_mail_hourly_threshold)) {
$form['flood'] = array(
'#type' => 'markup',
'#value' => '<p>'. t('You cannot send more than %number messages per hour. Please try again later.', array('%number' => $print_mail_hourly_threshold)) .'</p>',
'#markup' => '<p>'. t('You cannot send more than %number messages per hour. Please try again later.', array('%number' => $print_mail_hourly_threshold)) .'</p>',
);
return $form;
}
......
......@@ -2,5 +2,8 @@
name = "Send by e-mail"
description = "Provides the capability to send the web page by e-mail"
dependencies[] = print
core=6.x
core=7.x
package = "Printer, e-mail and PDF versions"
files[] = print_mail.module
files[] = print_mail.inc
files[] = print_mail.admin.inc
......@@ -47,7 +47,6 @@ function print_mail_menu() {
'page arguments' => array('print_mail_form'),
'access arguments' => array('access print'),
'type' => MENU_CALLBACK,
'file' => 'print_mail.inc',
);
$items['admin/settings/print/mail'] = array(
'title' => 'e-mail',
......@@ -56,7 +55,6 @@ function print_mail_menu() {
'access arguments' => array('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
'file' => 'print_mail.admin.inc',
);
return $items;
......
......@@ -159,7 +159,7 @@ function print_pdf_settings() {
else {
$form['settings'] = array(
'#type' => 'markup',
'#value' => '<p>'. t("No PDF generation tool found! Please dowload a supported PHP PDF generation tool. Check this module's INSTALL.txt for more details.") .'</p>',
'#markup' => '<p>'. t("No PDF generation tool found! Please dowload a supported PHP PDF generation tool. Check this module's INSTALL.txt for more details.") .'</p>',
);
}
......
......@@ -2,5 +2,8 @@
name = "PDF version"
description = "Adds the capability to export pages as PDF."
dependencies[] = print
core=6.x
core=7.x
package = "Printer, e-mail and PDF versions"
files[] = print_pdf.module
files[] = print_pdf.admin.inc
files[] = print_pdf.pages.inc
......@@ -63,7 +63,6 @@ function print_pdf_menu() {
'page callback' => 'print_pdf_controller',
'access arguments' => array('access print'),
'type' => MENU_CALLBACK,
'file' => 'print_pdf.pages.inc',
);
$items['admin/settings/print/pdf'] = array(
'title' => 'PDF',
......@@ -72,7 +71,6 @@ function print_pdf_menu() {
'access arguments' => array('administer print'),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
'file' => 'print_pdf.admin.inc',
);
return $items;
......
......@@ -124,7 +124,7 @@ function _print_pdf_tcpdf($print, $html, $filename) {
require_once(drupal_get_path('module', 'print_pdf') .'/print_pdf.class.inc');
}
else {
require_once(drupal_get_path('module', 'print_pdf') .'/print_pdf.class_php4.inc');
// Use only the PHP5 version of TCPDF
}
$font = 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