Skip to content

Commit

Permalink
MySQL 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Mar 7, 2024
1 parent 31595a3 commit 2cd6641
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/Resources/contao/dca/tl_license_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('doNotCopy'=>true, 'submitOnChange' => true),
'sql' => "char(1) NOT NULL default '0'"
'sql' => "tinyint(1) NOT NULL default '0'",
)
)
);
Expand Down Expand Up @@ -187,18 +187,6 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
$icon = 'invisible.svg';
}

$objPage = Contao\PageModel::findById($row['pid']);

if (!$this->User->isAllowed(Contao\BackendUser::CAN_EDIT_ARTICLES, $objPage->row()))
{
if (!$row['published'])
{
$icon = preg_replace('/\.svg$/i', '_.svg', $icon); // see #8126
}

return Contao\Image::getHtml($icon) . ' ';
}

return '<a href="' . $this->addToUrl($href) . '" title="' . Contao\StringUtil::specialchars($title) . '"' . $attributes . '>' . Contao\Image::getHtml($icon, $label, 'data-state="' . (!$row['published'] ? 1 : 0) . '"') . '</a> ';
}

Expand Down

0 comments on commit 2cd6641

Please sign in to comment.