Skip to content

Commit

Permalink
Rename chkSysMsg => hasMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
joomlart committed Feb 1, 2013
1 parent f5f6fcb commit 334cf77
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
21 changes: 2 additions & 19 deletions source/plg_system_t3/includes/core/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,27 +326,10 @@ function checkSpotlight($name, $positions)
/**
* Check system messages
*/
function checkSysMsg()
function hasMessage()
{
// Initialise variables.
$lists = array();

// Get the message queue
$messages = JFactory::getApplication()->getMessageQueue();

// Build the sorted message list
if (is_array($messages) && !empty($messages))
{
foreach ($messages as $msg)
{
if (isset($msg['type']) && isset($msg['message']))
{
$lists[$msg['type']][] = $msg['message'];
}
}
}

return count($lists);
return !empty(JFactory::getApplication()->getMessageQueue());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion source/tpl_t3_blank/tpls/blocks/mainbody-content-left.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<!-- MAIN CONTENT -->
<div id="t3-content" class="t3-content <?php echo $this->getClass($layout, $col) ?>" <?php echo $this->getData ($layout, $col++) ?>>
<?php if($this->checkSysMsg()):?>
<?php if($this->hasMessage()):?>
<jdoc:include type="message" />
<?php endif; ?>
<jdoc:include type="component" />
Expand Down
2 changes: 1 addition & 1 deletion source/tpl_t3_blank/tpls/blocks/mainbody-content-right.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<!-- MAIN CONTENT -->
<div id="t3-content" class="t3-content <?php echo $this->getClass($layout, $col) ?>" <?php echo $this->getData ($layout, $col++) ?>>
<?php if($this->checkSysMsg()):?>
<?php if($this->hasMessage()):?>
<jdoc:include type="message" />
<?php endif; ?>
<jdoc:include type="component" />
Expand Down
2 changes: 1 addition & 1 deletion source/tpl_t3_blank/tpls/blocks/mainbody.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<!-- MAIN CONTENT -->
<div id="t3-content" class="t3-content <?php echo $this->getClass($layout, $col) ?>" <?php echo $this->getData ($layout, $col++) ?>>
<?php if($this->checkSysMsg()):?>
<?php if($this->hasMessage()):?>
<jdoc:include type="message" />
<?php endif; ?>
<jdoc:include type="component" />
Expand Down

0 comments on commit 334cf77

Please sign in to comment.