From 60b3cc1428e62c54d65ed1dca5c28165c4f3a6ad Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Thu, 11 Jan 2018 16:45:29 +0100 Subject: [PATCH] Use a custom toggle parameter for content elements (see contao/core-bundle#1291). --- src/Resources/contao/dca/tl_content.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Resources/contao/dca/tl_content.php b/src/Resources/contao/dca/tl_content.php index fb125e872e..dee4b24fc1 100644 --- a/src/Resources/contao/dca/tl_content.php +++ b/src/Resources/contao/dca/tl_content.php @@ -192,26 +192,26 @@ public function generateFeed() */ public function toggleIcon($row, $href, $label, $title, $icon, $attributes) { - if (\strlen(Input::get('tid'))) + if (\strlen(Input::get('cid'))) { - $this->toggleVisibility(Input::get('tid'), (Input::get('state') == 1), (@func_get_arg(12) ?: null)); + $this->toggleVisibility(Input::get('cid'), (Input::get('state') == 1), (@func_get_arg(12) ?: null)); $this->redirect($this->getReferer()); } - // Check permissions AFTER checking the tid, so hacking attempts are logged + // Check permissions AFTER checking the cid, so hacking attempts are logged if (!$this->User->hasAccess('tl_content::invisible', 'alexf')) { return ''; } - $href .= '&id='.Input::get('id').'&tid='.$row['id'].'&state='.$row['invisible']; + $href .= '&id='.Input::get('id').'&cid='.$row['id'].'&state='.$row['invisible']; if ($row['invisible']) { $icon = 'invisible.svg'; } - return ''.Image::getHtml($icon, $label, 'data-state="' . ($row['invisible'] ? 0 : 1) . '"').' '; + return ''.Image::getHtml($icon, $label, 'data-state="' . ($row['invisible'] ? 0 : 1) . '"').' '; }