Skip to content

Commit

Permalink
Only show versions if the article has been saved at least once (#33412)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil E. Taylor authored Apr 30, 2021
1 parent 3dfaeed commit 9eef041
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo, $user)

$toolbar->cancel('article.cancel', 'JTOOLBAR_CLOSE');

if (ComponentHelper::isEnabled('com_contenthistory') && $this->state->params->get('save_history', 0) && $itemEditable)
{
$toolbar->versions('com_content.article', $this->item->id);
}

if (!$isNew)
{
if (ComponentHelper::isEnabled('com_contenthistory') && $this->state->params->get('save_history', 0) && $itemEditable)
{
$toolbar->versions('com_content.article', $this->item->id);
}

$url = Route::link(
'site',
RouteHelper::getArticleRoute($this->item->id . ':' . $this->item->alias, $this->item->catid, $this->item->language),
Expand Down

0 comments on commit 9eef041

Please sign in to comment.