From a05b3ed133d9f7459d73dd9fcd0e3c02b6108063 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Thu, 18 Apr 2024 08:21:24 +0200 Subject: [PATCH] Revert "Issue View Attachment in article view #40" This reverts commit e3f3b4baf00a04e2ff74f9fed0d9da86066ca1f5. Waiting to have a better solution --- attachments_for_content/attachments_for_content.php | 5 ----- attachments_plugin/attachments.php | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/attachments_for_content/attachments_for_content.php b/attachments_for_content/attachments_for_content.php index 56fe76a1..f7c40c74 100644 --- a/attachments_for_content/attachments_for_content.php +++ b/attachments_for_content/attachments_for_content.php @@ -162,11 +162,6 @@ protected function getTextFieldName(&$row, $parent_entity) { $text_field_name = 'text'; } - - if (($view == 'article') AND ($layout == 'blog') AND ($parent_entity == 'article')) - { - $text_field_name = 'text'; - } return $text_field_name; } diff --git a/attachments_plugin/attachments.php b/attachments_plugin/attachments.php index 4c81cb08..a39c05f3 100644 --- a/attachments_plugin/attachments.php +++ b/attachments_plugin/attachments.php @@ -130,14 +130,14 @@ public function onContentPrepare(Event $event) if ( $parent_type == 'com_content' ) { if (in_array($parent_entity, Array('featured', 'article'))) { - $parent_entity = 'article'; - } + return false; + } if ($parent_entity == 'category.title') { // Do not add attachments to category titles (Joomla 3 only) return false; - } + } - + $parent_entity = 'category'; } $input = $this->app->getInput();