diff --git a/README.md b/README.md
index 0da94a7e..8bdab87f 100644
--- a/README.md
+++ b/README.md
@@ -22,12 +22,12 @@ max_input_vars = 5000
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Cost Benefit Projection](https://www.staffhealthcbp.com/)
+ *First Build*: 15th June, 2012
-+ *Last Build*: 30th May, 2020
++ *Last Build*: 6th January, 2021
+ *Version*: 3.4.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
-+ *Line count*: **85996**
-+ *File count*: **585**
++ *Line count*: **86905**
++ *File count*: **587**
+ *Folder count*: **103**
> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder).
diff --git a/admin/README.txt b/admin/README.txt
index 0da94a7e..8bdab87f 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -22,12 +22,12 @@ max_input_vars = 5000
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Cost Benefit Projection](https://www.staffhealthcbp.com/)
+ *First Build*: 15th June, 2012
-+ *Last Build*: 30th May, 2020
++ *Last Build*: 6th January, 2021
+ *Version*: 3.4.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
-+ *Line count*: **85996**
-+ *File count*: **585**
++ *Line count*: **86905**
++ *File count*: **587**
+ *Folder count*: **103**
> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder).
diff --git a/admin/access.xml b/admin/access.xml
index 787b9954..de8ec395 100644
--- a/admin/access.xml
+++ b/admin/access.xml
@@ -87,6 +87,7 @@
+
diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css
index 233daabf..11ffa753 100644
--- a/admin/assets/css/admin.css
+++ b/admin/assets/css/admin.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage admin.css
diff --git a/admin/assets/css/causerisk.css b/admin/assets/css/causerisk.css
index 6153244f..335b8501 100644
--- a/admin/assets/css/causerisk.css
+++ b/admin/assets/css/causerisk.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk.css
diff --git a/admin/assets/css/causesrisks.css b/admin/assets/css/causesrisks.css
index af21c555..547b2d47 100644
--- a/admin/assets/css/causesrisks.css
+++ b/admin/assets/css/causesrisks.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causesrisks.css
diff --git a/admin/assets/css/combinedresults.css b/admin/assets/css/combinedresults.css
index 6515ea5e..13d39e83 100644
--- a/admin/assets/css/combinedresults.css
+++ b/admin/assets/css/combinedresults.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage combinedresults.css
diff --git a/admin/assets/css/companies.css b/admin/assets/css/companies.css
index 587c41ff..8d76fe0e 100644
--- a/admin/assets/css/companies.css
+++ b/admin/assets/css/companies.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companies.css
diff --git a/admin/assets/css/company.css b/admin/assets/css/company.css
index e8c5cf13..c6d44fe5 100644
--- a/admin/assets/css/company.css
+++ b/admin/assets/css/company.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.css
diff --git a/admin/assets/css/companyresults.css b/admin/assets/css/companyresults.css
index 8d18d5c6..52cc27d0 100644
--- a/admin/assets/css/companyresults.css
+++ b/admin/assets/css/companyresults.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companyresults.css
diff --git a/admin/assets/css/countries.css b/admin/assets/css/countries.css
index d3a555e7..fd80d90f 100644
--- a/admin/assets/css/countries.css
+++ b/admin/assets/css/countries.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage countries.css
diff --git a/admin/assets/css/country.css b/admin/assets/css/country.css
index 6d6ba4e4..53cf8645 100644
--- a/admin/assets/css/country.css
+++ b/admin/assets/css/country.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage country.css
diff --git a/admin/assets/css/currencies.css b/admin/assets/css/currencies.css
index 953e2a02..b70848cf 100644
--- a/admin/assets/css/currencies.css
+++ b/admin/assets/css/currencies.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currencies.css
diff --git a/admin/assets/css/currency.css b/admin/assets/css/currency.css
index a2f48e2d..0f03cab9 100644
--- a/admin/assets/css/currency.css
+++ b/admin/assets/css/currency.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currency.css
diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css
index 39200570..0ead9a50 100644
--- a/admin/assets/css/dashboard.css
+++ b/admin/assets/css/dashboard.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage dashboard.css
diff --git a/admin/assets/css/health_data.css b/admin/assets/css/health_data.css
index 55fb2869..86b7ff52 100644
--- a/admin/assets/css/health_data.css
+++ b/admin/assets/css/health_data.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data.css
diff --git a/admin/assets/css/health_data_sets.css b/admin/assets/css/health_data_sets.css
index f402f4b2..701c9b26 100644
--- a/admin/assets/css/health_data_sets.css
+++ b/admin/assets/css/health_data_sets.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data_sets.css
diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css
index af4ba2e4..1b08eb11 100644
--- a/admin/assets/css/help_document.css
+++ b/admin/assets/css/help_document.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_document.css
diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css
index a5a8526e..376957b7 100644
--- a/admin/assets/css/help_documents.css
+++ b/admin/assets/css/help_documents.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_documents.css
diff --git a/admin/assets/css/intervention.css b/admin/assets/css/intervention.css
index 3fd50474..db5ab5ca 100644
--- a/admin/assets/css/intervention.css
+++ b/admin/assets/css/intervention.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage intervention.css
diff --git a/admin/assets/css/interventions.css b/admin/assets/css/interventions.css
index b8ac8d16..a87f0825 100644
--- a/admin/assets/css/interventions.css
+++ b/admin/assets/css/interventions.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions.css
diff --git a/admin/assets/css/scaling_factor.css b/admin/assets/css/scaling_factor.css
index 9de72689..75c6711a 100644
--- a/admin/assets/css/scaling_factor.css
+++ b/admin/assets/css/scaling_factor.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.css
diff --git a/admin/assets/css/scaling_factors.css b/admin/assets/css/scaling_factors.css
index 78f46bf5..39dda439 100644
--- a/admin/assets/css/scaling_factors.css
+++ b/admin/assets/css/scaling_factors.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factors.css
diff --git a/admin/assets/css/service_provider.css b/admin/assets/css/service_provider.css
index 7ee492f1..b527e723 100644
--- a/admin/assets/css/service_provider.css
+++ b/admin/assets/css/service_provider.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_provider.css
diff --git a/admin/assets/css/service_providers.css b/admin/assets/css/service_providers.css
index 42d9a922..f79f5c76 100644
--- a/admin/assets/css/service_providers.css
+++ b/admin/assets/css/service_providers.css
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_providers.css
diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js
index 2b8665e6..e2094e9d 100644
--- a/admin/assets/js/admin.js
+++ b/admin/assets/js/admin.js
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage admin.js
diff --git a/admin/controller.php b/admin/controller.php
index b4fae228..cb661641 100644
--- a/admin/controller.php
+++ b/admin/controller.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage controller.php
diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php
index 542373ac..832d614e 100644
--- a/admin/controllers/ajax.json.php
+++ b/admin/controllers/ajax.json.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage ajax.json.php
diff --git a/admin/controllers/causerisk.php b/admin/controllers/causerisk.php
index a58db773..d120018b 100644
--- a/admin/controllers/causerisk.php
+++ b/admin/controllers/causerisk.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk.php
diff --git a/admin/controllers/causesrisks.php b/admin/controllers/causesrisks.php
index 2bb69d9e..a9b95615 100644
--- a/admin/controllers/causesrisks.php
+++ b/admin/controllers/causesrisks.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causesrisks.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerCausesrisks extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Causesrisks');
// get the data to export
diff --git a/admin/controllers/combinedresults.php b/admin/controllers/combinedresults.php
index 3b7d6173..fb33445b 100644
--- a/admin/controllers/combinedresults.php
+++ b/admin/controllers/combinedresults.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage combinedresults.php
diff --git a/admin/controllers/companies.php b/admin/controllers/companies.php
index 3760ee0d..a7ddc502 100644
--- a/admin/controllers/companies.php
+++ b/admin/controllers/companies.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companies.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerCompanies extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Companies');
// get the data to export
@@ -126,7 +126,7 @@ class CostbenefitprojectionControllerCompanies extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// convert to string
$ids = implode('_', $pks);
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=combinedresults&cid='.$ids, false));
diff --git a/admin/controllers/company.php b/admin/controllers/company.php
index ead85c7c..71cd8b64 100644
--- a/admin/controllers/company.php
+++ b/admin/controllers/company.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.php
diff --git a/admin/controllers/companyresults.php b/admin/controllers/companyresults.php
index d1371d9d..fc33146f 100644
--- a/admin/controllers/companyresults.php
+++ b/admin/controllers/companyresults.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companyresults.php
diff --git a/admin/controllers/costbenefitprojection.php b/admin/controllers/costbenefitprojection.php
index cb5315d9..d47716f0 100644
--- a/admin/controllers/costbenefitprojection.php
+++ b/admin/controllers/costbenefitprojection.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage costbenefitprojection.php
diff --git a/admin/controllers/countries.php b/admin/controllers/countries.php
index 8cd27279..fdd6ffa4 100644
--- a/admin/controllers/countries.php
+++ b/admin/controllers/countries.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage countries.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerCountries extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Countries');
// get the data to export
diff --git a/admin/controllers/country.php b/admin/controllers/country.php
index 4b3fc4f1..2fd0f593 100644
--- a/admin/controllers/country.php
+++ b/admin/controllers/country.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage country.php
diff --git a/admin/controllers/currencies.php b/admin/controllers/currencies.php
index a26c8d26..166a9471 100644
--- a/admin/controllers/currencies.php
+++ b/admin/controllers/currencies.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currencies.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerCurrencies extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Currencies');
// get the data to export
diff --git a/admin/controllers/currency.php b/admin/controllers/currency.php
index 58427a72..0e8ba5a8 100644
--- a/admin/controllers/currency.php
+++ b/admin/controllers/currency.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currency.php
diff --git a/admin/controllers/health_data.php b/admin/controllers/health_data.php
index db5c4ee3..7436d27c 100644
--- a/admin/controllers/health_data.php
+++ b/admin/controllers/health_data.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data.php
diff --git a/admin/controllers/health_data_sets.php b/admin/controllers/health_data_sets.php
index e68a0ae0..c4265ada 100644
--- a/admin/controllers/health_data_sets.php
+++ b/admin/controllers/health_data_sets.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data_sets.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerHealth_data_sets extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Health_data_sets');
// get the data to export
@@ -112,5 +112,48 @@ class CostbenefitprojectionControllerHealth_data_sets extends JControllerAdmin
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
return;
+ }
+
+
+ /**
+ * get a bulk export of health_data_sets
+ */
+ public function getBulkExport()
+ {
+ // Check for request forgeries
+ JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
+ // check if export is allowed for this user.
+ $user = JFactory::getUser();
+ $status = 'error';
+ if ($user->authorise('health_data.bulk_export', 'com_costbenefitprojection'))
+ {
+ // Get the model
+ $model = $this->getModel('Health_data_sets');
+ // get the data
+ if (($data = $model->getBulkExport()) !== false)
+ {
+ // now set the data to the spreadsheet
+ $date = JFactory::getDate();
+ try
+ {
+ CostbenefitprojectionHelper::xls($data, 'Health_data_sets_' . $date->format('jS_F_Y'), 'Health_data_sets exported (' . $date->format('jS F, Y') . ')', 'health_data_sets');
+ }
+ catch (\RuntimeException $e)
+ {
+ jexit('Error: ' . $e->getMessage());
+ }
+ }
+ else
+ {
+ // Set error message
+ $message = JText::_('COM_COSTBENEFITPROJECTION_BULK_EXPORT_OF_HEALTH_DATA_SETS_FAILED_SHOULD_THIS_ISSUE_CONTINUE_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR');
+ }
+ }
+ else
+ {
+ // Set error message
+ $message = JText::_('COM_COSTBENEFITPROJECTION_YOU_DO_NOT_HAVE_PERMISSION_TO_DO_A_BULK_EXPORT_OF_HEALTH_DATA_SETS');
+ }
+ $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, $status);
}
}
diff --git a/admin/controllers/help.php b/admin/controllers/help.php
index c98b4b88..f5f25255 100644
--- a/admin/controllers/help.php
+++ b/admin/controllers/help.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help.php
diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php
index bff58743..353be0dc 100644
--- a/admin/controllers/help_document.php
+++ b/admin/controllers/help_document.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_document.php
diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php
index d39f63b0..bda5b150 100644
--- a/admin/controllers/help_documents.php
+++ b/admin/controllers/help_documents.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_documents.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerHelp_documents extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Help_documents');
// get the data to export
diff --git a/admin/controllers/import.php b/admin/controllers/import.php
index 5fc28fe1..8feaa1aa 100644
--- a/admin/controllers/import.php
+++ b/admin/controllers/import.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage import.php
diff --git a/admin/controllers/import_health_data_sets.php b/admin/controllers/import_health_data_sets.php
index 9aaf045d..3f92573e 100644
--- a/admin/controllers/import_health_data_sets.php
+++ b/admin/controllers/import_health_data_sets.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage import_health_data_sets.php
diff --git a/admin/controllers/intervention.php b/admin/controllers/intervention.php
index d17ecea5..8edc77d0 100644
--- a/admin/controllers/intervention.php
+++ b/admin/controllers/intervention.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage intervention.php
diff --git a/admin/controllers/interventions.php b/admin/controllers/interventions.php
index 18846530..e80560d6 100644
--- a/admin/controllers/interventions.php
+++ b/admin/controllers/interventions.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerInterventions extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Interventions');
// get the data to export
diff --git a/admin/controllers/scaling_factor.php b/admin/controllers/scaling_factor.php
index 1d062050..3232a018 100644
--- a/admin/controllers/scaling_factor.php
+++ b/admin/controllers/scaling_factor.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.php
diff --git a/admin/controllers/scaling_factors.php b/admin/controllers/scaling_factors.php
index 72f23426..78e2b136 100644
--- a/admin/controllers/scaling_factors.php
+++ b/admin/controllers/scaling_factors.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factors.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerScaling_factors extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Scaling_factors');
// get the data to export
diff --git a/admin/controllers/service_provider.php b/admin/controllers/service_provider.php
index d43fca57..2b92e85b 100644
--- a/admin/controllers/service_provider.php
+++ b/admin/controllers/service_provider.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_provider.php
diff --git a/admin/controllers/service_providers.php b/admin/controllers/service_providers.php
index b3adf5bb..ccf822d4 100644
--- a/admin/controllers/service_providers.php
+++ b/admin/controllers/service_providers.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_providers.php
@@ -63,7 +63,7 @@ class CostbenefitprojectionControllerService_providers extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
- ArrayHelper::toInteger($pks);
+ $pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Service_providers');
// get the data to export
diff --git a/admin/costbenefitprojection.php b/admin/costbenefitprojection.php
index e7ff585b..2e10cc29 100644
--- a/admin/costbenefitprojection.php
+++ b/admin/costbenefitprojection.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage costbenefitprojection.php
@@ -19,6 +19,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
+
JHtml::_('behavior.tabstate');
// Access check.
diff --git a/admin/helpers/costbenefitprojection.php b/admin/helpers/costbenefitprojection.php
index 19266726..ae450231 100644
--- a/admin/helpers/costbenefitprojection.php
+++ b/admin/helpers/costbenefitprojection.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage costbenefitprojection.php
@@ -20,8 +20,9 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\CMS\Language\Language;
-use Joomla\String\StringHelper;
+use Joomla\CMS\Language\Language;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
@@ -982,9 +983,33 @@ abstract class CostbenefitprojectionHelper
/**
* Greate user and update given table
+ *
+ * @param array $credentials Array('name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string)
+ * @param int $autologin
+ * @param array $params Array('useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int)
+ * @param array $mode 1 = Site Registrations; 0 = Admin Registration; 2 = Custom Helper Method Called registerUser
+ *
+ * @return int|Error User ID on success, or an error.
*/
- public static function createUser($new)
+ public static function createUser($credentials, $autologin = 0,
+ $params = array(
+ 'useractivation' => 0, 'sendpassword' => 1
+ ), $mode = 1
+ )
{
+ // Override mode
+ if ($mode == 2 && method_exists(__CLASS__, 'registerUser'))
+ {
+ // Update params
+ $params['autologin'] = $autologin;
+ // Now Register User
+ return self::registerUser($credentials, $params);
+ }
+ elseif ($mode == 2)
+ {
+ // Fallback to Site Registrations
+ $mode = 1;
+ }
// load the user component language files if there is an error.
$lang = JFactory::getLanguage();
$extension = 'com_users';
@@ -992,53 +1017,113 @@ abstract class CostbenefitprojectionHelper
$language_tag = 'en-GB';
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);
- // load the user regestration model
- $model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');
- // make sure no activation is needed
- $useractivation = self::setParams('com_users','useractivation',0);
- // make sure password is send
- $sendpassword = self::setParams('com_users','sendpassword',1);
- // Check if password was set
- if (isset($new['password']) && isset($new['password2']) && self::checkString($new['password']) && self::checkString($new['password2']))
+ // Load the correct user model.
+ if ($mode == 1) // 1 = Site Registrations
{
- // Use the users passwords
- $password = $new['password'];
- $password2 = $new['password2'];
+ // Load the user site-registration model
+ $model = self::getModel('registration', $base_dir . '/components/' . $extension, 'Users');
}
- else
+ else // 0 = Admin Registration
{
- // Set random password
- $password = self::randomkey(8);
- $password2 = $password;
+ // Load the backend-user model
+ $model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/' . $extension, 'Users');
}
- // set username if not set
- if (!isset($new['username']) || !self::checkString($new['username']))
+ // Check if we have params/config
+ if (self::checkArray($params))
{
- $new['username'] = self::safeString($new['name']);
+ // Make changes to user config
+ foreach ($params as $param => $set)
+ {
+ // If you know of a better path, let me know
+ $params[$param] = self::setParams($extension, $param, $set);
+ }
}
- // linup new user data
+ // Set username to email if not set
+ if (!isset($credentials['username']) || !self::checkString($credentials['username']))
+ {
+ $credentials['username'] = $credentials['email'];
+ }
+ // Lineup new user data array
$data = array(
- 'username' => $new['username'],
- 'name' => $new['name'],
- 'email1' => $new['email'],
- 'password1' => $password, // First password field
- 'password2' => $password2, // Confirm password field
+ 'username' => $credentials['username'],
+ 'name' => $credentials['name'],
'block' => 0 );
- // register the new user
- $userId = $model->register($data);
- // set activation back to default
- self::setParams('com_users','useractivation',$useractivation);
- // set send password back to default
- self::setParams('com_users','sendpassword',$sendpassword);
+ // Added details based on mode
+ if ($mode == 1) // 1 = Site-registration mode
+ {
+ $data['email1'] = $credentials['email'];
+ }
+ else // 0 = Admin-registration mode
+ {
+ $data['email'] = $credentials['email'];
+ $data['registerDate'] = JFactory::getDate()->toSql();
+ }
+ // Check if password was set
+ if ($mode == 1 && (!isset($credentials['password']) || !isset($credentials['password2']) || !self::checkString($credentials['password']) || !self::checkString($credentials['password2'])))
+ {
+ // Set random password when empty password was submitted,
+ // when using the 1 = site-registration mode
+ $credentials['password'] = self::randomkey(8);
+ $credentials['password2'] = $credentials['password'];
+ }
+ // Now Add password if set
+ if (isset($credentials['password']) && isset($credentials['password2']) && self::checkString($credentials['password']) && self::checkString($credentials['password2']))
+ {
+ if ($mode == 1) // 1 = Site-registration mode
+ {
+ $data['password1'] = $credentials['password'];
+ }
+ else // 0 = Admin-registration mode
+ {
+ $data['password'] = $credentials['password'];
+ }
+ $data['password2'] = $credentials['password2'];
+ }
+ // Load the group/s value if set, only for Admin Registration ($mode == 0)
+ if ($mode == 0 && isset($credentials['groups']) && self::checkArray($credentials['groups']))
+ {
+ $data['groups'] = $credentials['groups'];
+ }
+ // Create the new user
+ if ($mode == 1) // 1 = Site-registration mode
+ {
+ $userId = $model->register($data);
+ }
+ else // 0 = Admin-registration mode
+ {
+ $model->save($data);
+ $userId = $model->getState('user.id', 0);
+ }
+ // Check if we have params
+ if (self::checkArray($params))
+ {
+ // Change user params/config back
+ foreach ($params as $param => $set)
+ {
+ // If you know of a better path, let me know
+ self::setParams($extension, $param, $set);
+ }
+ }
// if user is created
if ($userId > 0)
{
+ // Auto Login if Needed
+ if ($autologin && isset($credentials['password']))
+ {
+ // Try to login
+ try{
+ JFactory::getApplication()->login($credentials);
+ } catch (Exception $exception){
+ // Do noting for now, may want to set redirect.
+ }
+ }
+ // Return ID
return $userId;
}
return $model->getError();
}
- protected static function setParams($component,$target,$value)
+ public static function setParams($component,$target,$value)
{
// Get the params and set the new values
$params = JComponentHelper::getParams($component);
@@ -1056,7 +1141,7 @@ abstract class CostbenefitprojectionHelper
// Execute the query
$db->setQuery($query);
- $db->query();
+ $db->execute();
}
return $was;
}
@@ -1083,21 +1168,17 @@ abstract class CostbenefitprojectionHelper
$password2 = $new['password2'];
}
// set username
- if (isset($new['username']) && self::checkString($new['username']))
+ if (!isset($new['username']) || !self::checkString($new['username']))
{
- $new['username'] = self::safeString($new['username']);
+ $new['username'] = $new['email'];
}
- else
- {
- $new['username'] = self::safeString($new['name']);
- }
- // linup update user data
+ // lineup update user data
$data = array(
'id' => $new['id'],
'username' => $new['username'],
'name' => $new['name'],
'email' => $new['email'],
- 'password1' => $password, // First password field
+ 'password' => $password, // First password field
'password2' => $password2, // Confirm password field
'block' => 0 );
// set groups if found
@@ -1258,6 +1339,8 @@ abstract class CostbenefitprojectionHelper
->setLastModifiedBy($modified)
->setTitle($title)
->setSubject($subjectTab);
+ // The file type
+ $file_type = 'Xls';
// set description
if ($description)
{
@@ -1297,21 +1380,46 @@ abstract class CostbenefitprojectionHelper
));
// Add some data
- if (self::checkArray($rows))
+ if (($size = self::checkArray($rows)) !== false)
{
$i = 1;
- foreach ($rows as $array){
+
+ // Based on data size we adapt the behaviour.
+ $xls_mode = 1;
+ if ($size > 3000)
+ {
+ $xls_mode = 3;
+ $file_type = 'Csv';
+ }
+ elseif ($size > 2000)
+ {
+ $xls_mode = 2;
+ }
+
+ // Set active sheet and get it.
+ $active_sheet = $spreadsheet->setActiveSheetIndex(0);
+ foreach ($rows as $array)
+ {
$a = 'A';
- foreach ($array as $value){
- $spreadsheet->setActiveSheetIndex(0)->setCellValue($a.$i, $value);
- if ($i == 1){
- $spreadsheet->getActiveSheet()->getColumnDimension($a)->setAutoSize(true);
- $spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($headerStyles);
- $spreadsheet->getActiveSheet()->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
- } elseif ($a === 'A'){
- $spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($sideStyles);
- } else {
- $spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($normalStyles);
+ foreach ($array as $value)
+ {
+ $active_sheet->setCellValue($a.$i, $value);
+ if ($xls_mode != 3)
+ {
+ if ($i == 1)
+ {
+ $active_sheet->getColumnDimension($a)->setAutoSize(true);
+ $active_sheet->getStyle($a.$i)->applyFromArray($headerStyles);
+ $active_sheet->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
+ }
+ elseif ($a === 'A')
+ {
+ $active_sheet->getStyle($a.$i)->applyFromArray($sideStyles);
+ }
+ elseif ($xls_mode == 1)
+ {
+ $active_sheet->getStyle($a.$i)->applyFromArray($normalStyles);
+ }
}
$a++;
}
@@ -1331,7 +1439,7 @@ abstract class CostbenefitprojectionHelper
// Redirect output to a client's web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
- header('Content-Disposition: attachment;filename="'.$fileName.'.xls"');
+ header('Content-Disposition: attachment;filename="' . $fileName . '.' . strtolower($file_type) .'"');
header('Cache-Control: max-age=0');
// If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1');
@@ -1342,7 +1450,7 @@ abstract class CostbenefitprojectionHelper
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0
- $writer = IOFactory::createWriter($spreadsheet, 'Xls');
+ $writer = IOFactory::createWriter($spreadsheet, $file_type);
$writer->save('php://output');
jexit();
}
diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php
index 6d926d64..8ccb273a 100644
--- a/admin/helpers/headercheck.php
+++ b/admin/helpers/headercheck.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage headercheck.php
diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php
index b1ad262d..11c39b19 100644
--- a/admin/helpers/html/batch_.php
+++ b/admin/helpers/html/batch_.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage batch_.php
diff --git a/admin/helpers/sum.php b/admin/helpers/sum.php
index 982b4912..657bad0b 100644
--- a/admin/helpers/sum.php
+++ b/admin/helpers/sum.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage sum.php
diff --git a/admin/helpers/sumcombine.php b/admin/helpers/sumcombine.php
index c8a5fe38..dd508072 100644
--- a/admin/helpers/sumcombine.php
+++ b/admin/helpers/sumcombine.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage sumcombine.php
diff --git a/admin/language/en-GB/en-GB.com_costbenefitprojection.ini b/admin/language/en-GB/en-GB.com_costbenefitprojection.ini
index 7a0d386a..1d91647d 100644
--- a/admin/language/en-GB/en-GB.com_costbenefitprojection.ini
+++ b/admin/language/en-GB/en-GB.com_costbenefitprojection.ini
@@ -14,6 +14,9 @@ COM_COSTBENEFITPROJECTION_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open i
COM_COSTBENEFITPROJECTION_BACK="Back"
COM_COSTBENEFITPROJECTION_BASIC_METHOD="Basic Method"
COM_COSTBENEFITPROJECTION_BENEFIT="Benefit"
+COM_COSTBENEFITPROJECTION_BETA_RELEASE="Beta Release"
+COM_COSTBENEFITPROJECTION_BULK_EXPORT="Bulk Export"
+COM_COSTBENEFITPROJECTION_BULK_EXPORT_OF_HEALTH_DATA_SETS_FAILED_SHOULD_THIS_ISSUE_CONTINUE_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="Bulk export of health_data_sets failed should this issue continue, please inform your system administrator."
COM_COSTBENEFITPROJECTION_CALCULATED_COSTS_IN_DETAIL="Calculated Costs in Detail"
COM_COSTBENEFITPROJECTION_CAUSERISK="Cause/Risk"
COM_COSTBENEFITPROJECTION_CAUSERISK_ALIAS="Alias"
@@ -97,6 +100,8 @@ COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_CHECKED_IN_1="%d Cause/Risk succes
COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_CHECKED_IN_MORE="%d Causes/Risks successfully checked in."
COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_DELETED="%s Causes/Risks deleted."
COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_DELETED_1="%s Cause/Risk deleted."
+COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_FAILED_PUBLISHING="%s Causes/Risks failed publishing."
+COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_FAILED_PUBLISHING_1="%s Cause/Risk failed publishing."
COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_FEATURED="%s Causes/Risks featured."
COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_FEATURED_1="%s Cause/Risk featured."
COM_COSTBENEFITPROJECTION_CAUSESRISKS_N_ITEMS_PUBLISHED="%s Causes/Risks published."
@@ -183,6 +188,8 @@ COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_CHECKED_IN_1="%d Company successfull
COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_CHECKED_IN_MORE="%d Companies successfully checked in."
COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_DELETED="%s Companies deleted."
COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_DELETED_1="%s Company deleted."
+COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_FAILED_PUBLISHING="%s Companies failed publishing."
+COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_FAILED_PUBLISHING_1="%s Company failed publishing."
COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_FEATURED="%s Companies featured."
COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_FEATURED_1="%s Company featured."
COM_COSTBENEFITPROJECTION_COMPANIES_N_ITEMS_PUBLISHED="%s Companies published."
@@ -497,6 +504,8 @@ COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_CHECKED_IN_1="%d Country successfull
COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_CHECKED_IN_MORE="%d Countries successfully checked in."
COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_DELETED="%s Countries deleted."
COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_DELETED_1="%s Country deleted."
+COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_FAILED_PUBLISHING="%s Countries failed publishing."
+COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_FAILED_PUBLISHING_1="%s Country failed publishing."
COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_FEATURED="%s Countries featured."
COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_FEATURED_1="%s Country featured."
COM_COSTBENEFITPROJECTION_COUNTRIES_N_ITEMS_PUBLISHED="%s Countries published."
@@ -712,6 +721,8 @@ COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_CHECKED_IN_1="%d Currency successfu
COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_CHECKED_IN_MORE="%d Currencies successfully checked in."
COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_DELETED="%s Currencies deleted."
COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_DELETED_1="%s Currency deleted."
+COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_FAILED_PUBLISHING="%s Currencies failed publishing."
+COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_FAILED_PUBLISHING_1="%s Currency failed publishing."
COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_FEATURED="%s Currencies featured."
COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_FEATURED_1="%s Currency featured."
COM_COSTBENEFITPROJECTION_CURRENCIES_N_ITEMS_PUBLISHED="%s Currencies published."
@@ -819,6 +830,7 @@ COM_COSTBENEFITPROJECTION_DAYS_LOST_MORTALITY="Days Lost Mortality"
COM_COSTBENEFITPROJECTION_DAYS_LOST_PRESENTEEISM_DUE_TO_MORBIDITY="Days Lost Presenteeism (due to morbidity)"
COM_COSTBENEFITPROJECTION_DEBUG_MENU="Debug Menu"
COM_COSTBENEFITPROJECTION_DISEASERISK_FACTOR="Disease/Risk Factor"
+COM_COSTBENEFITPROJECTION_DOWNLOAD="download"
COM_COSTBENEFITPROJECTION_DURATION_S_YEAR="Duration: %s year"
COM_COSTBENEFITPROJECTION_DURATION_S_YEARS="Duration: %s years"
COM_COSTBENEFITPROJECTION_EDIT="Edit"
@@ -837,6 +849,8 @@ COM_COSTBENEFITPROJECTION_GENDER_ID="Gender id"
COM_COSTBENEFITPROJECTION_GENDER_NAME="Gender name"
COM_COSTBENEFITPROJECTION_HEALTH_DATA="Health Data"
COM_COSTBENEFITPROJECTION_HEALTH_DATA_AGE_LABEL="Age Group"
+COM_COSTBENEFITPROJECTION_HEALTH_DATA_BULK_EXPORT_BUTTON_ACCESS="Health Data Bulk Export Button Access"
+COM_COSTBENEFITPROJECTION_HEALTH_DATA_BULK_EXPORT_BUTTON_ACCESS_DESC="Allows the users in this group to access the bulk export button."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_CAUSERISK="Causerisk"
COM_COSTBENEFITPROJECTION_HEALTH_DATA_CAUSERISK_LABEL="Cause/Risk"
COM_COSTBENEFITPROJECTION_HEALTH_DATA_COUNTRY="Country"
@@ -930,6 +944,8 @@ COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_CHECKED_IN_1="%d Health Data
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_CHECKED_IN_MORE="%d Health Data Sets successfully checked in."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_DELETED="%s Health Data Sets deleted."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_DELETED_1="%s Health Data deleted."
+COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_FAILED_PUBLISHING="%s Health Data Sets failed publishing."
+COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_FAILED_PUBLISHING_1="%s Health Data failed publishing."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_FEATURED="%s Health Data Sets featured."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_FEATURED_1="%s Health Data featured."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_N_ITEMS_PUBLISHED="%s Health Data Sets published."
@@ -1000,6 +1016,8 @@ COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_1="%d Help Document
COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_MORE="%d Help Documents successfully checked in."
COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_DELETED="%s Help Documents deleted."
COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_DELETED_1="%s Help Document deleted."
+COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_FAILED_PUBLISHING="%s Help Documents failed publishing."
+COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Help Document failed publishing."
COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_FEATURED="%s Help Documents featured."
COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_FEATURED_1="%s Help Document featured."
COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_N_ITEMS_PUBLISHED="%s Help Documents published."
@@ -1046,7 +1064,6 @@ COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_MODIFIED_DATE_LABEL="Modified Date"
COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_NEW="A New Help Document"
COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_NOT_REQUIRED="Not Required"
COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_ORDERING_LABEL="Ordering"
-COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_PERMISSION="Permissions"
COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_PUBLISHING="Publishing"
COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Help Document to customise the alias."
COM_COSTBENEFITPROJECTION_HELP_DOCUMENT_SELECT_AN_OPTION="Select an option"
@@ -1158,6 +1175,8 @@ COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_CHECKED_IN_1="%d Intervention su
COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_CHECKED_IN_MORE="%d Interventions successfully checked in."
COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_DELETED="%s Interventions deleted."
COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_DELETED_1="%s Intervention deleted."
+COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_FAILED_PUBLISHING="%s Interventions failed publishing."
+COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Intervention failed publishing."
COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_FEATURED="%s Interventions featured."
COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_FEATURED_1="%s Intervention featured."
COM_COSTBENEFITPROJECTION_INTERVENTIONS_N_ITEMS_PUBLISHED="%s Interventions published."
@@ -1243,9 +1262,12 @@ COM_COSTBENEFITPROJECTION_INTERVENTION_TYPE_DESCRIPTION="Select the intervention
COM_COSTBENEFITPROJECTION_INTERVENTION_TYPE_LABEL="Type"
COM_COSTBENEFITPROJECTION_INTERVENTION_VERSION_DESC="A count of the number of times this Intervention has been revised."
COM_COSTBENEFITPROJECTION_INTERVENTION_VERSION_LABEL="Version"
+COM_COSTBENEFITPROJECTION_ISSUE="issue"
COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_ACCESS="- Keep Original Access -"
COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -"
COM_COSTBENEFITPROJECTION_KEEP_ORIGINAL_STATE="- Keep Original State -"
+COM_COSTBENEFITPROJECTION_LAST_FEW_RELEASES_FROM_GITHUB_IS_LOADING="Last few releases from Github is loading"
+COM_COSTBENEFITPROJECTION_LATEST_RELEASE="Latest Release"
COM_COSTBENEFITPROJECTION_LICENSE="License"
COM_COSTBENEFITPROJECTION_LOCATION_NAME="Location name"
COM_COSTBENEFITPROJECTION_MAIN_MENU="Main Menu"
@@ -1269,7 +1291,12 @@ COM_COSTBENEFITPROJECTION_NO_DISEASERISK_SELECTED="No Disease/Risk Selected"
COM_COSTBENEFITPROJECTION_NO_INTERVENTION_SELECTED="No Intervention Selected"
COM_COSTBENEFITPROJECTION_NUMBER_OF_WORK_DAYS_LOST="Number of work days lost"
COM_COSTBENEFITPROJECTION_ONLY_USE_THE_ADVANCED_IMPORT_WHEN_IMPORTING_THE_CSV_FILES_FROM_HTTPGHDXHEALTHDATAORG="Only use the advanced import when importing the CSV files from http://ghdx.healthdata.org"
-COM_COSTBENEFITPROJECTION_OPENED_BY="opened by"
+COM_COSTBENEFITPROJECTION_ON_GITHUB="on Github"
+COM_COSTBENEFITPROJECTION_OPEN="Open"
+COM_COSTBENEFITPROJECTION_OPENED="opened"
+COM_COSTBENEFITPROJECTION_OPENED_THIS="opened this"
+COM_COSTBENEFITPROJECTION_OPEN_ON_GITHUB="Open on Github"
+COM_COSTBENEFITPROJECTION_OUT_OF_DATE="Out of date"
COM_COSTBENEFITPROJECTION_PERCENT_OF_BESTIMATED_BURDENB_BEING_TARGETED_BY_THIS_DISEASERISK_SELECTION="Percent of Estimated Burden being targeted by this Disease/Risk selection"
COM_COSTBENEFITPROJECTION_PERCENT_OF_TOTAL_COST="Percent of Total Cost"
COM_COSTBENEFITPROJECTION_PERCENT_OF_TOTAL_DAYS_LOST="Percent of Total Days Lost"
@@ -1280,6 +1307,7 @@ COM_COSTBENEFITPROJECTION_PRESENTEEISM_MORBIDITY="Presenteeism (morbidity)"
COM_COSTBENEFITPROJECTION_PUBLISHED="Published"
COM_COSTBENEFITPROJECTION_REDUCTION_IN_MORBIDITY_COSTS="Reduction in Morbidity Costs"
COM_COSTBENEFITPROJECTION_REDUCTION_IN_MORTALITY_COST="Reduction in Mortality Cost"
+COM_COSTBENEFITPROJECTION_RELEASED_THIS="released this"
COM_COSTBENEFITPROJECTION_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_COSTBENEFITPROJECTION_RESULTS_MENU="Results Menu"
COM_COSTBENEFITPROJECTION_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
@@ -1323,6 +1351,8 @@ COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_CHECKED_IN_1="%d Scaling Facto
COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_CHECKED_IN_MORE="%d Scaling Factors successfully checked in."
COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_DELETED="%s Scaling Factors deleted."
COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_DELETED_1="%s Scaling Factor deleted."
+COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_FAILED_PUBLISHING="%s Scaling Factors failed publishing."
+COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_FAILED_PUBLISHING_1="%s Scaling Factor failed publishing."
COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_FEATURED="%s Scaling Factors featured."
COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_FEATURED_1="%s Scaling Factor featured."
COM_COSTBENEFITPROJECTION_SCALING_FACTORS_N_ITEMS_PUBLISHED="%s Scaling Factors published."
@@ -1436,6 +1466,8 @@ COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_CHECKED_IN_1="%d Service Pro
COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_CHECKED_IN_MORE="%d Service Providers successfully checked in."
COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_DELETED="%s Service Providers deleted."
COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_DELETED_1="%s Service Provider deleted."
+COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_FAILED_PUBLISHING="%s Service Providers failed publishing."
+COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_FAILED_PUBLISHING_1="%s Service Provider failed publishing."
COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_FEATURED="%s Service Providers featured."
COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_FEATURED_1="%s Service Provider featured."
COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_N_ITEMS_PUBLISHED="%s Service Providers published."
@@ -1511,7 +1543,6 @@ COM_COSTBENEFITPROJECTION_TABLES_QUICK_LINKS="Tables ›› Quick Links"
COM_COSTBENEFITPROJECTION_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_COSTBENEFITPROJECTION_THE_README_IS_LOADING="The readme is loading"
COM_COSTBENEFITPROJECTION_THE_STATISTICAL_DATA_COULD_NOT_BE_RETURNED_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="The statistical data could not be returned. Please contact your system administrator."
-COM_COSTBENEFITPROJECTION_THE_WIKI_IS_LOADING="The wiki is loading"
COM_COSTBENEFITPROJECTION_TOTAL="Total"
COM_COSTBENEFITPROJECTION_TOTAL_COST="Total Cost"
COM_COSTBENEFITPROJECTION_TOTAL_COSTS="Total Costs"
@@ -1520,6 +1551,7 @@ COM_COSTBENEFITPROJECTION_TOTAL_COST_PER_DISEASERISK_FACTOR="Total Cost Per Dise
COM_COSTBENEFITPROJECTION_TOTAL_DAYS_LOST="Total Days Lost"
COM_COSTBENEFITPROJECTION_TOTAL_DAYS_LOST_AND_CONTRIBUTION_OF_MORBIDITY_MORTALITY_AND_RISK_FACTORS="Total Days Lost and Contribution of Morbidity, Mortality and Risk Factors"
COM_COSTBENEFITPROJECTION_TOTAL_DAYS_LOST_PER_DISEASERISK_FACTOR="Total Days Lost Per Disease/Risk Factor"
+COM_COSTBENEFITPROJECTION_TOTAL_DOWNLOADS="total downloads"
COM_COSTBENEFITPROJECTION_TOTAL_EMPLOYEESBR_IN_RELATION_TO_THIS_NUMBER="total employees
in relation to this number."
COM_COSTBENEFITPROJECTION_TOTAL_EMPLOYEESBR_IN_RELATION_TO_THIS_TOTAL="total employees
in relation to this total."
COM_COSTBENEFITPROJECTION_TRASHED="Trashed"
@@ -1533,6 +1565,7 @@ COM_COSTBENEFITPROJECTION_TYPE_INTERVENTION="Intervention"
COM_COSTBENEFITPROJECTION_TYPE_SCALING_FACTOR="Scaling Factor"
COM_COSTBENEFITPROJECTION_TYPE_SERVICE_PROVIDER="Service Provider"
COM_COSTBENEFITPROJECTION_UNAVAILABLE_AT_THIS_TIME="Unavailable at this time."
+COM_COSTBENEFITPROJECTION_UP_TO_DATE="Up to date"
COM_COSTBENEFITPROJECTION_USER_COUNTRY_GROUP="User Country Group"
COM_COSTBENEFITPROJECTION_USER_MEMBER_GROUP="User Member Group"
COM_COSTBENEFITPROJECTION_USER_SERVICE_PROVIDER_GROUP="User Service Provider Group"
@@ -1540,6 +1573,7 @@ COM_COSTBENEFITPROJECTION_USE_BATCH="Use Batch"
COM_COSTBENEFITPROJECTION_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_COSTBENEFITPROJECTION_VERSION="Version"
COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github"
+COM_COSTBENEFITPROJECTION_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github"
COM_COSTBENEFITPROJECTION_WARNING="Warning"
COM_COSTBENEFITPROJECTION_WEBSITE="Website"
COM_COSTBENEFITPROJECTION_WORK_DAYS_LOST="Work Days Lost"
@@ -1547,5 +1581,6 @@ COM_COSTBENEFITPROJECTION_WORK_DAYS_LOST_PERCENT="Work Days Lost Percent"
COM_COSTBENEFITPROJECTION_WORK_DAYS_LOST_SUMMARY="Work Days Lost Summary"
COM_COSTBENEFITPROJECTION_WORK_DAY_LOST_PERCENT="Work Day Lost Percent"
COM_COSTBENEFITPROJECTION_YEAR="Year"
+COM_COSTBENEFITPROJECTION_YOU_DO_NOT_HAVE_PERMISSION_TO_DO_A_BULK_EXPORT_OF_HEALTH_DATA_SETS="You do not have permission to do a bulk export of health_data_sets."
COM_COSTBENEFITPROJECTION__OF_ALL_HEALTHCARE_COSTS_CAUSED_BY_THE_CAUSERISK_FACTOR="% of all healthcare costs caused by the cause/risk factor"
COM_COSTBENEFITPROJECTION__OF_WORK_DAYS_LOST_DUE_TO_THE_CAUSERISK_FACTOR="% of work days lost due to the cause/risk factor"
\ No newline at end of file
diff --git a/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini b/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini
index 34d0020b..0889ec26 100644
--- a/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini
+++ b/admin/language/en-GB/en-GB.com_costbenefitprojection.sys.ini
@@ -152,6 +152,8 @@ COM_COSTBENEFITPROJECTION_EDIT_VERSIONS="Edit Version"
COM_COSTBENEFITPROJECTION_EDIT_VERSIONS_DESC="Allows users in this group to edit versions."
COM_COSTBENEFITPROJECTION_EXPORT_DATA="Export Data"
COM_COSTBENEFITPROJECTION_EXPORT_DATA_DESC="Allows users in this group to export data."
+COM_COSTBENEFITPROJECTION_HEALTH_DATA_BULK_EXPORT_BUTTON_ACCESS="Health Data Bulk Export Button Access"
+COM_COSTBENEFITPROJECTION_HEALTH_DATA_BULK_EXPORT_BUTTON_ACCESS_DESC="Allows the users in this group to access the bulk export button."
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS="Health Data Sets Access"
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS_DESC="Allows the users in this group to access access health data sets"
COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_BATCH_USE="Health Data Sets Batch Use"
diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php
index 432dc4fd..a7dbecdd 100644
--- a/admin/layouts/batchselection.php
+++ b/admin/layouts/batchselection.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage batchselection.php
diff --git a/admin/layouts/causerisk/details_above.php b/admin/layouts/causerisk/details_above.php
index 3d8530fe..57cb29bc 100644
--- a/admin/layouts/causerisk/details_above.php
+++ b/admin/layouts/causerisk/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/causerisk/details_fullwidth.php b/admin/layouts/causerisk/details_fullwidth.php
index a58d85ba..981db21a 100644
--- a/admin/layouts/causerisk/details_fullwidth.php
+++ b/admin/layouts/causerisk/details_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_fullwidth.php
diff --git a/admin/layouts/causerisk/details_left.php b/admin/layouts/causerisk/details_left.php
index 7bebf9c1..408dcb80 100644
--- a/admin/layouts/causerisk/details_left.php
+++ b/admin/layouts/causerisk/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/causerisk/details_right.php b/admin/layouts/causerisk/details_right.php
index df85c855..0b6356a0 100644
--- a/admin/layouts/causerisk/details_right.php
+++ b/admin/layouts/causerisk/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/causerisk/publishing.php b/admin/layouts/causerisk/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/causerisk/publishing.php
+++ b/admin/layouts/causerisk/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/causerisk/publlshing.php b/admin/layouts/causerisk/publlshing.php
index 459bc81d..f9fb69fd 100644
--- a/admin/layouts/causerisk/publlshing.php
+++ b/admin/layouts/causerisk/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/company/age_groups_percentages_fullwidth.php b/admin/layouts/company/age_groups_percentages_fullwidth.php
index 90b12b0e..d84c13b3 100644
--- a/admin/layouts/company/age_groups_percentages_fullwidth.php
+++ b/admin/layouts/company/age_groups_percentages_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_fullwidth.php
diff --git a/admin/layouts/company/age_groups_percentages_left.php b/admin/layouts/company/age_groups_percentages_left.php
index 2228abf9..c4055545 100644
--- a/admin/layouts/company/age_groups_percentages_left.php
+++ b/admin/layouts/company/age_groups_percentages_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_left.php
diff --git a/admin/layouts/company/age_groups_percentages_right.php b/admin/layouts/company/age_groups_percentages_right.php
index 0fff564c..ae238030 100644
--- a/admin/layouts/company/age_groups_percentages_right.php
+++ b/admin/layouts/company/age_groups_percentages_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_right.php
diff --git a/admin/layouts/company/causerisk_selection_fullwidth.php b/admin/layouts/company/causerisk_selection_fullwidth.php
index 1342061c..9e65dd44 100644
--- a/admin/layouts/company/causerisk_selection_fullwidth.php
+++ b/admin/layouts/company/causerisk_selection_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk_selection_fullwidth.php
diff --git a/admin/layouts/company/details_above.php b/admin/layouts/company/details_above.php
index f662a99a..942cbccc 100644
--- a/admin/layouts/company/details_above.php
+++ b/admin/layouts/company/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/company/details_left.php b/admin/layouts/company/details_left.php
index 57938987..6ed8e7d8 100644
--- a/admin/layouts/company/details_left.php
+++ b/admin/layouts/company/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/company/details_right.php b/admin/layouts/company/details_right.php
index 6c345485..22ccf773 100644
--- a/admin/layouts/company/details_right.php
+++ b/admin/layouts/company/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/company/details_under.php b/admin/layouts/company/details_under.php
index 5a6e6ded..0b043c60 100644
--- a/admin/layouts/company/details_under.php
+++ b/admin/layouts/company/details_under.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_under.php
diff --git a/admin/layouts/company/interventions_fullwidth.php b/admin/layouts/company/interventions_fullwidth.php
index 82f96889..7ceb502e 100644
--- a/admin/layouts/company/interventions_fullwidth.php
+++ b/admin/layouts/company/interventions_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions_fullwidth.php
@@ -117,25 +117,25 @@ $can = CostbenefitprojectionHelper::getActions('intervention');
escape($item->duration); ?>
|
- published == 1):?>
+ published == 1): ?>
|
- published == 0):?>
+ published == 0): ?>
|
- published == 2):?>
+ published == 2): ?>
|
- published == -2):?>
+ published == -2): ?>
diff --git a/admin/layouts/company/publishing.php b/admin/layouts/company/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/company/publishing.php
+++ b/admin/layouts/company/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/company/publlshing.php b/admin/layouts/company/publlshing.php
index 459bc81d..f9fb69fd 100644
--- a/admin/layouts/company/publlshing.php
+++ b/admin/layouts/company/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/company/scaling_factors_fullwidth.php b/admin/layouts/company/scaling_factors_fullwidth.php
index bfa4b384..5ce9d3a6 100644
--- a/admin/layouts/company/scaling_factors_fullwidth.php
+++ b/admin/layouts/company/scaling_factors_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factors_fullwidth.php
@@ -122,25 +122,25 @@ else
|
escape($item->presenteeism_scaling_factor_females); ?>
|
- published == 1):?>
+ published == 1): ?>
|
- published == 0):?>
+ published == 0): ?>
|
- published == 2):?>
+ published == 2): ?>
|
- published == -2):?>
+ published == -2): ?>
diff --git a/admin/layouts/country/age_groups_percentages_left.php b/admin/layouts/country/age_groups_percentages_left.php
index 2228abf9..c4055545 100644
--- a/admin/layouts/country/age_groups_percentages_left.php
+++ b/admin/layouts/country/age_groups_percentages_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_left.php
diff --git a/admin/layouts/country/age_groups_percentages_right.php b/admin/layouts/country/age_groups_percentages_right.php
index 0fff564c..ae238030 100644
--- a/admin/layouts/country/age_groups_percentages_right.php
+++ b/admin/layouts/country/age_groups_percentages_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage age_groups_percentages_right.php
diff --git a/admin/layouts/country/causerisk_selection_fullwidth.php b/admin/layouts/country/causerisk_selection_fullwidth.php
index 66c0f4d4..f11d4f9a 100644
--- a/admin/layouts/country/causerisk_selection_fullwidth.php
+++ b/admin/layouts/country/causerisk_selection_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk_selection_fullwidth.php
diff --git a/admin/layouts/country/companies_fullwidth.php b/admin/layouts/country/companies_fullwidth.php
index 944597dd..6f818976 100644
--- a/admin/layouts/country/companies_fullwidth.php
+++ b/admin/layouts/country/companies_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companies_fullwidth.php
@@ -132,25 +132,25 @@ $can = CostbenefitprojectionHelper::getActions('company');
|
per); ?>
|
- published == 1):?>
+ published == 1): ?>
|
- published == 0):?>
+ published == 0): ?>
|
- published == 2):?>
+ published == 2): ?>
|
- published == -2):?>
+ published == -2): ?>
diff --git a/admin/layouts/country/details_above.php b/admin/layouts/country/details_above.php
index cf649ede..b3f83ce4 100644
--- a/admin/layouts/country/details_above.php
+++ b/admin/layouts/country/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/country/details_left.php b/admin/layouts/country/details_left.php
index cdd5435a..f4b794dc 100644
--- a/admin/layouts/country/details_left.php
+++ b/admin/layouts/country/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/country/details_right.php b/admin/layouts/country/details_right.php
index 7b14f76b..86976d15 100644
--- a/admin/layouts/country/details_right.php
+++ b/admin/layouts/country/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/country/health_data_totals_left.php b/admin/layouts/country/health_data_totals_left.php
index 9b302cb8..56b89f74 100644
--- a/admin/layouts/country/health_data_totals_left.php
+++ b/admin/layouts/country/health_data_totals_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data_totals_left.php
diff --git a/admin/layouts/country/health_data_totals_right.php b/admin/layouts/country/health_data_totals_right.php
index b97331a5..c7867ac0 100644
--- a/admin/layouts/country/health_data_totals_right.php
+++ b/admin/layouts/country/health_data_totals_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data_totals_right.php
diff --git a/admin/layouts/country/interventions_fullwidth.php b/admin/layouts/country/interventions_fullwidth.php
index 43ab923f..de3f65fd 100644
--- a/admin/layouts/country/interventions_fullwidth.php
+++ b/admin/layouts/country/interventions_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions_fullwidth.php
@@ -121,25 +121,25 @@ $can = CostbenefitprojectionHelper::getActions('intervention');
|
escape($item->duration); ?>
|
- published == 1):?>
+ published == 1): ?>
|
- published == 0):?>
+ published == 0): ?>
|
- published == 2):?>
+ published == 2): ?>
|
- published == -2):?>
+ published == -2): ?>
diff --git a/admin/layouts/country/public_details_fullwidth.php b/admin/layouts/country/public_details_fullwidth.php
index e89b2343..9b583915 100644
--- a/admin/layouts/country/public_details_fullwidth.php
+++ b/admin/layouts/country/public_details_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage public_details_fullwidth.php
diff --git a/admin/layouts/country/publishing.php b/admin/layouts/country/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/country/publishing.php
+++ b/admin/layouts/country/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/country/publlshing.php b/admin/layouts/country/publlshing.php
index 459bc81d..f9fb69fd 100644
--- a/admin/layouts/country/publlshing.php
+++ b/admin/layouts/country/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/country/service_providers_fullwidth.php b/admin/layouts/country/service_providers_fullwidth.php
index 5dd90d74..987bcd6c 100644
--- a/admin/layouts/country/service_providers_fullwidth.php
+++ b/admin/layouts/country/service_providers_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_providers_fullwidth.php
@@ -117,25 +117,25 @@ $can = CostbenefitprojectionHelper::getActions('service_provider');
|
escape($item->publicaddress); ?>
|
- published == 1):?>
+ published == 1): ?>
|
- published == 0):?>
+ published == 0): ?>
|
- published == 2):?>
+ published == 2): ?>
|
- published == -2):?>
+ published == -2): ?>
diff --git a/admin/layouts/currency/details_above.php b/admin/layouts/currency/details_above.php
index d858d563..0d087a82 100644
--- a/admin/layouts/currency/details_above.php
+++ b/admin/layouts/currency/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/currency/details_left.php b/admin/layouts/currency/details_left.php
index ebbf4330..ef750b8e 100644
--- a/admin/layouts/currency/details_left.php
+++ b/admin/layouts/currency/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/currency/details_right.php b/admin/layouts/currency/details_right.php
index 527e97a1..909437cf 100644
--- a/admin/layouts/currency/details_right.php
+++ b/admin/layouts/currency/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/currency/publishing.php b/admin/layouts/currency/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/currency/publishing.php
+++ b/admin/layouts/currency/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/currency/publlshing.php b/admin/layouts/currency/publlshing.php
index 459bc81d..f9fb69fd 100644
--- a/admin/layouts/currency/publlshing.php
+++ b/admin/layouts/currency/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/databreakdownmalefemale.php b/admin/layouts/databreakdownmalefemale.php
index 7388bc43..ede62762 100644
--- a/admin/layouts/databreakdownmalefemale.php
+++ b/admin/layouts/databreakdownmalefemale.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage databreakdownmalefemale.php
diff --git a/admin/layouts/health_data/details_above.php b/admin/layouts/health_data/details_above.php
index 1842b75e..9af8f01f 100644
--- a/admin/layouts/health_data/details_above.php
+++ b/admin/layouts/health_data/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/health_data/details_left.php b/admin/layouts/health_data/details_left.php
index d6dbedf1..c85a175d 100644
--- a/admin/layouts/health_data/details_left.php
+++ b/admin/layouts/health_data/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/health_data/details_right.php b/admin/layouts/health_data/details_right.php
index d9490014..7d5cfcf1 100644
--- a/admin/layouts/health_data/details_right.php
+++ b/admin/layouts/health_data/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/health_data/details_rightside.php b/admin/layouts/health_data/details_rightside.php
index 4303eab3..5ab50b61 100644
--- a/admin/layouts/health_data/details_rightside.php
+++ b/admin/layouts/health_data/details_rightside.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_rightside.php
diff --git a/admin/layouts/health_data/publishing.php b/admin/layouts/health_data/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/health_data/publishing.php
+++ b/admin/layouts/health_data/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/health_data/publlshing.php b/admin/layouts/health_data/publlshing.php
index 459bc81d..f9fb69fd 100644
--- a/admin/layouts/health_data/publlshing.php
+++ b/admin/layouts/health_data/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php
index e5ce9c67..94714eb8 100644
--- a/admin/layouts/help_document/details_above.php
+++ b/admin/layouts/help_document/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php
index bbeb210f..4e5fc57d 100644
--- a/admin/layouts/help_document/details_fullwidth.php
+++ b/admin/layouts/help_document/details_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_fullwidth.php
diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php
index 7272a518..c60e7041 100644
--- a/admin/layouts/help_document/details_left.php
+++ b/admin/layouts/help_document/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php
index 9ef249a7..c796089d 100644
--- a/admin/layouts/help_document/details_right.php
+++ b/admin/layouts/help_document/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php
index 5a6e6ded..0b043c60 100644
--- a/admin/layouts/help_document/details_under.php
+++ b/admin/layouts/help_document/details_under.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_under.php
diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php
index 052e3894..6af480c4 100644
--- a/admin/layouts/help_document/publishing.php
+++ b/admin/layouts/help_document/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php
index 9adbd116..7767bba7 100644
--- a/admin/layouts/help_document/publlshing.php
+++ b/admin/layouts/help_document/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/intervention/details_above.php b/admin/layouts/intervention/details_above.php
index 6501caa4..824120c6 100644
--- a/admin/layouts/intervention/details_above.php
+++ b/admin/layouts/intervention/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/intervention/details_fullwidth.php b/admin/layouts/intervention/details_fullwidth.php
index 1b971196..a684b291 100644
--- a/admin/layouts/intervention/details_fullwidth.php
+++ b/admin/layouts/intervention/details_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_fullwidth.php
diff --git a/admin/layouts/intervention/details_under.php b/admin/layouts/intervention/details_under.php
index 5a6e6ded..0b043c60 100644
--- a/admin/layouts/intervention/details_under.php
+++ b/admin/layouts/intervention/details_under.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_under.php
diff --git a/admin/layouts/intervention/publishing.php b/admin/layouts/intervention/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/intervention/publishing.php
+++ b/admin/layouts/intervention/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/intervention/publlshing.php b/admin/layouts/intervention/publlshing.php
index 9adbd116..7767bba7 100644
--- a/admin/layouts/intervention/publlshing.php
+++ b/admin/layouts/intervention/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/intervention/settings_fullwidth.php b/admin/layouts/intervention/settings_fullwidth.php
index cce94596..ae887369 100644
--- a/admin/layouts/intervention/settings_fullwidth.php
+++ b/admin/layouts/intervention/settings_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage settings_fullwidth.php
diff --git a/admin/layouts/intervention/settings_left.php b/admin/layouts/intervention/settings_left.php
index a234c014..f41c46a9 100644
--- a/admin/layouts/intervention/settings_left.php
+++ b/admin/layouts/intervention/settings_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage settings_left.php
diff --git a/admin/layouts/scaling_factor/details_above.php b/admin/layouts/scaling_factor/details_above.php
index 3436e420..88d019c5 100644
--- a/admin/layouts/scaling_factor/details_above.php
+++ b/admin/layouts/scaling_factor/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/scaling_factor/details_left.php b/admin/layouts/scaling_factor/details_left.php
index 73d5ca27..26c411f9 100644
--- a/admin/layouts/scaling_factor/details_left.php
+++ b/admin/layouts/scaling_factor/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/scaling_factor/details_right.php b/admin/layouts/scaling_factor/details_right.php
index a5e0c076..6a1160e2 100644
--- a/admin/layouts/scaling_factor/details_right.php
+++ b/admin/layouts/scaling_factor/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/scaling_factor/publishing.php b/admin/layouts/scaling_factor/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/scaling_factor/publishing.php
+++ b/admin/layouts/scaling_factor/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/scaling_factor/publlshing.php b/admin/layouts/scaling_factor/publlshing.php
index 9adbd116..7767bba7 100644
--- a/admin/layouts/scaling_factor/publlshing.php
+++ b/admin/layouts/scaling_factor/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/layouts/service_provider/companies_fullwidth.php b/admin/layouts/service_provider/companies_fullwidth.php
index 5794f0d3..1a2ba105 100644
--- a/admin/layouts/service_provider/companies_fullwidth.php
+++ b/admin/layouts/service_provider/companies_fullwidth.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companies_fullwidth.php
@@ -132,25 +132,25 @@ $can = CostbenefitprojectionHelper::getActions('company');
|
per); ?>
|
- published == 1):?>
+ published == 1): ?>
|
- published == 0):?>
+ published == 0): ?>
|
- published == 2):?>
+ published == 2): ?>
|
- published == -2):?>
+ published == -2): ?>
diff --git a/admin/layouts/service_provider/details_above.php b/admin/layouts/service_provider/details_above.php
index b26c8b22..6fef302d 100644
--- a/admin/layouts/service_provider/details_above.php
+++ b/admin/layouts/service_provider/details_above.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_above.php
diff --git a/admin/layouts/service_provider/details_left.php b/admin/layouts/service_provider/details_left.php
index 58cb5d00..5c40310a 100644
--- a/admin/layouts/service_provider/details_left.php
+++ b/admin/layouts/service_provider/details_left.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_left.php
diff --git a/admin/layouts/service_provider/details_right.php b/admin/layouts/service_provider/details_right.php
index 75a9eb0c..0554ad9f 100644
--- a/admin/layouts/service_provider/details_right.php
+++ b/admin/layouts/service_provider/details_right.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage details_right.php
diff --git a/admin/layouts/service_provider/publishing.php b/admin/layouts/service_provider/publishing.php
index 052e3894..1c812463 100644
--- a/admin/layouts/service_provider/publishing.php
+++ b/admin/layouts/service_provider/publishing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publishing.php
@@ -34,6 +34,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'title',
'created',
'created_by',
'modified',
diff --git a/admin/layouts/service_provider/publlshing.php b/admin/layouts/service_provider/publlshing.php
index 9adbd116..7767bba7 100644
--- a/admin/layouts/service_provider/publlshing.php
+++ b/admin/layouts/service_provider/publlshing.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage publlshing.php
diff --git a/admin/models/ajax.php b/admin/models/ajax.php
index 3c3d46e6..6c7f95bc 100644
--- a/admin/models/ajax.php
+++ b/admin/models/ajax.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage ajax.php
@@ -235,14 +235,14 @@ public function getInterventionBuildTable($idName,$oject,$cluster)
}
return $new;
}
-
+
/**
* Check and if a vdm notice is new (per/user)
**/
public function isNew($notice)
{
// first get the file path
- $path_filename = CostbenefitprojectionHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR);
+ $path_filename = CostbenefitprojectionHelper::getFilePath('path', 'usernotice', 'md', JFactory::getUser()->username, JPATH_COMPONENT_ADMINISTRATOR);
// check if the file is set
if (($content = @file_get_contents($path_filename)) !== FALSE)
{
@@ -260,7 +260,7 @@ public function getInterventionBuildTable($idName,$oject,$cluster)
public function isRead($notice)
{
// first get the file path
- $path_filename = CostbenefitprojectionHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR);
+ $path_filename = CostbenefitprojectionHelper::getFilePath('path', 'usernotice', 'md', JFactory::getUser()->username, JPATH_COMPONENT_ADMINISTRATOR);
// set as read if not already set
if (($content = @file_get_contents($path_filename)) !== FALSE)
{
diff --git a/admin/models/causerisk.php b/admin/models/causerisk.php
index d92e860a..99f20e5c 100644
--- a/admin/models/causerisk.php
+++ b/admin/models/causerisk.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
diff --git a/admin/models/causesrisks.php b/admin/models/causesrisks.php
index 6a97ed4a..f9feb839 100644
--- a/admin/models/causesrisks.php
+++ b/admin/models/causesrisks.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causesrisks.php
@@ -34,6 +34,7 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
+ 'a.access','access',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
@@ -44,11 +45,17 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -58,30 +65,31 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
+
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$ref = $this->getUserStateFromRequest($this->context . '.filter.ref', 'filter_ref');
$this->setState('filter.ref', $ref);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
@@ -159,9 +167,17 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -187,7 +203,7 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -207,7 +223,7 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -225,7 +241,24 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
// From the costbenefitprojection_causerisk table
$query->from($db->quoteName('#__costbenefitprojection_causerisk', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
{
@@ -313,6 +346,7 @@ class CostbenefitprojectionModelCausesrisks extends JModelList
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
+ $id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
diff --git a/admin/models/combinedresults.php b/admin/models/combinedresults.php
index 9de3ab11..2a40eba1 100644
--- a/admin/models/combinedresults.php
+++ b/admin/models/combinedresults.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage combinedresults.php
diff --git a/admin/models/companies.php b/admin/models/companies.php
index 03b3cfb2..185193ed 100644
--- a/admin/models/companies.php
+++ b/admin/models/companies.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companies.php
@@ -34,25 +34,32 @@ class CostbenefitprojectionModelCompanies extends JModelList
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
+ 'a.access','access',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
- 'a.name','name',
- 'g.name',
'a.department','department',
- 'h.name',
- 'i.user',
- 'a.per','per'
+ 'h.name','country',
+ 'i.user','service_provider',
+ 'a.per','per',
+ 'a.name','name',
+ 'g.name','user'
);
}
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -62,12 +69,25 @@ class CostbenefitprojectionModelCompanies extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
- $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
- $this->setState('filter.name', $name);
+ }
- $user = $this->getUserStateFromRequest($this->context . '.filter.user', 'filter_user');
- $this->setState('filter.user', $user);
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
$department = $this->getUserStateFromRequest($this->context . '.filter.department', 'filter_department');
$this->setState('filter.department', $department);
@@ -79,25 +99,13 @@ class CostbenefitprojectionModelCompanies extends JModelList
$this->setState('filter.service_provider', $service_provider);
$per = $this->getUserStateFromRequest($this->context . '.filter.per', 'filter_per');
- $this->setState('filter.per', $per);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
+ $this->setState('filter.per', $per);
+
+ $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
+ $this->setState('filter.name', $name);
+
+ $user = $this->getUserStateFromRequest($this->context . '.filter.user', 'filter_user');
+ $this->setState('filter.user', $user);
// List state information.
parent::populateState($ordering, $direction);
@@ -253,9 +261,17 @@ class CostbenefitprojectionModelCompanies extends JModelList
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -279,29 +295,77 @@ class CostbenefitprojectionModelCompanies extends JModelList
}
// Filter by Department.
- if ($department = $this->getState('filter.department'))
+ $_department = $this->getState('filter.department');
+ if (is_numeric($_department))
{
- $query->where('a.department = ' . $db->quote($db->escape($department)));
+ if (is_float($_department))
+ {
+ $query->where('a.department = ' . (float) $_department);
+ }
+ else
+ {
+ $query->where('a.department = ' . (int) $_department);
+ }
}
- // Filter by country.
- if ($country = $this->getState('filter.country'))
+ elseif (CostbenefitprojectionHelper::checkString($_department))
{
- $query->where('a.country = ' . $db->quote($db->escape($country)));
+ $query->where('a.department = ' . $db->quote($db->escape($_department)));
}
- // Filter by service_provider.
- if ($service_provider = $this->getState('filter.service_provider'))
+ // Filter by Country.
+ $_country = $this->getState('filter.country');
+ if (is_numeric($_country))
{
- $query->where('a.service_provider = ' . $db->quote($db->escape($service_provider)));
+ if (is_float($_country))
+ {
+ $query->where('a.country = ' . (float) $_country);
+ }
+ else
+ {
+ $query->where('a.country = ' . (int) $_country);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_country))
+ {
+ $query->where('a.country = ' . $db->quote($db->escape($_country)));
+ }
+ // Filter by Service_provider.
+ $_service_provider = $this->getState('filter.service_provider');
+ if (is_numeric($_service_provider))
+ {
+ if (is_float($_service_provider))
+ {
+ $query->where('a.service_provider = ' . (float) $_service_provider);
+ }
+ else
+ {
+ $query->where('a.service_provider = ' . (int) $_service_provider);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_service_provider))
+ {
+ $query->where('a.service_provider = ' . $db->quote($db->escape($_service_provider)));
}
// Filter by Per.
- if ($per = $this->getState('filter.per'))
+ $_per = $this->getState('filter.per');
+ if (is_numeric($_per))
{
- $query->where('a.per = ' . $db->quote($db->escape($per)));
+ if (is_float($_per))
+ {
+ $query->where('a.per = ' . (float) $_per);
+ }
+ else
+ {
+ $query->where('a.per = ' . (int) $_per);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_per))
+ {
+ $query->where('a.per = ' . $db->quote($db->escape($_per)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -321,7 +385,7 @@ class CostbenefitprojectionModelCompanies extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -339,7 +403,24 @@ class CostbenefitprojectionModelCompanies extends JModelList
// From the costbenefitprojection_company table
$query->from($db->quoteName('#__costbenefitprojection_company', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Filter by companies (admin sees all)
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -489,15 +570,16 @@ class CostbenefitprojectionModelCompanies extends JModelList
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
+ $id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
- $id .= ':' . $this->getState('filter.name');
- $id .= ':' . $this->getState('filter.user');
$id .= ':' . $this->getState('filter.department');
$id .= ':' . $this->getState('filter.country');
$id .= ':' . $this->getState('filter.service_provider');
- $id .= ':' . $this->getState('filter.per');
+ $id .= ':' . $this->getState('filter.per');
+ $id .= ':' . $this->getState('filter.name');
+ $id .= ':' . $this->getState('filter.user');
return parent::getStoreId($id);
}
diff --git a/admin/models/company.php b/admin/models/company.php
index a893f2fc..b7fd1932 100644
--- a/admin/models/company.php
+++ b/admin/models/company.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -918,7 +918,7 @@ class CostbenefitprojectionModelCompany extends JModelAdmin
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
- if (CostbenefitprojectionHelper::checkString($data['not_required']))
+ if (isset($data['not_required']) && CostbenefitprojectionHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
diff --git a/admin/models/companyresults.php b/admin/models/companyresults.php
index 02e89438..e157a1bf 100644
--- a/admin/models/companyresults.php
+++ b/admin/models/companyresults.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companyresults.php
@@ -272,13 +272,13 @@ class CostbenefitprojectionModelCompanyresults extends JModelItem
// set data object to item.
$this->_item[$pk] = $data;
- }
+ }
catch (Exception $e)
{
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
- JError::raiseWaring(404, $e->getMessage());
+ JError::raiseWarning(404, $e->getMessage());
}
else
{
diff --git a/admin/models/costbenefitprojection.php b/admin/models/costbenefitprojection.php
index 1bc2175a..7ac0b7cb 100644
--- a/admin/models/costbenefitprojection.php
+++ b/admin/models/costbenefitprojection.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage costbenefitprojection.php
@@ -109,8 +109,8 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
$viewName = $name;
$alt = $name;
$url = $url;
- $image = $name.'.'.$type;
- $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U');
+ $image = $name . '.' . $type;
+ $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_' . CostbenefitprojectionHelper::safeString($name,'U');
}
}
// internal views
@@ -132,17 +132,27 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
switch($action)
{
case 'add':
- $url = 'index.php?option=com_costbenefitprojection&view='.$name.'&layout=edit';
- $image = $name.'_'.$action.'.'.$type;
- $alt = $name.' '.$action;
+ $url = 'index.php?option=com_costbenefitprojection&view=' . $name . '&layout=edit';
+ $image = $name . '_' . $action. '.' . $type;
+ $alt = $name . ' ' . $action;
$name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U').'_ADD';
$add = true;
break;
default:
- $url = 'index.php?option=com_categories&view=categories&extension=com_costbenefitprojection.'.$name;
- $image = $name.'_'.$action.'.'.$type;
- $alt = $name.' '.$action;
- $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U').'_'.CostbenefitprojectionHelper::safeString($action,'U');
+ // check for new convention (more stable)
+ if (strpos($action, '_qpo0O0oqp_') !== false)
+ {
+ list($action, $extension) = (array) explode('_qpo0O0oqp_', $action);
+ $extension = str_replace('_po0O0oq_', '.', $extension);
+ }
+ else
+ {
+ $extension = 'com_costbenefitprojection.' . $name;
+ }
+ $url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
+ $image = $name . '_' . $action . '.' . $type;
+ $alt = $viewName . ' ' . $action;
+ $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_' . CostbenefitprojectionHelper::safeString($name,'U') . '_' . CostbenefitprojectionHelper::safeString($action,'U');
break;
}
}
@@ -150,9 +160,9 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
{
$viewName = $name;
$alt = $name;
- $url = 'index.php?option=com_costbenefitprojection&view='.$name;
- $image = $name.'.'.$type;
- $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_'.CostbenefitprojectionHelper::safeString($name,'U');
+ $url = 'index.php?option=com_costbenefitprojection&view=' . $name;
+ $image = $name . '.' . $type;
+ $name = 'COM_COSTBENEFITPROJECTION_DASHBOARD_' . CostbenefitprojectionHelper::safeString($name,'U');
$hover = false;
}
}
@@ -160,8 +170,8 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
{
$viewName = $view;
$alt = $view;
- $url = 'index.php?option=com_costbenefitprojection&view='.$view;
- $image = $view.'.png';
+ $url = 'index.php?option=com_costbenefitprojection&view=' . $view;
+ $image = $view . '.png';
$name = ucwords($view).'
';
$hover = false;
}
@@ -173,7 +183,7 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
$dashboard_list = false;
$accessTo = '';
$accessAdd = '';
- // acces checking start
+ // access checking start
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? CostbenefitprojectionHelper::checkString($viewAccess[$viewName.'.access']):false;
// set main controllers
@@ -188,7 +198,7 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
{
$accessAdd = 'core.create';
}
- // check if acces to view is set
+ // check if access to view is set
if ($accessAccess)
{
$accessTo = $viewAccess[$viewName.'.access'];
@@ -595,120 +605,108 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
}
return false;
}
-
+
public function getGithub()
{
+ // load jquery (not sure why... but else the timeago breaks)
+ JHtml::_('jquery.framework');
+ // get the document to load the scripts
$document = JFactory::getDocument();
- $document->addScript(JURI::root() . "media/com_costbenefitprojection/js/marked.js");
+ $document->addScript(JURI::root() . "media/com_costbenefitprojection/js/timeago.js");
$document->addScriptDeclaration('
- var token = "'.JSession::getFormToken().'";
- var urlToGetAllOpenIssues = "https://api.github.com/repos/namibia/CBP-Joomla-3-Component/issues?state=open&page=1&per_page=5";
- var urlToGetAllClosedIssues = "https://api.github.com/repos/namibia/CBP-Joomla-3-Component/issues?state=closed&page=1&per_page=5";
+ var urlToGetAllOpenIssues = "https://api.github.com/repos/Llewellynvdm/Joomla-Cost-Benefit-Projection/issues?state=open&page=1&per_page=5";
+ var urlToGetAllClosedIssues = "https://api.github.com/repos/Llewellynvdm/Joomla-Cost-Benefit-Projection/issues?state=closed&page=1&per_page=5";
+ var urlToGetAllReleases = "https://api.github.com/repos/Llewellynvdm/Joomla-Cost-Benefit-Projection/releases?page=1&per_page=5";
jQuery(document).ready(function () {
jQuery.getJSON(urlToGetAllOpenIssues, function (openissues) {
jQuery("#openissues").html("");
jQuery.each(openissues, function (i, issue) {
+ // set time ago
+ var timeago = jQuery.timeago(new Date(issue.created_at));
jQuery("#openissues")
.append("")
- .append("#" + issue.number + " '.JText::_('COM_COSTBENEFITPROJECTION_OPENED_BY').' " + issue.user.login + "")
+ .append(" ")
+ .append("" + issue.user.login + " '.JText::_('COM_COSTBENEFITPROJECTION_OPENED_THIS').' '.JText::_('COM_COSTBENEFITPROJECTION_ISSUE').'-" + issue.number + " (" + timeago + ") ")
.append(marked(issue.body))
- .append("'.JText::_('COM_COSTBENEFITPROJECTION_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'... ");
+ .append("'.JText::_('COM_COSTBENEFITPROJECTION_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'... ");
});
});
jQuery.getJSON(urlToGetAllClosedIssues, function (closedissues) {
jQuery("#closedissues").html("");
jQuery.each(closedissues, function (i, issue) {
+ // set time ago
+ var timeago = jQuery.timeago(new Date(issue.created_at));
jQuery("#closedissues")
.append("")
- .append("#" + issue.number + " '.JText::_('COM_COSTBENEFITPROJECTION_OPENED_BY').' " + issue.user.login + "")
+ .append(" ")
+ .append("" + issue.user.login + " '.JText::_('COM_COSTBENEFITPROJECTION_OPENED').' '.JText::_('COM_COSTBENEFITPROJECTION_ISSUE').'-" + issue.number + " (" + timeago + ")")
.append(marked(issue.body))
- .append("'.JText::_('COM_COSTBENEFITPROJECTION_REVIEW_THIS_ISSUE_ON_GITHUB').'... ");
+ .append("'.JText::_('COM_COSTBENEFITPROJECTION_REVIEW_THIS_ISSUE_ON_GITHUB').'... ");
});
});
- });
- // to check is READ/NEW
- function getIS(type,notice){
- if(type == 1){
- var getUrl = "index.php?option=com_costbenefitprojection&task=ajax.isNew&format=json";
- } else if (type == 2) {
- var getUrl = "index.php?option=com_costbenefitprojection&task=ajax.isRead&format=json";
- }
- if(token.length > 0 && notice.length){
- var request = "token="+token+"¬ice="+notice;
- }
- return jQuery.ajax({
- type: "POST",
- url: getUrl,
- dataType: "jsonp",
- data: request,
- jsonp: "callback"
- });
- }
- // nice little dot trick :)
- jQuery(document).ready( function($) {
- var x=0;
- setInterval(function() {
- var dots = "";
- x++;
- for (var y=0; y < x%8; y++) {
- dots+=".";
+ jQuery.getJSON(urlToGetAllReleases, function (tagreleases) {
+ // set the update notice while we are at it
+ var activeVersion = tagreleases[0].tag_name.substring(1);
+ if (activeVersion === manifest.version) {
+ // local version is in sync with latest release
+ jQuery(".update-notice").html("'.JText::_('COM_COSTBENEFITPROJECTION_UP_TO_DATE').'");
+ } else {
+ // split versions in to array
+ var activeVersionArray = activeVersion.split(".");
+ var localVersionArray = manifest.version.split(".");
+ if ((+localVersionArray[0] > +activeVersionArray[0]) ||
+ (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] > +activeVersionArray[1]) ||
+ (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] == +activeVersionArray[1] && +localVersionArray[2] > +activeVersionArray[2])) {
+ // local version head latest release
+ jQuery(".update-notice").html("'.JText::_('COM_COSTBENEFITPROJECTION_BETA_RELEASE').'");
+ } else {
+ // local version behind latest release
+ jQuery(".update-notice").html("'.JText::_('COM_COSTBENEFITPROJECTION_OUT_OF_DATE').'");
+ }
}
- $(".loading-dots").text(dots);
- } , 500);
+ // set the taged releases
+ jQuery("#tagreleases").html("");
+ jQuery.each(tagreleases, function (i, tagrelease) {
+ // set active release
+ var activeNotice = "";
+ if (i === 0) {
+ var activeNotice = " '.JText::_('COM_COSTBENEFITPROJECTION_LATEST_RELEASE').'
";
+ }
+ // set time ago
+ var timeago = jQuery.timeago(new Date(tagrelease.published_at));
+ jQuery("#tagreleases")
+ .append("")
+ .append(activeNotice)
+ .append(" ")
+ .append("" + tagrelease.author.login + " '.JText::_('COM_COSTBENEFITPROJECTION_RELEASED_THIS').' " + tagrelease.tag_name+ " (" + timeago + ")")
+ .append(marked(tagrelease.body))
+ .append(" " + tagrelease.assets[0].name + " (" + tagrelease.assets[0].download_count + ") ")
+ .append("| '.JText::_('COM_COSTBENEFITPROJECTION_OPEN_ON_GITHUB').'... ");
+ });
+ });
});');
$create = '';
- $moreopen = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB').'...';
- $moreclosed = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB').'...';
+ $moreopen = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB').'... ';
+ $moreclosed = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_ISSUES_ON_GITHUB').'... ';
+ $viewissues = ''.JText::_('COM_COSTBENEFITPROJECTION_VIEW_MORE_RELEASES_ON_GITHUB').'... ';
return (object) array(
'openissues' => $create.''.JText::_('COM_COSTBENEFITPROJECTION_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING').'.. '.$moreopen,
- 'closedissues' => $create.''.JText::_('COM_COSTBENEFITPROJECTION_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING').'.. '.$moreclosed
+ 'closedissues' => $create.''.JText::_('COM_COSTBENEFITPROJECTION_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING').'.. '.$moreclosed,
+ 'tagreleases' => ''.JText::_('COM_COSTBENEFITPROJECTION_LAST_FEW_RELEASES_FROM_GITHUB_IS_LOADING').'.. '.$viewissues
);
}
-
- public function getReadme()
- {
- $document = JFactory::getDocument();
- $document->addScriptDeclaration('
- var getreadme = "'. JURI::root() . 'administrator/components/com_costbenefitprojection/README.txt";
- jQuery(document).ready(function () {
- jQuery.get(getreadme)
- .success(function(readme) {
- jQuery("#readme-md").html(marked(readme));
- })
- .error(function(jqXHR, textStatus, errorThrown) {
- jQuery("#readme-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_PLEASE_CHECK_AGAIN_LATTER').'");
- });
- });');
-
- return ''.JText::_('COM_COSTBENEFITPROJECTION_THE_README_IS_LOADING').'.. ';
- }
-
- public function getWiki()
- {
- $document = JFactory::getDocument();
- $document->addScriptDeclaration('
- var gewiki = "https://raw.githubusercontent.com/wiki/namibia/CBP-Joomla-3-Component/Home.md";
- jQuery(document).ready(function () {
- jQuery.get(gewiki)
- .success(function(wiki) {
- jQuery("#wiki-md").html(marked(wiki));
- })
- .error(function(jqXHR, textStatus, errorThrown) {
- jQuery("#wiki-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_PLEASE_CHECK_AGAIN_LATTER').'");
- });
- });');
-
- return ''.JText::_('COM_COSTBENEFITPROJECTION_THE_WIKI_IS_LOADING').'.. ';
- }
-
+
public function getNoticeboard()
{
+ // get the document to load the scripts
$document = JFactory::getDocument();
+ $document->addScript(JURI::root() . "media/com_costbenefitprojection/js/marked.js");
$document->addScriptDeclaration('
- var noticeboard = "https://www.vdm.io/costbenefitprojection-noticeboard-md";
+ var token = "'.JSession::getFormToken().'";
+ var noticeboard = "https://vdm.bz/costbenefitprojection-noticeboard-md";
jQuery(document).ready(function () {
jQuery.get(noticeboard)
.success(function(board) {
@@ -717,7 +715,7 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
getIS(1,board).done(function(result) {
if (result){
jQuery("#cpanel_tabTabs a").each(function() {
- if (this.href.indexOf("#vast_development_method") >= 0) {
+ if (this.href.indexOf("#vast_development_method") >= 0 || this.href.indexOf("#notice_board") >= 0) {
var textVDM = jQuery(this).text();
jQuery(this).html("1 "+textVDM);
jQuery(this).attr("id","vdm-new-notice");
@@ -739,8 +737,57 @@ class CostbenefitprojectionModelCostbenefitprojection extends JModelList
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#noticeboard-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'");
});
- });');
+ });
+ // to check is READ/NEW
+ function getIS(type,notice){
+ if(type == 1){
+ var getUrl = "index.php?option=com_costbenefitprojection&task=ajax.isNew&format=json&raw=true";
+ } else if (type == 2) {
+ var getUrl = "index.php?option=com_costbenefitprojection&task=ajax.isRead&format=json&raw=true";
+ }
+ if(token.length > 0 && notice.length){
+ var request = "token="+token+"¬ice="+notice;
+ }
+ return jQuery.ajax({
+ type: "POST",
+ url: getUrl,
+ dataType: "json",
+ data: request,
+ jsonp: false
+ });
+ }
+
+// nice little dot trick :)
+jQuery(document).ready( function($) {
+ var x=0;
+ setInterval(function() {
+ var dots = "";
+ x++;
+ for (var y=0; y < x%8; y++) {
+ dots+=".";
+ }
+ $(".loading-dots").text(dots);
+ } , 500);
+});');
return ''.JText::_('COM_COSTBENEFITPROJECTION_THE_NOTICE_BOARD_IS_LOADING').'.. ';
}
+
+ public function getReadme()
+ {
+ $document = JFactory::getDocument();
+ $document->addScriptDeclaration('
+ var getreadme = "'. JURI::root() . 'administrator/components/com_costbenefitprojection/README.txt";
+ jQuery(document).ready(function () {
+ jQuery.get(getreadme)
+ .success(function(readme) {
+ jQuery("#readme-md").html(marked(readme));
+ })
+ .error(function(jqXHR, textStatus, errorThrown) {
+ jQuery("#readme-md").html("'.JText::_('COM_COSTBENEFITPROJECTION_PLEASE_CHECK_AGAIN_LATTER').'");
+ });
+ });');
+
+ return ''.JText::_('COM_COSTBENEFITPROJECTION_THE_README_IS_LOADING').'.. ';
+ }
}
diff --git a/admin/models/countries.php b/admin/models/countries.php
index b7a6e7fa..278cc6dd 100644
--- a/admin/models/countries.php
+++ b/admin/models/countries.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage countries.php
@@ -34,12 +34,13 @@ class CostbenefitprojectionModelCountries extends JModelList
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
+ 'a.access','access',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
+ 'h.name','currency',
'a.name','name',
- 'g.name',
- 'h.name',
+ 'g.name','user',
'a.codethree','codethree',
'a.codetwo','codetwo',
'a.working_days','working_days'
@@ -48,11 +49,17 @@ class CostbenefitprojectionModelCountries extends JModelList
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -62,16 +69,35 @@ class CostbenefitprojectionModelCountries extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
+
+ $currency = $this->getUserStateFromRequest($this->context . '.filter.currency', 'filter_currency');
+ $this->setState('filter.currency', $currency);
+
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$user = $this->getUserStateFromRequest($this->context . '.filter.user', 'filter_user');
$this->setState('filter.user', $user);
- $currency = $this->getUserStateFromRequest($this->context . '.filter.currency', 'filter_currency');
- $this->setState('filter.currency', $currency);
-
$codethree = $this->getUserStateFromRequest($this->context . '.filter.codethree', 'filter_codethree');
$this->setState('filter.codethree', $codethree);
@@ -80,24 +106,6 @@ class CostbenefitprojectionModelCountries extends JModelList
$working_days = $this->getUserStateFromRequest($this->context . '.filter.working_days', 'filter_working_days');
$this->setState('filter.working_days', $working_days);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
@@ -199,9 +207,17 @@ class CostbenefitprojectionModelCountries extends JModelList
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -224,15 +240,27 @@ class CostbenefitprojectionModelCountries extends JModelList
}
}
- // Filter by currency.
- if ($currency = $this->getState('filter.currency'))
+ // Filter by Currency.
+ $_currency = $this->getState('filter.currency');
+ if (is_numeric($_currency))
{
- $query->where('a.currency = ' . $db->quote($db->escape($currency)));
+ if (is_float($_currency))
+ {
+ $query->where('a.currency = ' . (float) $_currency);
+ }
+ else
+ {
+ $query->where('a.currency = ' . (int) $_currency);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_currency))
+ {
+ $query->where('a.currency = ' . $db->quote($db->escape($_currency)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -252,7 +280,7 @@ class CostbenefitprojectionModelCountries extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -270,7 +298,24 @@ class CostbenefitprojectionModelCountries extends JModelList
// From the costbenefitprojection_country table
$query->from($db->quoteName('#__costbenefitprojection_country', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Filter the countries (admin sees all)
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -374,12 +419,13 @@ class CostbenefitprojectionModelCountries extends JModelList
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
+ $id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
+ $id .= ':' . $this->getState('filter.currency');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.user');
- $id .= ':' . $this->getState('filter.currency');
$id .= ':' . $this->getState('filter.codethree');
$id .= ':' . $this->getState('filter.codetwo');
$id .= ':' . $this->getState('filter.working_days');
diff --git a/admin/models/country.php b/admin/models/country.php
index c25a799f..f403f606 100644
--- a/admin/models/country.php
+++ b/admin/models/country.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage country.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -471,9 +471,17 @@ class CostbenefitprojectionModelCountry extends JModelAdmin
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
diff --git a/admin/models/currencies.php b/admin/models/currencies.php
index ece3f73a..cccdf9aa 100644
--- a/admin/models/currencies.php
+++ b/admin/models/currencies.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currencies.php
@@ -34,6 +34,7 @@ class CostbenefitprojectionModelCurrencies extends JModelList
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
+ 'a.access','access',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
@@ -46,11 +47,17 @@ class CostbenefitprojectionModelCurrencies extends JModelList
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -60,7 +67,26 @@ class CostbenefitprojectionModelCurrencies extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
+
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
@@ -72,24 +98,6 @@ class CostbenefitprojectionModelCurrencies extends JModelList
$decimalplace = $this->getUserStateFromRequest($this->context . '.filter.decimalplace', 'filter_decimalplace');
$this->setState('filter.decimalplace', $decimalplace);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
@@ -167,9 +175,17 @@ class CostbenefitprojectionModelCurrencies extends JModelList
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -195,7 +211,7 @@ class CostbenefitprojectionModelCurrencies extends JModelList
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -215,7 +231,7 @@ class CostbenefitprojectionModelCurrencies extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -233,7 +249,24 @@ class CostbenefitprojectionModelCurrencies extends JModelList
// From the costbenefitprojection_currency table
$query->from($db->quoteName('#__costbenefitprojection_currency', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
{
@@ -321,6 +354,7 @@ class CostbenefitprojectionModelCurrencies extends JModelList
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
+ $id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
diff --git a/admin/models/currency.php b/admin/models/currency.php
index 11fa25c9..9ddf1792 100644
--- a/admin/models/currency.php
+++ b/admin/models/currency.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currency.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php
index 9af60566..a5b7ab3e 100644
--- a/admin/models/fields/adminviewfolderlist.php
+++ b/admin/models/fields/adminviewfolderlist.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage adminviewfolderlist.php
diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php
index 5976641c..51b1ace1 100644
--- a/admin/models/fields/articles.php
+++ b/admin/models/fields/articles.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage articles.php
diff --git a/admin/models/fields/causesrisks.php b/admin/models/fields/causesrisks.php
index 811276f5..53907656 100644
--- a/admin/models/fields/causesrisks.php
+++ b/admin/models/fields/causesrisks.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causesrisks.php
diff --git a/admin/models/fields/causesriskscheck.php b/admin/models/fields/causesriskscheck.php
index 7e0efec0..d6dce164 100644
--- a/admin/models/fields/causesriskscheck.php
+++ b/admin/models/fields/causesriskscheck.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causesriskscheck.php
diff --git a/admin/models/fields/company.php b/admin/models/fields/company.php
index 865e87af..00831d70 100644
--- a/admin/models/fields/company.php
+++ b/admin/models/fields/company.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.php
diff --git a/admin/models/fields/companycheck.php b/admin/models/fields/companycheck.php
index bb7b5a26..1a30db50 100644
--- a/admin/models/fields/companycheck.php
+++ b/admin/models/fields/companycheck.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage companycheck.php
diff --git a/admin/models/fields/countries.php b/admin/models/fields/countries.php
index 867ddfc5..5a4df561 100644
--- a/admin/models/fields/countries.php
+++ b/admin/models/fields/countries.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage countries.php
diff --git a/admin/models/fields/countryuser.php b/admin/models/fields/countryuser.php
index aa7eb304..050ea8b5 100644
--- a/admin/models/fields/countryuser.php
+++ b/admin/models/fields/countryuser.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage countryuser.php
diff --git a/admin/models/fields/currency.php b/admin/models/fields/currency.php
index c3d2809b..8f7a0772 100644
--- a/admin/models/fields/currency.php
+++ b/admin/models/fields/currency.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currency.php
diff --git a/admin/models/fields/datayear.php b/admin/models/fields/datayear.php
index 051da43b..d4c96fee 100644
--- a/admin/models/fields/datayear.php
+++ b/admin/models/fields/datayear.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage datayear.php
diff --git a/admin/models/fields/interventions.php b/admin/models/fields/interventions.php
index e83e435c..f7ecf005 100644
--- a/admin/models/fields/interventions.php
+++ b/admin/models/fields/interventions.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions.php
diff --git a/admin/models/fields/memberuser.php b/admin/models/fields/memberuser.php
index 12a3967d..06b6fbe5 100644
--- a/admin/models/fields/memberuser.php
+++ b/admin/models/fields/memberuser.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage memberuser.php
diff --git a/admin/models/fields/serviceprovider.php b/admin/models/fields/serviceprovider.php
index c1c63713..4b46f1d5 100644
--- a/admin/models/fields/serviceprovider.php
+++ b/admin/models/fields/serviceprovider.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage serviceprovider.php
diff --git a/admin/models/fields/serviceprovideruser.php b/admin/models/fields/serviceprovideruser.php
index bd67f993..3224650f 100644
--- a/admin/models/fields/serviceprovideruser.php
+++ b/admin/models/fields/serviceprovideruser.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage serviceprovideruser.php
diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php
index 82fe7356..14a0d2c3 100644
--- a/admin/models/fields/siteviewfolderlist.php
+++ b/admin/models/fields/siteviewfolderlist.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage siteviewfolderlist.php
diff --git a/admin/models/forms/causerisk.js b/admin/models/forms/causerisk.js
index 61a1cbc9..157893e5 100644
--- a/admin/models/forms/causerisk.js
+++ b/admin/models/forms/causerisk.js
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk.js
diff --git a/admin/models/forms/causerisk.xml b/admin/models/forms/causerisk.xml
index b700da96..2fecf165 100644
--- a/admin/models/forms/causerisk.xml
+++ b/admin/models/forms/causerisk.xml
@@ -84,6 +84,14 @@
readonly="true"
filter="unset"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/health_data.php b/admin/models/health_data.php
index fa551bcc..7b6f824b 100644
--- a/admin/models/health_data.php
+++ b/admin/models/health_data.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
diff --git a/admin/models/health_data_sets.php b/admin/models/health_data_sets.php
index c3d83018..38e1cc7b 100644
--- a/admin/models/health_data_sets.php
+++ b/admin/models/health_data_sets.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data_sets.php
@@ -34,22 +34,49 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
+ 'a.access','access',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
- 'g.name',
+ 'g.name','causerisk',
'a.year','year',
- 'h.name'
+ 'h.name','country'
);
}
parent::__construct($config);
+ }
+
+
+ /**
+ * Get all the data to do a bulk export
+ */
+ public function getBulkExport()
+ {
+ try
+ {
+ return $this->getExportData('bulk');
+ }
+ catch (\RuntimeException $e)
+ {
+ if (!headers_sent())
+ {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ jexit('Database Error: ' . $e->getMessage());
+ }
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -59,7 +86,26 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
+
$causerisk = $this->getUserStateFromRequest($this->context . '.filter.causerisk', 'filter_causerisk');
$this->setState('filter.causerisk', $causerisk);
@@ -68,24 +114,6 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
$country = $this->getUserStateFromRequest($this->context . '.filter.country', 'filter_country');
$this->setState('filter.country', $country);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
@@ -237,9 +265,17 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -262,25 +298,61 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
}
}
- // Filter by causerisk.
- if ($causerisk = $this->getState('filter.causerisk'))
+ // Filter by Causerisk.
+ $_causerisk = $this->getState('filter.causerisk');
+ if (is_numeric($_causerisk))
{
- $query->where('a.causerisk = ' . $db->quote($db->escape($causerisk)));
+ if (is_float($_causerisk))
+ {
+ $query->where('a.causerisk = ' . (float) $_causerisk);
+ }
+ else
+ {
+ $query->where('a.causerisk = ' . (int) $_causerisk);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_causerisk))
+ {
+ $query->where('a.causerisk = ' . $db->quote($db->escape($_causerisk)));
}
// Filter by Year.
- if ($year = $this->getState('filter.year'))
+ $_year = $this->getState('filter.year');
+ if (is_numeric($_year))
{
- $query->where('a.year = ' . $db->quote($db->escape($year)));
+ if (is_float($_year))
+ {
+ $query->where('a.year = ' . (float) $_year);
+ }
+ else
+ {
+ $query->where('a.year = ' . (int) $_year);
+ }
}
- // Filter by country.
- if ($country = $this->getState('filter.country'))
+ elseif (CostbenefitprojectionHelper::checkString($_year))
{
- $query->where('a.country = ' . $db->quote($db->escape($country)));
+ $query->where('a.year = ' . $db->quote($db->escape($_year)));
+ }
+ // Filter by Country.
+ $_country = $this->getState('filter.country');
+ if (is_numeric($_country))
+ {
+ if (is_float($_country))
+ {
+ $query->where('a.country = ' . (float) $_country);
+ }
+ else
+ {
+ $query->where('a.country = ' . (int) $_country);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_country))
+ {
+ $query->where('a.country = ' . $db->quote($db->escape($_country)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -300,7 +372,7 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -318,7 +390,24 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
// From the costbenefitprojection_health_data table
$query->from($db->quoteName('#__costbenefitprojection_health_data', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Filter by countries (admin sees all)
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -424,6 +513,7 @@ class CostbenefitprojectionModelHealth_data_sets extends JModelList
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
+ $id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
diff --git a/admin/models/help_document.php b/admin/models/help_document.php
index 67219a8e..488412f1 100644
--- a/admin/models/help_document.php
+++ b/admin/models/help_document.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_document.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -423,7 +423,7 @@ class CostbenefitprojectionModelHelp_document extends JModelAdmin
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
- if (CostbenefitprojectionHelper::checkString($data['not_required']))
+ if (isset($data['not_required']) && CostbenefitprojectionHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php
index 1c601356..71a843f4 100644
--- a/admin/models/help_documents.php
+++ b/admin/models/help_documents.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_documents.php
@@ -37,21 +37,27 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
- 'a.title','title',
'a.type','type',
'a.location','location',
- 'g.',
- 'h.'
+ 'a.admin_view','admin_view',
+ 'a.site_view','site_view',
+ 'a.title','title'
);
}
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -61,9 +67,25 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
- $title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title');
- $this->setState('filter.title', $title);
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
@@ -75,25 +97,10 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
$this->setState('filter.admin_view', $admin_view);
$site_view = $this->getUserStateFromRequest($this->context . '.filter.site_view', 'filter_site_view');
- $this->setState('filter.site_view', $site_view);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
+ $this->setState('filter.site_view', $site_view);
+
+ $title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title');
+ $this->setState('filter.title', $title);
// List state information.
parent::populateState($ordering, $direction);
@@ -244,29 +251,77 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
}
// Filter by Type.
- if ($type = $this->getState('filter.type'))
+ $_type = $this->getState('filter.type');
+ if (is_numeric($_type))
{
- $query->where('a.type = ' . $db->quote($db->escape($type)));
+ if (is_float($_type))
+ {
+ $query->where('a.type = ' . (float) $_type);
+ }
+ else
+ {
+ $query->where('a.type = ' . (int) $_type);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_type))
+ {
+ $query->where('a.type = ' . $db->quote($db->escape($_type)));
}
// Filter by Location.
- if ($location = $this->getState('filter.location'))
+ $_location = $this->getState('filter.location');
+ if (is_numeric($_location))
{
- $query->where('a.location = ' . $db->quote($db->escape($location)));
+ if (is_float($_location))
+ {
+ $query->where('a.location = ' . (float) $_location);
+ }
+ else
+ {
+ $query->where('a.location = ' . (int) $_location);
+ }
}
- // Filter by admin_view.
- if ($admin_view = $this->getState('filter.admin_view'))
+ elseif (CostbenefitprojectionHelper::checkString($_location))
{
- $query->where('a.admin_view = ' . $db->quote($db->escape($admin_view)));
+ $query->where('a.location = ' . $db->quote($db->escape($_location)));
}
- // Filter by site_view.
- if ($site_view = $this->getState('filter.site_view'))
+ // Filter by Admin_view.
+ $_admin_view = $this->getState('filter.admin_view');
+ if (is_numeric($_admin_view))
{
- $query->where('a.site_view = ' . $db->quote($db->escape($site_view)));
+ if (is_float($_admin_view))
+ {
+ $query->where('a.admin_view = ' . (float) $_admin_view);
+ }
+ else
+ {
+ $query->where('a.admin_view = ' . (int) $_admin_view);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_admin_view))
+ {
+ $query->where('a.admin_view = ' . $db->quote($db->escape($_admin_view)));
+ }
+ // Filter by Site_view.
+ $_site_view = $this->getState('filter.site_view');
+ if (is_numeric($_site_view))
+ {
+ if (is_float($_site_view))
+ {
+ $query->where('a.site_view = ' . (float) $_site_view);
+ }
+ else
+ {
+ $query->where('a.site_view = ' . (int) $_site_view);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_site_view))
+ {
+ $query->where('a.site_view = ' . $db->quote($db->escape($_site_view)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -286,7 +341,7 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -304,7 +359,24 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
// From the costbenefitprojection_help_document table
$query->from($db->quoteName('#__costbenefitprojection_help_document', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Order the results by ordering
$query->order('a.ordering ASC');
@@ -389,11 +461,11 @@ class CostbenefitprojectionModelHelp_documents extends JModelList
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
- $id .= ':' . $this->getState('filter.title');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.location');
$id .= ':' . $this->getState('filter.admin_view');
- $id .= ':' . $this->getState('filter.site_view');
+ $id .= ':' . $this->getState('filter.site_view');
+ $id .= ':' . $this->getState('filter.title');
return parent::getStoreId($id);
}
diff --git a/admin/models/import.php b/admin/models/import.php
index 4e0dbb7a..8b3c56a6 100644
--- a/admin/models/import.php
+++ b/admin/models/import.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage import.php
@@ -434,7 +434,15 @@ class CostbenefitprojectionModelImport extends JModelLegacy
$jinput = JFactory::getApplication()->input;
foreach($target_headers as $header)
{
- $data['target_headers'][$header] = $jinput->getString($header, null);
+ if (($column = $jinput->getString($header, false)) !== false ||
+ ($column = $jinput->getString(strtolower($header), false)) !== false)
+ {
+ $data['target_headers'][$header] = $column;
+ }
+ else
+ {
+ $data['target_headers'][$header] = null;
+ }
}
// set the data
if(isset($package['dir']))
diff --git a/admin/models/import_health_data_sets.php b/admin/models/import_health_data_sets.php
index 798ef551..c65af1e2 100644
--- a/admin/models/import_health_data_sets.php
+++ b/admin/models/import_health_data_sets.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage import_health_data_sets.php
diff --git a/admin/models/intervention.php b/admin/models/intervention.php
index 23d6dca0..9bd469d4 100644
--- a/admin/models/intervention.php
+++ b/admin/models/intervention.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage intervention.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -425,7 +425,7 @@ class CostbenefitprojectionModelIntervention extends JModelAdmin
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
- if (CostbenefitprojectionHelper::checkString($data['not_required']))
+ if (isset($data['not_required']) && CostbenefitprojectionHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
diff --git a/admin/models/interventions.php b/admin/models/interventions.php
index 8f8639f9..91fdf5d9 100644
--- a/admin/models/interventions.php
+++ b/admin/models/interventions.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage interventions.php
@@ -37,22 +37,28 @@ class CostbenefitprojectionModelInterventions extends JModelList
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
- 'a.name','name',
- 'g.name',
+ 'g.name','company',
'a.type','type',
'a.coverage','coverage',
- 'a.description','description',
- 'a.duration','duration'
+ 'a.duration','duration',
+ 'a.name','name',
+ 'a.description','description'
);
}
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -62,9 +68,25 @@ class CostbenefitprojectionModelInterventions extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
- $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
- $this->setState('filter.name', $name);
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
$company = $this->getUserStateFromRequest($this->context . '.filter.company', 'filter_company');
$this->setState('filter.company', $company);
@@ -75,29 +97,14 @@ class CostbenefitprojectionModelInterventions extends JModelList
$coverage = $this->getUserStateFromRequest($this->context . '.filter.coverage', 'filter_coverage');
$this->setState('filter.coverage', $coverage);
- $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
- $this->setState('filter.description', $description);
-
$duration = $this->getUserStateFromRequest($this->context . '.filter.duration', 'filter_duration');
- $this->setState('filter.duration', $duration);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
+ $this->setState('filter.duration', $duration);
+
+ $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
+ $this->setState('filter.name', $name);
+
+ $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
+ $this->setState('filter.description', $description);
// List state information.
parent::populateState($ordering, $direction);
@@ -253,30 +260,78 @@ class CostbenefitprojectionModelInterventions extends JModelList
}
}
- // Filter by company.
- if ($company = $this->getState('filter.company'))
+ // Filter by Company.
+ $_company = $this->getState('filter.company');
+ if (is_numeric($_company))
{
- $query->where('a.company = ' . $db->quote($db->escape($company)));
+ if (is_float($_company))
+ {
+ $query->where('a.company = ' . (float) $_company);
+ }
+ else
+ {
+ $query->where('a.company = ' . (int) $_company);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_company))
+ {
+ $query->where('a.company = ' . $db->quote($db->escape($_company)));
}
// Filter by Type.
- if ($type = $this->getState('filter.type'))
+ $_type = $this->getState('filter.type');
+ if (is_numeric($_type))
{
- $query->where('a.type = ' . $db->quote($db->escape($type)));
+ if (is_float($_type))
+ {
+ $query->where('a.type = ' . (float) $_type);
+ }
+ else
+ {
+ $query->where('a.type = ' . (int) $_type);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_type))
+ {
+ $query->where('a.type = ' . $db->quote($db->escape($_type)));
}
// Filter by Coverage.
- if ($coverage = $this->getState('filter.coverage'))
+ $_coverage = $this->getState('filter.coverage');
+ if (is_numeric($_coverage))
{
- $query->where('a.coverage = ' . $db->quote($db->escape($coverage)));
+ if (is_float($_coverage))
+ {
+ $query->where('a.coverage = ' . (float) $_coverage);
+ }
+ else
+ {
+ $query->where('a.coverage = ' . (int) $_coverage);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_coverage))
+ {
+ $query->where('a.coverage = ' . $db->quote($db->escape($_coverage)));
}
// Filter by Duration.
- if ($duration = $this->getState('filter.duration'))
+ $_duration = $this->getState('filter.duration');
+ if (is_numeric($_duration))
{
- $query->where('a.duration = ' . $db->quote($db->escape($duration)));
+ if (is_float($_duration))
+ {
+ $query->where('a.duration = ' . (float) $_duration);
+ }
+ else
+ {
+ $query->where('a.duration = ' . (int) $_duration);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_duration))
+ {
+ $query->where('a.duration = ' . $db->quote($db->escape($_duration)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -296,7 +351,7 @@ class CostbenefitprojectionModelInterventions extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -314,7 +369,24 @@ class CostbenefitprojectionModelInterventions extends JModelList
// From the costbenefitprojection_intervention table
$query->from($db->quoteName('#__costbenefitprojection_intervention', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Filter the companies (admin sees all)
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -429,12 +501,12 @@ class CostbenefitprojectionModelInterventions extends JModelList
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
- $id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.company');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.coverage');
- $id .= ':' . $this->getState('filter.description');
- $id .= ':' . $this->getState('filter.duration');
+ $id .= ':' . $this->getState('filter.duration');
+ $id .= ':' . $this->getState('filter.name');
+ $id .= ':' . $this->getState('filter.description');
return parent::getStoreId($id);
}
diff --git a/admin/models/scaling_factor.php b/admin/models/scaling_factor.php
index 77e000b0..65065dd2 100644
--- a/admin/models/scaling_factor.php
+++ b/admin/models/scaling_factor.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -412,7 +412,7 @@ class CostbenefitprojectionModelScaling_factor extends JModelAdmin
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
- if (CostbenefitprojectionHelper::checkString($data['not_required']))
+ if (isset($data['not_required']) && CostbenefitprojectionHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
diff --git a/admin/models/scaling_factors.php b/admin/models/scaling_factors.php
index ad757223..7444b7b9 100644
--- a/admin/models/scaling_factors.php
+++ b/admin/models/scaling_factors.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factors.php
@@ -37,8 +37,8 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
- 'g.name',
- 'h.name',
+ 'g.name','causerisk',
+ 'h.name','company',
'a.yld_scaling_factor_males','yld_scaling_factor_males',
'a.yld_scaling_factor_females','yld_scaling_factor_females',
'a.mortality_scaling_factor_males','mortality_scaling_factor_males',
@@ -50,11 +50,17 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -64,7 +70,26 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
+
$causerisk = $this->getUserStateFromRequest($this->context . '.filter.causerisk', 'filter_causerisk');
$this->setState('filter.causerisk', $causerisk);
@@ -88,24 +113,6 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
$presenteeism_scaling_factor_females = $this->getUserStateFromRequest($this->context . '.filter.presenteeism_scaling_factor_females', 'filter_presenteeism_scaling_factor_females');
$this->setState('filter.presenteeism_scaling_factor_females', $presenteeism_scaling_factor_females);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
@@ -218,20 +225,44 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
}
}
- // Filter by causerisk.
- if ($causerisk = $this->getState('filter.causerisk'))
+ // Filter by Causerisk.
+ $_causerisk = $this->getState('filter.causerisk');
+ if (is_numeric($_causerisk))
{
- $query->where('a.causerisk = ' . $db->quote($db->escape($causerisk)));
+ if (is_float($_causerisk))
+ {
+ $query->where('a.causerisk = ' . (float) $_causerisk);
+ }
+ else
+ {
+ $query->where('a.causerisk = ' . (int) $_causerisk);
+ }
}
- // Filter by company.
- if ($company = $this->getState('filter.company'))
+ elseif (CostbenefitprojectionHelper::checkString($_causerisk))
{
- $query->where('a.company = ' . $db->quote($db->escape($company)));
+ $query->where('a.causerisk = ' . $db->quote($db->escape($_causerisk)));
+ }
+ // Filter by Company.
+ $_company = $this->getState('filter.company');
+ if (is_numeric($_company))
+ {
+ if (is_float($_company))
+ {
+ $query->where('a.company = ' . (float) $_company);
+ }
+ else
+ {
+ $query->where('a.company = ' . (int) $_company);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_company))
+ {
+ $query->where('a.company = ' . $db->quote($db->escape($_company)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -251,7 +282,7 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -269,7 +300,24 @@ class CostbenefitprojectionModelScaling_factors extends JModelList
// From the costbenefitprojection_scaling_factor table
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Filter by companies (admin sees all)
if ( !$user->authorise('core.options', 'com_costbenefitprojection'))
diff --git a/admin/models/service_provider.php b/admin/models/service_provider.php
index e377f76e..86d3faa6 100644
--- a/admin/models/service_provider.php
+++ b/admin/models/service_provider.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_provider.php
@@ -20,8 +20,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-use Joomla\Registry\Registry;
-use Joomla\String\StringHelper;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
@@ -199,9 +199,17 @@ class CostbenefitprojectionModelService_provider extends JModelAdmin
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
- if ($access = $this->getState('filter.access'))
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
{
- $query->where('a.access = ' . (int) $access);
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (CostbenefitprojectionHelper::checkArray($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
diff --git a/admin/models/service_providers.php b/admin/models/service_providers.php
index 8bd64f52..58628114 100644
--- a/admin/models/service_providers.php
+++ b/admin/models/service_providers.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_providers.php
@@ -37,8 +37,8 @@ class CostbenefitprojectionModelService_providers extends JModelList
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
- 'g.name',
- 'h.name',
+ 'h.name','country',
+ 'g.name','user',
'a.publicname','publicname',
'a.publicemail','publicemail',
'a.publicnumber','publicnumber'
@@ -47,11 +47,17 @@ class CostbenefitprojectionModelService_providers extends JModelList
parent::__construct($config);
}
-
+
/**
* Method to auto-populate the model state.
*
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
* @return void
+ *
*/
protected function populateState($ordering = null, $direction = null)
{
@@ -61,13 +67,32 @@ class CostbenefitprojectionModelService_providers extends JModelList
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
- }
- $user = $this->getUserStateFromRequest($this->context . '.filter.user', 'filter_user');
- $this->setState('filter.user', $user);
+ }
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ $this->setState('filter.access', $access);
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
$country = $this->getUserStateFromRequest($this->context . '.filter.country', 'filter_country');
$this->setState('filter.country', $country);
+ $user = $this->getUserStateFromRequest($this->context . '.filter.user', 'filter_user');
+ $this->setState('filter.user', $user);
+
$publicname = $this->getUserStateFromRequest($this->context . '.filter.publicname', 'filter_publicname');
$this->setState('filter.publicname', $publicname);
@@ -76,24 +101,6 @@ class CostbenefitprojectionModelService_providers extends JModelList
$publicnumber = $this->getUserStateFromRequest($this->context . '.filter.publicnumber', 'filter_publicnumber');
$this->setState('filter.publicnumber', $publicnumber);
-
- $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
- $this->setState('filter.sorting', $sorting);
-
- $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
- $this->setState('filter.access', $access);
-
- $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
- $this->setState('filter.search', $search);
-
- $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
- $this->setState('filter.published', $published);
-
- $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
- $this->setState('filter.created_by', $created_by);
-
- $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
- $this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
@@ -206,15 +213,27 @@ class CostbenefitprojectionModelService_providers extends JModelList
}
}
- // Filter by country.
- if ($country = $this->getState('filter.country'))
+ // Filter by Country.
+ $_country = $this->getState('filter.country');
+ if (is_numeric($_country))
{
- $query->where('a.country = ' . $db->quote($db->escape($country)));
+ if (is_float($_country))
+ {
+ $query->where('a.country = ' . (float) $_country);
+ }
+ else
+ {
+ $query->where('a.country = ' . (int) $_country);
+ }
+ }
+ elseif (CostbenefitprojectionHelper::checkString($_country))
+ {
+ $query->where('a.country = ' . $db->quote($db->escape($_country)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
- $orderDirn = $this->state->get('list.direction', 'asc');
+ $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
@@ -234,7 +253,7 @@ class CostbenefitprojectionModelService_providers extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
- if (CostbenefitprojectionHelper::checkArray($pks))
+ if (($pks_size = CostbenefitprojectionHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@@ -252,7 +271,24 @@ class CostbenefitprojectionModelService_providers extends JModelList
// From the costbenefitprojection_service_provider table
$query->from($db->quoteName('#__costbenefitprojection_service_provider', 'a'));
- $query->where('a.id IN (' . implode(',',$pks) . ')');
+ // The bulk export path
+ if ('bulk' === $pks)
+ {
+ $query->where('a.id > 0');
+ }
+ // A large array of ID's will not work out well
+ elseif ($pks_size > 500)
+ {
+ // Use lowest ID
+ $query->where('a.id >= ' . (int) min($pks));
+ // Use highest ID
+ $query->where('a.id <= ' . (int) max($pks));
+ }
+ // The normal default path
+ else
+ {
+ $query->where('a.id IN (' . implode(',',$pks) . ')');
+ }
// Filter the providers (admin sees all)
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
@@ -354,8 +390,8 @@ class CostbenefitprojectionModelService_providers extends JModelList
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
- $id .= ':' . $this->getState('filter.user');
$id .= ':' . $this->getState('filter.country');
+ $id .= ':' . $this->getState('filter.user');
$id .= ':' . $this->getState('filter.publicname');
$id .= ':' . $this->getState('filter.publicemail');
$id .= ':' . $this->getState('filter.publicnumber');
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index 5639c2d0..655637de 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -529,13 +529,3 @@ INSERT INTO `#__costbenefitprojection_currency` (`id`, `asset_id`, `alias`, `cod
(164, 0, '', 'ZZZ', 2, ',', 'Reserved', '', 0, '', 'O', '', '', 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 0, 0, 164);
-
---
--- Always insure this column rules is large enough for all the access control values.
---
-ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';
-
---
--- Always insure this column name is large enough for long component and view names.
---
-ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';
diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql
index 5d566a27..62fe149d 100644
--- a/admin/sql/uninstall.mysql.utf8.sql
+++ b/admin/sql/uninstall.mysql.utf8.sql
@@ -7,3 +7,4 @@ DROP TABLE IF EXISTS `#__costbenefitprojection_scaling_factor`;
DROP TABLE IF EXISTS `#__costbenefitprojection_intervention`;
DROP TABLE IF EXISTS `#__costbenefitprojection_currency`;
DROP TABLE IF EXISTS `#__costbenefitprojection_help_document`;
+
diff --git a/admin/sql/updates/mysql/3.4.6.sql b/admin/sql/updates/mysql/3.4.6.sql
new file mode 100644
index 00000000..4efc7b70
--- /dev/null
+++ b/admin/sql/updates/mysql/3.4.6.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `#__costbenefitprojection_intervention` ENGINE = InnoDB;
+
+ALTER TABLE `#__costbenefitprojection_intervention` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
diff --git a/admin/tables/causerisk.php b/admin/tables/causerisk.php
index 5fc5fa9a..da6f2585 100644
--- a/admin/tables/causerisk.php
+++ b/admin/tables/causerisk.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage causerisk.php
diff --git a/admin/tables/company.php b/admin/tables/company.php
index 2d0aa52c..63162401 100644
--- a/admin/tables/company.php
+++ b/admin/tables/company.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage company.php
diff --git a/admin/tables/country.php b/admin/tables/country.php
index 9730ecd0..a9874a9a 100644
--- a/admin/tables/country.php
+++ b/admin/tables/country.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage country.php
diff --git a/admin/tables/currency.php b/admin/tables/currency.php
index 91b40fe0..035e905d 100644
--- a/admin/tables/currency.php
+++ b/admin/tables/currency.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage currency.php
diff --git a/admin/tables/health_data.php b/admin/tables/health_data.php
index 98ea7ee8..267b947d 100644
--- a/admin/tables/health_data.php
+++ b/admin/tables/health_data.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage health_data.php
diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php
index a161f170..e7dde8d6 100644
--- a/admin/tables/help_document.php
+++ b/admin/tables/help_document.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage help_document.php
diff --git a/admin/tables/intervention.php b/admin/tables/intervention.php
index c26bad79..2a70db20 100644
--- a/admin/tables/intervention.php
+++ b/admin/tables/intervention.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage intervention.php
diff --git a/admin/tables/scaling_factor.php b/admin/tables/scaling_factor.php
index 4f93f379..6926ab6d 100644
--- a/admin/tables/scaling_factor.php
+++ b/admin/tables/scaling_factor.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage scaling_factor.php
diff --git a/admin/tables/service_provider.php b/admin/tables/service_provider.php
index 064bac43..0bd8ab44 100644
--- a/admin/tables/service_provider.php
+++ b/admin/tables/service_provider.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage service_provider.php
diff --git a/admin/views/causerisk/submitbutton.js b/admin/views/causerisk/submitbutton.js
index 50fd0585..a48d27cd 100644
--- a/admin/views/causerisk/submitbutton.js
+++ b/admin/views/causerisk/submitbutton.js
@@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage submitbutton.js
diff --git a/admin/views/causerisk/tmpl/edit.php b/admin/views/causerisk/tmpl/edit.php
index 52f938f5..badb4fcf 100644
--- a/admin/views/causerisk/tmpl/edit.php
+++ b/admin/views/causerisk/tmpl/edit.php
@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 3.4.x
- @build 30th May, 2020
+ @build 6th January, 2021
@created 15th June, 2012
@package Cost Benefit Projection
@subpackage edit.php
@@ -20,10 +20,10 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
-JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
-JHtml::_('behavior.tooltip');
-JHtml::_('behavior.formvalidation');
-JHtml::_('formbehavior.chosen', 'select');
+JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
+JHtml::_('behavior.tooltip');
+JHtml::_('behavior.formvalidation');
+JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
@@ -55,7 +55,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst
tab_name = 'causeriskTab'; ?>
- canDo->get('causerisk.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('causerisk.edit.state') || $this->canDo->get('core.edit.created')) : ?>
+ canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('causerisk.edit.state') || ($this->canDo->get('causerisk.delete') && $this->canDo->get('causerisk.edit.state'))) : ?>
|