minor tweaks to token

This commit is contained in:
Nathan Coad
2018-06-26 10:28:17 +10:00
parent 33f5dcf34f
commit fde5a01781
2 changed files with 12 additions and 2 deletions

View File

@@ -1651,13 +1651,19 @@ function _booking_readinggroup_email_listing($node) {
}
}
// Don't show an empty header row if there was no-one in the group
if (count($rows) < 1) {
return implode("\n", $rows);
}
// Use Drupal's table theming function to build the table if HTML email is enabled
if(variable_get('booking_enable_html_mail', 0) == 1) {
$table = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes));
watchdog('booking_debug', "<pre>Reading group table\n@info</pre>", array('@info' => print_r($table, true)));
return $table;
}
else {
return "";
return implode("\n", $rows);
}
}