From d79a430aea2ab8731c965e60d02d3733f5ba1888 Mon Sep 17 00:00:00 2001 From: Manoj L Date: Wed, 26 Jun 2019 12:16:48 +0530 Subject: [PATCH] Update tjreportsfields.php --- plugins/content/tjreportsfields/tjreportsfields.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/content/tjreportsfields/tjreportsfields.php b/plugins/content/tjreportsfields/tjreportsfields.php index 54397be..cebcf68 100644 --- a/plugins/content/tjreportsfields/tjreportsfields.php +++ b/plugins/content/tjreportsfields/tjreportsfields.php @@ -81,6 +81,12 @@ public function __construct(&$subject, $config) */ public function onContentBeforeSave($context, $row, $isNew) { + // Run this plugin only for com_fields.field form + if ($context !== 'com_fields.field') + { + return; + } + // $context = com_fields.field JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_fields/tables'); @@ -182,6 +188,12 @@ public function onContentAfterSave($context, $field, $isNew) */ public function onContentAfterDelete($context, $field) { + // Run this plugin only for com_fields.field form + if ($context !== 'com_fields.field') + { + return; + } + // Call set custom field table name $this->setCustomFieldsTableName($field->context);