From ecd2ee93f3834cb489bf8a02f2157beb9b4053ea Mon Sep 17 00:00:00 2001 From: Manoj L Date: Mon, 24 Jun 2019 16:38:00 +0530 Subject: [PATCH 1/4] Issue #00 chore: Update bump.php --- build/bump.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/bump.php b/build/bump.php index e2ae8e5..e97c595 100644 --- a/build/bump.php +++ b/build/bump.php @@ -50,7 +50,9 @@ function usage($command) $coreXmlFiles = array( '/tjreports/tjreports.xml', '/plugins/actionlog/tjreports/tjreports.xml', - '/plugins/privacy/tjreports/tjreports.xml' + '/plugins/content/tjreportsfields/tjreportsfields.xml', + '/plugins/privacy/tjreports/tjreports.xml', + '/plugins/user/tjreportsindexer/tjreportsindexer.xml' ); $antJobFile = '/build.xml'; From 8c0ceef710774617c391c4d9ed2cceb6f4a9a396 Mon Sep 17 00:00:00 2001 From: twsvaishali Date: Mon, 24 Jun 2019 17:06:30 +0530 Subject: [PATCH 2/4] Reports.php updated to add function get report param Reports.php updated to add function get report param --- tjreports/site/models/reports.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index e0618b9..d8dd411 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -935,6 +935,25 @@ public function getReportLink($reportToLink, $filters) } } + /** + * Method to get id of the report having default set as 1 + * + * @param STRING $pluginName Plugin Name + * + * @return Integer + * + * @since 1.1.0 + */ + public function getReportParams($reportId) + { + $db = JFactory::getDBO(); + JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjreports/tables'); + $reportTable = JTable::getInstance('Tjreport', 'TjreportsTable', array('dbo', $db)); + $reportTable->load($reportId); + + return new JRegistry($reportTable->param); + } + /** * Method to get id of the report having default set as 1 * From d1c32b4b0bdf8774e7f777a2857982c814e63e39 Mon Sep 17 00:00:00 2001 From: Manoj L Date: Mon, 24 Jun 2019 17:21:56 +0530 Subject: [PATCH 3/4] Reports.php updated to add function get report param (#134) Reports.php updated to add function get report param --- tjreports/site/models/reports.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index 7eb3d15..c74b626 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -1213,6 +1213,25 @@ public function getReportLink($reportToLink, $filters) } } + /** + * Method to get id of the report having default set as 1 + * + * @param STRING $pluginName Plugin Name + * + * @return Integer + * + * @since 1.1.0 + */ + public function getReportParams($reportId) + { + $db = JFactory::getDBO(); + JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjreports/tables'); + $reportTable = JTable::getInstance('Tjreport', 'TjreportsTable', array('dbo', $db)); + $reportTable->load($reportId); + + return new JRegistry($reportTable->param); + } + /** * Method to get id of the report having default set as 1 * From d79a430aea2ab8731c965e60d02d3733f5ba1888 Mon Sep 17 00:00:00 2001 From: Manoj L Date: Wed, 26 Jun 2019 12:16:48 +0530 Subject: [PATCH 4/4] 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);