move footer definition to theme call

This commit is contained in:
2017-07-01 22:51:42 +10:00
parent 627b1767e8
commit 4ad18bf7fd
3 changed files with 8 additions and 7 deletions

View File

@@ -853,11 +853,7 @@ function booking_theme($existing, $type, $theme, $path) {
if($type == 'module') {
$theme_path = drupal_get_path('module', 'booking'). '/theme';
// if our more heavily customised template exists, use that, otherwise fall back to the generic one
$template_file = is_file($theme_path . '/mimemail-message-registration_mail.tpl.php') ? '/mimemail-message-registration_mail' : '/mimemail-message';
//get the footer text
$message_footer = variable_get('booking_html_mail_footer');
$message_footer = isset($message_footer['format']) ? $message_footer['value'] : $message_footer;
$template_file = is_file($theme_path . '/mimemail-message-registration_mail.tpl.php') ? '/mimemail-message-registration_mail' : '/mimemail-message';
return array(
'booking_details' => array('arguments' => array('node' => NULL)),
@@ -867,7 +863,7 @@ function booking_theme($existing, $type, $theme, $path) {
'template' => 'mimemail-message' // extension of .tpl.php automatically added
),
'booking_htmlmail_registration_mail' => array(
'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => $message_footer),
'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => NULL),
'path' => $theme_path,
'image_path' => drupal_get_path('module', 'booking'). '/images',
'template' => $template_file,