Skip to content

Commit

Permalink
Update tjreportsfields.php
Browse files Browse the repository at this point in the history
  • Loading branch information
manojLondhe authored Jun 26, 2019
1 parent 6d37f1b commit d79a430
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugins/content/tjreportsfields/tjreportsfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit d79a430

Please sign in to comment.