Skip to content

Commit

Permalink
Fix UCM state
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkyKZ committed May 22, 2020
1 parent 442e26b commit a32d93f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/content/joomla/joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,6 @@ public function onContentChangeState($context, $pks, $value)
return true;
}

// Check if this function is enabled.
if (!$this->params->def('email_new_stage', 0) || $context != 'com_content.article')
{
return true;
}

$db = $this->db;
$query = $db->getQuery(true)
->select($db->quoteName('core_content_id'))
Expand All @@ -630,6 +624,12 @@ public function onContentChangeState($context, $pks, $value)
$cctable = new CoreContent($db);
$cctable->publish($ccIds, $value);

// Check if sending email on transition execution is enabled.
if (!$this->params->def('email_new_stage', 0) || $context !== 'com_content.article')
{
return true;
}

$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__users'))
Expand Down

0 comments on commit a32d93f

Please sign in to comment.