summaryrefslogtreecommitdiffstats
path: root/print_mail
diff options
context:
space:
mode:
authorJoao Ventura2012-05-21 02:26:50 +0200
committerJoao Ventura2012-05-21 02:26:50 +0200
commitf3a6a46e5e144c36760b449ebdb2782b562017dd (patch)
treea55813fd53d1acbc09489577af75b58c5348d2f7 /print_mail
parent545f0a4edc4d4171583e8e9cd3001cfb5c9d7f96 (diff)
Move pdf library handling into specialized sub-modules.
Diffstat (limited to 'print_mail')
-rw-r--r--print_mail/print_mail.inc4
-rw-r--r--print_mail/print_mail.module4
2 files changed, 5 insertions, 3 deletions
diff --git a/print_mail/print_mail.inc b/print_mail/print_mail.inc
index b53201f..87f4850 100644
--- a/print_mail/print_mail.inc
+++ b/print_mail/print_mail.inc
@@ -10,8 +10,6 @@
* @ingroup print
*/
-require_once(DRUPAL_ROOT . '/' . drupal_get_path('module', 'print') . '/print.pages.inc');
-
// Include MIME library
@include_once('Mail/mime.php');
@@ -274,6 +272,8 @@ function print_mail_form_validate($form, &$form_state) {
*/
function print_mail_form_submit($form, &$form_state) {
if (!array_key_exists('cancel', $form_state['values'])) {
+ module_load_include('inc', 'print', 'print.pages');
+
$link = print_mail_print_link();
if (!empty($form_state['values']['fld_from_name'])) {
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index 9424796..a5c025a 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -291,6 +291,8 @@ function _print_mail_access($permission) {
*
* @return string
* string with the HTML link to the printer-friendly page
+ *
+ * @ingroup print_api
*/
function print_mail_insert_link($path = NULL, $node = NULL) {
if (function_exists('print_ui_insert_link')) {
@@ -407,7 +409,7 @@ function print_mail_rules_action_info() {
* @ingroup rules
*/
function print_mail_action_submit($node, $settings) {
- require_once(DRUPAL_ROOT . '/' . drupal_get_path('module', 'print_mail') . '/print_mail.inc');
+ module_load_include('inc', 'print_mail', 'print_mail');
$form_state['values'] = array(
'path' => 'node/' . $node['node']->nid,