aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/components/module.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page/components/module.php')
-rw-r--r--views/default/page/components/module.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php
index b1198ee9a..7e1eaff20 100644
--- a/views/default/page/components/module.php
+++ b/views/default/page/components/module.php
@@ -2,10 +2,10 @@
/**
* Elgg module element
*
- * @uses $vars['title'] Title text
- * @uses $vars['header'] HTML content of the header
+ * @uses $vars['title'] Optional title text (do not pass header with this option)
+ * @uses $vars['header'] Optional HTML content of the header
* @uses $vars['body'] HTML content of the body
- * @uses $vars['footer'] HTML content of the footer
+ * @uses $vars['footer'] Optional HTML content of the footer
* @uses $vars['class'] Optional additional class for module
* @uses $vars['id'] Optional id for module
* @uses $vars['show_inner'] Optional flag to leave out inner div (default: false)
@@ -29,21 +29,15 @@ if (isset($vars['id'])) {
}
if (isset($vars['header'])) {
- if ($vars['header']) {
- $header = "<div class=\"elgg-head\">$header</div>";
- }
-} else {
+ $header = "<div class=\"elgg-head\">$header</div>";
+} elseif ($title) {
$header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
}
$body = "<div class=\"elgg-body\">$body</div>";
-if (isset($vars['footer'])) {
- if ($vars['footer']) {
- $footer = "<div class=\"elgg-foot\">$footer</div>";
- }
-} else {
- $footer = "<div class=\"elgg-foot\"></div>";
+if ($footer) {
+ $footer = "<div class=\"elgg-foot\">$footer</div>";
}
$contents = $header . $body . $footer;