Skip to content

Commit a05b3ed

Browse files
author
JLTRY
committed
Revert "Issue View Attachment in article view #40"
This reverts commit e3f3b4b. Waiting to have a better solution
1 parent d31bfe1 commit a05b3ed

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

Diff for: attachments_for_content/attachments_for_content.php

-5
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ protected function getTextFieldName(&$row, $parent_entity)
162162
{
163163
$text_field_name = 'text';
164164
}
165-
166-
if (($view == 'article') AND ($layout == 'blog') AND ($parent_entity == 'article'))
167-
{
168-
$text_field_name = 'text';
169-
}
170165

171166
return $text_field_name;
172167
}

Diff for: attachments_plugin/attachments.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ public function onContentPrepare(Event $event)
130130
if ( $parent_type == 'com_content' )
131131
{
132132
if (in_array($parent_entity, Array('featured', 'article'))) {
133-
$parent_entity = 'article';
134-
}
133+
return false;
134+
}
135135
if ($parent_entity == 'category.title') {
136136
// Do not add attachments to category titles (Joomla 3 only)
137137
return false;
138-
}
138+
}
139139

140-
140+
$parent_entity = 'category';
141141
}
142142

143143
$input = $this->app->getInput();

0 commit comments

Comments
 (0)