From e7e6e6cb2e0e91d9f05cfcafaae30acdca06a231 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 6 Jan 2021 15:58:12 +0200 Subject: [PATCH] Updated with JCB v2.12.4 --- README.md | 44 ++++- admin/README.txt | 44 ++++- admin/assets/css/additional_info.css | 2 +- admin/assets/css/additional_information.css | 2 +- admin/assets/css/admin.css | 2 +- admin/assets/css/area.css | 2 +- admin/assets/css/area_type.css | 2 +- admin/assets/css/area_types.css | 2 +- admin/assets/css/areas.css | 2 +- admin/assets/css/countries.css | 2 +- admin/assets/css/country.css | 2 +- admin/assets/css/currencies.css | 2 +- admin/assets/css/currency.css | 2 +- admin/assets/css/dashboard.css | 2 +- admin/assets/css/facilities.css | 2 +- admin/assets/css/facility.css | 2 +- admin/assets/css/facility_type.css | 2 +- admin/assets/css/facility_types.css | 2 +- admin/assets/css/help_document.css | 2 +- admin/assets/css/help_documents.css | 2 +- admin/assets/css/info_type.css | 2 +- admin/assets/css/info_types.css | 2 +- admin/assets/css/payment.css | 2 +- admin/assets/css/payments.css | 2 +- admin/assets/css/region.css | 2 +- admin/assets/css/regions.css | 2 +- admin/assets/css/support_group.css | 2 +- admin/assets/css/support_groups.css | 2 +- admin/assets/js/admin.js | 2 +- admin/controller.php | 2 +- admin/controllers/additional_info.php | 2 +- admin/controllers/additional_information.php | 4 +- admin/controllers/ajax.json.php | 2 +- admin/controllers/area.php | 2 +- admin/controllers/area_type.php | 2 +- admin/controllers/area_types.php | 4 +- admin/controllers/areas.php | 4 +- admin/controllers/countries.php | 4 +- admin/controllers/country.php | 2 +- admin/controllers/currencies.php | 4 +- admin/controllers/currency.php | 2 +- admin/controllers/facilities.php | 4 +- admin/controllers/facility.php | 2 +- admin/controllers/facility_type.php | 2 +- admin/controllers/facility_types.php | 4 +- admin/controllers/help.php | 2 +- admin/controllers/help_document.php | 2 +- admin/controllers/help_documents.php | 4 +- admin/controllers/import.php | 2 +- admin/controllers/info_type.php | 2 +- admin/controllers/info_types.php | 4 +- admin/controllers/payment.php | 2 +- admin/controllers/payments.php | 4 +- admin/controllers/region.php | 2 +- admin/controllers/regions.php | 4 +- admin/controllers/support_group.php | 2 +- admin/controllers/support_groups.php | 4 +- admin/controllers/supportgroups.php | 2 +- admin/helpers/headercheck.php | 2 +- admin/helpers/html/batch_.php | 2 +- admin/helpers/supportgroups.php | 62 +++++-- .../en-GB/en-GB.com_supportgroups.ini | 25 ++- admin/layouts/additional_info/metadata.php | 2 +- admin/layouts/additional_info/publishing.php | 3 +- .../additional_info/settings_above.php | 2 +- .../additional_info/settings_fullwidth.php | 2 +- .../layouts/additional_info/settings_left.php | 2 +- .../support_groups_fullwidth.php | 10 +- admin/layouts/area/metadata.php | 2 +- admin/layouts/area/publishing.php | 3 +- admin/layouts/area/settings_above.php | 2 +- admin/layouts/area/settings_fullwidth.php | 2 +- admin/layouts/area/settings_left.php | 2 +- admin/layouts/area/settings_right.php | 2 +- .../layouts/area/support_groups_fullwidth.php | 10 +- admin/layouts/area_type/details_left.php | 2 +- admin/layouts/area_type/details_right.php | 2 +- admin/layouts/area_type/publishing.php | 3 +- admin/layouts/area_type/publlshing.php | 2 +- admin/layouts/batchselection.php | 2 +- admin/layouts/country/metadata.php | 2 +- admin/layouts/country/publishing.php | 3 +- admin/layouts/country/regions_fullwidth.php | 10 +- admin/layouts/country/settings_above.php | 2 +- admin/layouts/country/settings_left.php | 2 +- admin/layouts/country/settings_right.php | 2 +- admin/layouts/currency/details_above.php | 2 +- admin/layouts/currency/details_left.php | 2 +- admin/layouts/currency/details_right.php | 2 +- admin/layouts/currency/metadata.php | 2 +- admin/layouts/currency/publishing.php | 3 +- admin/layouts/facility/location_fullwidth.php | 2 +- admin/layouts/facility/metadata.php | 2 +- admin/layouts/facility/publishing.php | 3 +- admin/layouts/facility/settings_above.php | 2 +- admin/layouts/facility/settings_fullwidth.php | 2 +- admin/layouts/facility/settings_left.php | 2 +- admin/layouts/facility/settings_right.php | 2 +- admin/layouts/facility/settings_under.php | 2 +- admin/layouts/facility_type/details_left.php | 2 +- admin/layouts/facility_type/details_right.php | 2 +- admin/layouts/facility_type/publishing.php | 3 +- admin/layouts/facility_type/publlshing.php | 2 +- admin/layouts/help_document/details_above.php | 2 +- .../help_document/details_fullwidth.php | 2 +- admin/layouts/help_document/details_left.php | 2 +- admin/layouts/help_document/details_right.php | 2 +- admin/layouts/help_document/details_under.php | 2 +- admin/layouts/help_document/publishing.php | 2 +- admin/layouts/help_document/publlshing.php | 2 +- admin/layouts/info_type/details_left.php | 2 +- admin/layouts/info_type/details_right.php | 2 +- admin/layouts/info_type/publishing.php | 3 +- admin/layouts/info_type/publlshing.php | 2 +- admin/layouts/payment/details_above.php | 2 +- admin/layouts/payment/details_left.php | 2 +- admin/layouts/payment/details_right.php | 2 +- admin/layouts/payment/publishing.php | 3 +- admin/layouts/payment/publlshing.php | 2 +- admin/layouts/region/details_above.php | 2 +- admin/layouts/region/details_right.php | 2 +- admin/layouts/region/metadata.php | 2 +- admin/layouts/region/publishing.php | 3 +- admin/layouts/support_group/details_above.php | 2 +- .../support_group/details_fullwidth.php | 2 +- admin/layouts/support_group/details_left.php | 2 +- admin/layouts/support_group/details_right.php | 2 +- admin/layouts/support_group/details_under.php | 2 +- .../support_group/location_fullwidth.php | 2 +- admin/layouts/support_group/location_left.php | 2 +- admin/layouts/support_group/metadata.php | 2 +- .../support_group/payments_fullwidth.php | 10 +- admin/layouts/support_group/publishing.php | 3 +- admin/models/additional_info.php | 18 +- admin/models/additional_information.php | 118 ++++++++---- admin/models/ajax.php | 2 +- admin/models/area.php | 18 +- admin/models/area_type.php | 6 +- admin/models/area_types.php | 86 ++++++--- admin/models/areas.php | 138 ++++++++++---- admin/models/countries.php | 130 +++++++++---- admin/models/country.php | 18 +- admin/models/currencies.php | 86 ++++++--- admin/models/currency.php | 6 +- admin/models/facilities.php | 112 ++++++++---- admin/models/facility.php | 6 +- admin/models/facility_type.php | 6 +- admin/models/facility_types.php | 86 ++++++--- admin/models/fields/additionalinfo.php | 2 +- admin/models/fields/adminviewfolderlist.php | 2 +- admin/models/fields/areas.php | 2 +- admin/models/fields/areastype.php | 2 +- admin/models/fields/articles.php | 2 +- admin/models/fields/countries.php | 2 +- admin/models/fields/currency.php | 2 +- admin/models/fields/facilities.php | 2 +- admin/models/fields/facilitiestype.php | 2 +- admin/models/fields/infotype.php | 2 +- admin/models/fields/regions.php | 2 +- admin/models/fields/siteviewfolderlist.php | 2 +- admin/models/fields/supportgroups.php | 2 +- admin/models/forms/additional_info.js | 2 +- admin/models/forms/additional_info.xml | 8 + admin/models/forms/area.js | 2 +- admin/models/forms/area.xml | 8 + admin/models/forms/area_type.js | 2 +- admin/models/forms/area_type.xml | 8 + admin/models/forms/country.js | 2 +- admin/models/forms/country.xml | 8 + admin/models/forms/currency.js | 2 +- admin/models/forms/currency.xml | 8 + admin/models/forms/facility.js | 2 +- admin/models/forms/facility.xml | 8 + admin/models/forms/facility_type.js | 2 +- admin/models/forms/facility_type.xml | 8 + admin/models/forms/help_document.js | 2 +- admin/models/forms/info_type.js | 2 +- admin/models/forms/info_type.xml | 8 + admin/models/forms/payment.js | 2 +- admin/models/forms/payment.xml | 8 + admin/models/forms/region.js | 2 +- admin/models/forms/region.xml | 8 + admin/models/forms/support_group.js | 2 +- admin/models/forms/support_group.xml | 8 + admin/models/help_document.php | 8 +- admin/models/help_documents.php | 170 ++++++++++++----- admin/models/import.php | 12 +- admin/models/info_type.php | 6 +- admin/models/info_types.php | 86 ++++++--- admin/models/payment.php | 6 +- admin/models/payments.php | 122 ++++++++---- admin/models/region.php | 6 +- admin/models/regions.php | 118 ++++++++---- admin/models/support_group.php | 18 +- admin/models/support_groups.php | 138 ++++++++++---- admin/models/supportgroups.php | 44 +++-- admin/sql/install.mysql.utf8.sql | 21 +-- admin/sql/uninstall.mysql.utf8.sql | 1 + admin/supportgroups.php | 3 +- admin/tables/additional_info.php | 2 +- admin/tables/area.php | 2 +- admin/tables/area_type.php | 2 +- admin/tables/country.php | 2 +- admin/tables/currency.php | 2 +- admin/tables/facility.php | 2 +- admin/tables/facility_type.php | 2 +- admin/tables/help_document.php | 2 +- admin/tables/info_type.php | 2 +- admin/tables/payment.php | 2 +- admin/tables/region.php | 2 +- admin/tables/support_group.php | 2 +- admin/views/additional_info/submitbutton.js | 2 +- admin/views/additional_info/tmpl/edit.php | 12 +- admin/views/additional_info/view.html.php | 2 +- .../additional_information/tmpl/default.php | 129 +++++++------ .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../tmpl/default_body.php | 11 +- .../tmpl/default_foot.php | 2 +- .../tmpl/default_head.php | 4 +- .../tmpl/default_toolbar.php | 2 +- .../additional_information/view.html.php | 98 +++++----- admin/views/area/submitbutton.js | 2 +- admin/views/area/tmpl/edit.php | 12 +- admin/views/area/view.html.php | 2 +- admin/views/area_type/submitbutton.js | 2 +- admin/views/area_type/tmpl/edit.php | 12 +- admin/views/area_type/view.html.php | 2 +- admin/views/area_types/tmpl/default.php | 129 +++++++------ .../area_types/tmpl/default_batch_body.php | 4 +- .../area_types/tmpl/default_batch_footer.php | 4 +- admin/views/area_types/tmpl/default_body.php | 11 +- admin/views/area_types/tmpl/default_foot.php | 2 +- admin/views/area_types/tmpl/default_head.php | 4 +- .../views/area_types/tmpl/default_toolbar.php | 2 +- admin/views/area_types/view.html.php | 77 ++++---- admin/views/areas/tmpl/default.php | 129 +++++++------ admin/views/areas/tmpl/default_batch_body.php | 4 +- .../views/areas/tmpl/default_batch_footer.php | 4 +- admin/views/areas/tmpl/default_body.php | 11 +- admin/views/areas/tmpl/default_foot.php | 2 +- admin/views/areas/tmpl/default_head.php | 4 +- admin/views/areas/tmpl/default_toolbar.php | 2 +- admin/views/areas/view.html.php | 121 ++++++------ admin/views/countries/tmpl/default.php | 129 +++++++------ .../countries/tmpl/default_batch_body.php | 4 +- .../countries/tmpl/default_batch_footer.php | 4 +- admin/views/countries/tmpl/default_body.php | 11 +- admin/views/countries/tmpl/default_foot.php | 2 +- admin/views/countries/tmpl/default_head.php | 4 +- .../views/countries/tmpl/default_toolbar.php | 2 +- admin/views/countries/view.html.php | 124 +++++++------ admin/views/country/submitbutton.js | 2 +- admin/views/country/tmpl/edit.php | 12 +- admin/views/country/view.html.php | 2 +- admin/views/currencies/tmpl/default.php | 129 +++++++------ .../currencies/tmpl/default_batch_body.php | 4 +- .../currencies/tmpl/default_batch_footer.php | 4 +- admin/views/currencies/tmpl/default_body.php | 11 +- admin/views/currencies/tmpl/default_foot.php | 2 +- admin/views/currencies/tmpl/default_head.php | 4 +- .../views/currencies/tmpl/default_toolbar.php | 2 +- admin/views/currencies/view.html.php | 77 ++++---- admin/views/currency/submitbutton.js | 2 +- admin/views/currency/tmpl/edit.php | 12 +- admin/views/currency/view.html.php | 2 +- admin/views/facilities/tmpl/default.php | 129 +++++++------ .../facilities/tmpl/default_batch_body.php | 4 +- .../facilities/tmpl/default_batch_footer.php | 4 +- admin/views/facilities/tmpl/default_body.php | 11 +- admin/views/facilities/tmpl/default_foot.php | 2 +- admin/views/facilities/tmpl/default_head.php | 4 +- .../views/facilities/tmpl/default_toolbar.php | 2 +- admin/views/facilities/view.html.php | 98 +++++----- admin/views/facility/submitbutton.js | 2 +- admin/views/facility/tmpl/edit.php | 12 +- admin/views/facility/view.html.php | 2 +- admin/views/facility_type/submitbutton.js | 2 +- admin/views/facility_type/tmpl/edit.php | 12 +- admin/views/facility_type/view.html.php | 2 +- admin/views/facility_types/tmpl/default.php | 129 +++++++------ .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../facility_types/tmpl/default_body.php | 11 +- .../facility_types/tmpl/default_foot.php | 2 +- .../facility_types/tmpl/default_head.php | 4 +- .../facility_types/tmpl/default_toolbar.php | 2 +- admin/views/facility_types/view.html.php | 77 ++++---- admin/views/help_document/submitbutton.js | 2 +- admin/views/help_document/tmpl/edit.php | 31 +--- admin/views/help_document/view.html.php | 2 +- admin/views/help_documents/tmpl/default.php | 129 +++++++------ .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../help_documents/tmpl/default_body.php | 11 +- .../help_documents/tmpl/default_foot.php | 2 +- .../help_documents/tmpl/default_head.php | 4 +- .../help_documents/tmpl/default_toolbar.php | 2 +- admin/views/help_documents/view.html.php | 173 +++++++++--------- admin/views/import/tmpl/default.php | 2 +- admin/views/import/view.html.php | 2 +- admin/views/info_type/submitbutton.js | 2 +- admin/views/info_type/tmpl/edit.php | 12 +- admin/views/info_type/view.html.php | 2 +- admin/views/info_types/tmpl/default.php | 129 +++++++------ .../info_types/tmpl/default_batch_body.php | 4 +- .../info_types/tmpl/default_batch_footer.php | 4 +- admin/views/info_types/tmpl/default_body.php | 11 +- admin/views/info_types/tmpl/default_foot.php | 2 +- admin/views/info_types/tmpl/default_head.php | 4 +- .../views/info_types/tmpl/default_toolbar.php | 2 +- admin/views/info_types/view.html.php | 77 ++++---- admin/views/payment/submitbutton.js | 2 +- admin/views/payment/tmpl/edit.php | 12 +- admin/views/payment/view.html.php | 2 +- admin/views/payments/tmpl/default.php | 129 +++++++------ .../payments/tmpl/default_batch_body.php | 4 +- .../payments/tmpl/default_batch_footer.php | 4 +- admin/views/payments/tmpl/default_body.php | 11 +- admin/views/payments/tmpl/default_foot.php | 2 +- admin/views/payments/tmpl/default_head.php | 4 +- admin/views/payments/tmpl/default_toolbar.php | 2 +- admin/views/payments/view.html.php | 124 +++++++------ admin/views/region/submitbutton.js | 2 +- admin/views/region/tmpl/edit.php | 12 +- admin/views/region/view.html.php | 2 +- admin/views/regions/tmpl/default.php | 129 +++++++------ .../views/regions/tmpl/default_batch_body.php | 4 +- .../regions/tmpl/default_batch_footer.php | 4 +- admin/views/regions/tmpl/default_body.php | 11 +- admin/views/regions/tmpl/default_foot.php | 2 +- admin/views/regions/tmpl/default_head.php | 4 +- admin/views/regions/tmpl/default_toolbar.php | 2 +- admin/views/regions/view.html.php | 98 +++++----- admin/views/support_group/submitbutton.js | 2 +- admin/views/support_group/tmpl/edit.php | 12 +- admin/views/support_group/view.html.php | 2 +- admin/views/support_groups/tmpl/default.php | 129 +++++++------ .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../support_groups/tmpl/default_body.php | 11 +- .../support_groups/tmpl/default_foot.php | 2 +- .../support_groups/tmpl/default_head.php | 4 +- .../support_groups/tmpl/default_toolbar.php | 2 +- admin/views/support_groups/view.html.php | 123 +++++++------ admin/views/supportgroups/tmpl/default.php | 2 +- .../views/supportgroups/tmpl/default_main.php | 2 +- .../tmpl/default_readme_information.php | 2 +- ...t_vast_development_method_notice_board.php | 2 +- .../views/supportgroups/tmpl/default_vdm.php | 2 +- admin/views/supportgroups/view.html.php | 2 +- script.php | 121 +++++++----- site/assets/css/map.css | 2 +- site/assets/css/site.css | 2 +- site/assets/css/supportgroups.css | 2 +- site/assets/js/site.js | 2 +- site/controller.php | 2 +- site/controllers/ajax.json.php | 2 +- site/controllers/help.php | 2 +- site/helpers/category.php | 2 +- site/helpers/headercheck.php | 2 +- site/helpers/route.php | 2 +- site/helpers/supportgroups.php | 7 +- site/models/ajax.php | 2 +- site/models/map.php | 2 +- site/models/supportgroups.php | 2 +- site/router.php | 2 +- site/supportgroups.php | 5 +- site/views/map/tmpl/default.php | 7 +- site/views/map/view.html.php | 6 +- site/views/supportgroups/tmpl/default.php | 7 +- site/views/supportgroups/view.html.php | 6 +- supportgroups.xml | 2 +- 373 files changed, 3331 insertions(+), 2481 deletions(-) diff --git a/README.md b/README.md index e0afbbb..939539c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a [Joomla 3.x](http://www.joomla.org/) component. - ![Support Groups image](https://github.com/namibia/Joomla-Support-Groups/raw/master/admin/assets/images/vdm-component.jpg "The Support Groups") + ![Support Groups image](https://github.com/Llewellynvdm/Joomla-Support-Groups/raw/master/admin/assets/images/vdm-component.jpg "The Support Groups") Support Groups component adds the ability to your Joomla website to manage various support groups and their related details. Integration with Google Maps is one of its main features. @@ -12,14 +12,14 @@ Support Groups component adds the ability to your Joomla website to manage vario + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Support Groups](http://www.vdm.io) + *First Build*: 24th February, 2016 -+ *Last Build*: 30th May, 2020 ++ *Last Build*: 6th January, 2021 + *Version*: 1.0.11 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html # Component Number -+ *Line count*: **69626** ++ *Line count*: **70488** + *File count*: **490** + *Folder count*: **98** @@ -28,4 +28,40 @@ Support Groups component adds the ability to your Joomla website to manage vario # Joomla Component Builder -For more information about JCB visit [VDM](http://vdm.bz/component-builder) Today! The future is here! \ No newline at end of file +For more information about JCB visit [VDM](http://vdm.bz/component-builder) Today! The future is here! + + +## Contributors +This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder). + +[![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors) + +### Backers +Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Joomla-Component-Builder#backer)] + +[![Our Backers on opencollective](https://opencollective.com/Joomla-Component-Builder/backers.svg?width=890)](https://opencollective.com/Joomla-Component-Builder#backers) + +### Sponsors +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Joomla-Component-Builder#sponsor)] + +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/0/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/0/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/1/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/1/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/2/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/2/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/3/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/3/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/4/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/4/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/5/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/5/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website) \ No newline at end of file diff --git a/admin/README.txt b/admin/README.txt index e0afbbb..939539c 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -2,7 +2,7 @@ This is a [Joomla 3.x](http://www.joomla.org/) component. - ![Support Groups image](https://github.com/namibia/Joomla-Support-Groups/raw/master/admin/assets/images/vdm-component.jpg "The Support Groups") + ![Support Groups image](https://github.com/Llewellynvdm/Joomla-Support-Groups/raw/master/admin/assets/images/vdm-component.jpg "The Support Groups") Support Groups component adds the ability to your Joomla website to manage various support groups and their related details. Integration with Google Maps is one of its main features. @@ -12,14 +12,14 @@ Support Groups component adds the ability to your Joomla website to manage vario + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Support Groups](http://www.vdm.io) + *First Build*: 24th February, 2016 -+ *Last Build*: 30th May, 2020 ++ *Last Build*: 6th January, 2021 + *Version*: 1.0.11 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html # Component Number -+ *Line count*: **69626** ++ *Line count*: **70488** + *File count*: **490** + *Folder count*: **98** @@ -28,4 +28,40 @@ Support Groups component adds the ability to your Joomla website to manage vario # Joomla Component Builder -For more information about JCB visit [VDM](http://vdm.bz/component-builder) Today! The future is here! \ No newline at end of file +For more information about JCB visit [VDM](http://vdm.bz/component-builder) Today! The future is here! + + +## Contributors +This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder). + +[![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors) + +### Backers +Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Joomla-Component-Builder#backer)] + +[![Our Backers on opencollective](https://opencollective.com/Joomla-Component-Builder/backers.svg?width=890)](https://opencollective.com/Joomla-Component-Builder#backers) + +### Sponsors +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Joomla-Component-Builder#sponsor)] + +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/0/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/0/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/1/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/1/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/2/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/2/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/3/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/3/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/4/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/4/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/5/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/5/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website) +[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website) \ No newline at end of file diff --git a/admin/assets/css/additional_info.css b/admin/assets/css/additional_info.css index 2a7e12c..89d7041 100644 --- a/admin/assets/css/additional_info.css +++ b/admin/assets/css/additional_info.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_info.css diff --git a/admin/assets/css/additional_information.css b/admin/assets/css/additional_information.css index ae7a24c..620f1ac 100644 --- a/admin/assets/css/additional_information.css +++ b/admin/assets/css/additional_information.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_information.css diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 1160f79..0817f3f 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage admin.css diff --git a/admin/assets/css/area.css b/admin/assets/css/area.css index 18d7d30..20b42ce 100644 --- a/admin/assets/css/area.css +++ b/admin/assets/css/area.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area.css diff --git a/admin/assets/css/area_type.css b/admin/assets/css/area_type.css index 1181311..90dc374 100644 --- a/admin/assets/css/area_type.css +++ b/admin/assets/css/area_type.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_type.css diff --git a/admin/assets/css/area_types.css b/admin/assets/css/area_types.css index 46914fb..c218185 100644 --- a/admin/assets/css/area_types.css +++ b/admin/assets/css/area_types.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_types.css diff --git a/admin/assets/css/areas.css b/admin/assets/css/areas.css index e431752..5878db6 100644 --- a/admin/assets/css/areas.css +++ b/admin/assets/css/areas.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage areas.css diff --git a/admin/assets/css/countries.css b/admin/assets/css/countries.css index 98cbe74..b66e9d8 100644 --- a/admin/assets/css/countries.css +++ b/admin/assets/css/countries.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage countries.css diff --git a/admin/assets/css/country.css b/admin/assets/css/country.css index a35a057..92563cd 100644 --- a/admin/assets/css/country.css +++ b/admin/assets/css/country.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage country.css diff --git a/admin/assets/css/currencies.css b/admin/assets/css/currencies.css index 8124c48..f427e81 100644 --- a/admin/assets/css/currencies.css +++ b/admin/assets/css/currencies.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currencies.css diff --git a/admin/assets/css/currency.css b/admin/assets/css/currency.css index e9a48da..862b7fd 100644 --- a/admin/assets/css/currency.css +++ b/admin/assets/css/currency.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currency.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 7f9daa9..aca1849 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage dashboard.css diff --git a/admin/assets/css/facilities.css b/admin/assets/css/facilities.css index 98b3853..42f82db 100644 --- a/admin/assets/css/facilities.css +++ b/admin/assets/css/facilities.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facilities.css diff --git a/admin/assets/css/facility.css b/admin/assets/css/facility.css index caa9c34..4bc6ea4 100644 --- a/admin/assets/css/facility.css +++ b/admin/assets/css/facility.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility.css diff --git a/admin/assets/css/facility_type.css b/admin/assets/css/facility_type.css index 61323e7..61634ef 100644 --- a/admin/assets/css/facility_type.css +++ b/admin/assets/css/facility_type.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_type.css diff --git a/admin/assets/css/facility_types.css b/admin/assets/css/facility_types.css index 5ee9a9d..0d493ed 100644 --- a/admin/assets/css/facility_types.css +++ b/admin/assets/css/facility_types.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_types.css diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css index 5d51232..fa2b85d 100644 --- a/admin/assets/css/help_document.css +++ b/admin/assets/css/help_document.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help_document.css diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css index 7328880..1a13146 100644 --- a/admin/assets/css/help_documents.css +++ b/admin/assets/css/help_documents.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help_documents.css diff --git a/admin/assets/css/info_type.css b/admin/assets/css/info_type.css index 2e8df2c..7722f53 100644 --- a/admin/assets/css/info_type.css +++ b/admin/assets/css/info_type.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_type.css diff --git a/admin/assets/css/info_types.css b/admin/assets/css/info_types.css index bb2de1d..4f5a070 100644 --- a/admin/assets/css/info_types.css +++ b/admin/assets/css/info_types.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_types.css diff --git a/admin/assets/css/payment.css b/admin/assets/css/payment.css index 99af645..d276ebd 100644 --- a/admin/assets/css/payment.css +++ b/admin/assets/css/payment.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payment.css diff --git a/admin/assets/css/payments.css b/admin/assets/css/payments.css index d4e5573..920d66d 100644 --- a/admin/assets/css/payments.css +++ b/admin/assets/css/payments.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payments.css diff --git a/admin/assets/css/region.css b/admin/assets/css/region.css index 803dfdb..e2b4987 100644 --- a/admin/assets/css/region.css +++ b/admin/assets/css/region.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage region.css diff --git a/admin/assets/css/regions.css b/admin/assets/css/regions.css index 33bd941..c48c998 100644 --- a/admin/assets/css/regions.css +++ b/admin/assets/css/regions.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage regions.css diff --git a/admin/assets/css/support_group.css b/admin/assets/css/support_group.css index 437f47e..5a3f27e 100644 --- a/admin/assets/css/support_group.css +++ b/admin/assets/css/support_group.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_group.css diff --git a/admin/assets/css/support_groups.css b/admin/assets/css/support_groups.css index e514fd8..18ded79 100644 --- a/admin/assets/css/support_groups.css +++ b/admin/assets/css/support_groups.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_groups.css diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 1a31a5e..66628d9 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage admin.js diff --git a/admin/controller.php b/admin/controller.php index 0df4504..f48420f 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage controller.php diff --git a/admin/controllers/additional_info.php b/admin/controllers/additional_info.php index 1c9db5c..211c46b 100644 --- a/admin/controllers/additional_info.php +++ b/admin/controllers/additional_info.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_info.php diff --git a/admin/controllers/additional_information.php b/admin/controllers/additional_information.php index 437e7e9..4cd0145 100644 --- a/admin/controllers/additional_information.php +++ b/admin/controllers/additional_information.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_information.php @@ -69,7 +69,7 @@ class SupportgroupsControllerAdditional_information 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('Additional_information'); // get the data to export diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 6780fb7..28a2c88 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage ajax.json.php diff --git a/admin/controllers/area.php b/admin/controllers/area.php index 3bfe5eb..37b43fb 100644 --- a/admin/controllers/area.php +++ b/admin/controllers/area.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area.php diff --git a/admin/controllers/area_type.php b/admin/controllers/area_type.php index 075a4a7..8ef94b0 100644 --- a/admin/controllers/area_type.php +++ b/admin/controllers/area_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_type.php diff --git a/admin/controllers/area_types.php b/admin/controllers/area_types.php index 03a450a..7f7c0c3 100644 --- a/admin/controllers/area_types.php +++ b/admin/controllers/area_types.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_types.php @@ -69,7 +69,7 @@ class SupportgroupsControllerArea_types 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('Area_types'); // get the data to export diff --git a/admin/controllers/areas.php b/admin/controllers/areas.php index c450ce0..e1351ee 100644 --- a/admin/controllers/areas.php +++ b/admin/controllers/areas.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage areas.php @@ -69,7 +69,7 @@ class SupportgroupsControllerAreas 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('Areas'); // get the data to export diff --git a/admin/controllers/countries.php b/admin/controllers/countries.php index c853ebc..4065a14 100644 --- a/admin/controllers/countries.php +++ b/admin/controllers/countries.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage countries.php @@ -69,7 +69,7 @@ class SupportgroupsControllerCountries 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 79b1d1f..0563c19 100644 --- a/admin/controllers/country.php +++ b/admin/controllers/country.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage country.php diff --git a/admin/controllers/currencies.php b/admin/controllers/currencies.php index 6c1dd9e..03e555b 100644 --- a/admin/controllers/currencies.php +++ b/admin/controllers/currencies.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currencies.php @@ -69,7 +69,7 @@ class SupportgroupsControllerCurrencies 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 1426a04..46c6cfe 100644 --- a/admin/controllers/currency.php +++ b/admin/controllers/currency.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currency.php diff --git a/admin/controllers/facilities.php b/admin/controllers/facilities.php index 21008d8..47de98d 100644 --- a/admin/controllers/facilities.php +++ b/admin/controllers/facilities.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facilities.php @@ -69,7 +69,7 @@ class SupportgroupsControllerFacilities 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('Facilities'); // get the data to export diff --git a/admin/controllers/facility.php b/admin/controllers/facility.php index c6ccb1f..8136161 100644 --- a/admin/controllers/facility.php +++ b/admin/controllers/facility.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility.php diff --git a/admin/controllers/facility_type.php b/admin/controllers/facility_type.php index 57171ec..1e6de43 100644 --- a/admin/controllers/facility_type.php +++ b/admin/controllers/facility_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_type.php diff --git a/admin/controllers/facility_types.php b/admin/controllers/facility_types.php index c570197..c7294a8 100644 --- a/admin/controllers/facility_types.php +++ b/admin/controllers/facility_types.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_types.php @@ -69,7 +69,7 @@ class SupportgroupsControllerFacility_types 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('Facility_types'); // get the data to export diff --git a/admin/controllers/help.php b/admin/controllers/help.php index fa2b41a..1bfdbb0 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help.php diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index 2cc2d61..48497ea 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help_document.php diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index 5ec2ab7..b620472 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help_documents.php @@ -69,7 +69,7 @@ class SupportgroupsControllerHelp_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 7f7dd5d..589d60b 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage import.php diff --git a/admin/controllers/info_type.php b/admin/controllers/info_type.php index 315dd78..315a4d2 100644 --- a/admin/controllers/info_type.php +++ b/admin/controllers/info_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_type.php diff --git a/admin/controllers/info_types.php b/admin/controllers/info_types.php index d5a5b19..cf333e7 100644 --- a/admin/controllers/info_types.php +++ b/admin/controllers/info_types.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_types.php @@ -69,7 +69,7 @@ class SupportgroupsControllerInfo_types 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('Info_types'); // get the data to export diff --git a/admin/controllers/payment.php b/admin/controllers/payment.php index 3798e78..e24d865 100644 --- a/admin/controllers/payment.php +++ b/admin/controllers/payment.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payment.php diff --git a/admin/controllers/payments.php b/admin/controllers/payments.php index b5a7611..0a0b7b3 100644 --- a/admin/controllers/payments.php +++ b/admin/controllers/payments.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payments.php @@ -69,7 +69,7 @@ class SupportgroupsControllerPayments 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('Payments'); // get the data to export diff --git a/admin/controllers/region.php b/admin/controllers/region.php index df7a46d..9b5330f 100644 --- a/admin/controllers/region.php +++ b/admin/controllers/region.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage region.php diff --git a/admin/controllers/regions.php b/admin/controllers/regions.php index e277792..a1c7770 100644 --- a/admin/controllers/regions.php +++ b/admin/controllers/regions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage regions.php @@ -69,7 +69,7 @@ class SupportgroupsControllerRegions 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('Regions'); // get the data to export diff --git a/admin/controllers/support_group.php b/admin/controllers/support_group.php index 85661bf..a3461d2 100644 --- a/admin/controllers/support_group.php +++ b/admin/controllers/support_group.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_group.php diff --git a/admin/controllers/support_groups.php b/admin/controllers/support_groups.php index d73c353..d3ec7d8 100644 --- a/admin/controllers/support_groups.php +++ b/admin/controllers/support_groups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_groups.php @@ -69,7 +69,7 @@ class SupportgroupsControllerSupport_groups 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('Support_groups'); // get the data to export diff --git a/admin/controllers/supportgroups.php b/admin/controllers/supportgroups.php index b6fdd3c..d8d8bb0 100644 --- a/admin/controllers/supportgroups.php +++ b/admin/controllers/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 03da9b6..043e266 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage headercheck.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index a180fc7..6765321 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage batch_.php diff --git a/admin/helpers/supportgroups.php b/admin/helpers/supportgroups.php index 634686f..29b5b8a 100644 --- a/admin/helpers/supportgroups.php +++ b/admin/helpers/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php @@ -26,8 +26,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; @@ -624,6 +625,8 @@ abstract class SupportgroupsHelper ->setLastModifiedBy($modified) ->setTitle($title) ->setSubject($subjectTab); + // The file type + $file_type = 'Xls'; // set description if ($description) { @@ -663,21 +666,46 @@ abstract class SupportgroupsHelper )); // 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++; } @@ -697,7 +725,7 @@ abstract class SupportgroupsHelper // 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'); @@ -708,7 +736,7 @@ abstract class SupportgroupsHelper 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/language/en-GB/en-GB.com_supportgroups.ini b/admin/language/en-GB/en-GB.com_supportgroups.ini index 78588e2..19829ea 100644 --- a/admin/language/en-GB/en-GB.com_supportgroups.ini +++ b/admin/language/en-GB/en-GB.com_supportgroups.ini @@ -46,6 +46,8 @@ COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_CHECKED_IN_1="%d Additional Inf COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_CHECKED_IN_MORE="%d Additional Information successfully checked in." COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_DELETED="%s Additional Information deleted." COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_DELETED_1="%s Additional Info deleted." +COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_FAILED_PUBLISHING="%s Additional Information failed publishing." +COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_FAILED_PUBLISHING_1="%s Additional Info failed publishing." COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_FEATURED="%s Additional Information featured." COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_FEATURED_1="%s Additional Info featured." COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_N_ITEMS_PUBLISHED="%s Additional Information published." @@ -145,6 +147,8 @@ COM_SUPPORTGROUPS_AREAS_N_ITEMS_CHECKED_IN_1="%d Area successfully checked in." COM_SUPPORTGROUPS_AREAS_N_ITEMS_CHECKED_IN_MORE="%d Areas successfully checked in." COM_SUPPORTGROUPS_AREAS_N_ITEMS_DELETED="%s Areas deleted." COM_SUPPORTGROUPS_AREAS_N_ITEMS_DELETED_1="%s Area deleted." +COM_SUPPORTGROUPS_AREAS_N_ITEMS_FAILED_PUBLISHING="%s Areas failed publishing." +COM_SUPPORTGROUPS_AREAS_N_ITEMS_FAILED_PUBLISHING_1="%s Area failed publishing." COM_SUPPORTGROUPS_AREAS_N_ITEMS_FEATURED="%s Areas featured." COM_SUPPORTGROUPS_AREAS_N_ITEMS_FEATURED_1="%s Area featured." COM_SUPPORTGROUPS_AREAS_N_ITEMS_PUBLISHED="%s Areas published." @@ -234,6 +238,8 @@ COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_CHECKED_IN_1="%d Area Type successfully che COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Area Types successfully checked in." COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_DELETED="%s Area Types deleted." COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_DELETED_1="%s Area Type deleted." +COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Area Types failed publishing." +COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Area Type failed publishing." COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_FEATURED="%s Area Types featured." COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_FEATURED_1="%s Area Type featured." COM_SUPPORTGROUPS_AREA_TYPES_N_ITEMS_PUBLISHED="%s Area Types published." @@ -415,6 +421,8 @@ COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_CHECKED_IN_1="%d Country successfully checke COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_CHECKED_IN_MORE="%d Countries successfully checked in." COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_DELETED="%s Countries deleted." COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_DELETED_1="%s Country deleted." +COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_FAILED_PUBLISHING="%s Countries failed publishing." +COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_FAILED_PUBLISHING_1="%s Country failed publishing." COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_FEATURED="%s Countries featured." COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_FEATURED_1="%s Country featured." COM_SUPPORTGROUPS_COUNTRIES_N_ITEMS_PUBLISHED="%s Countries published." @@ -520,6 +528,8 @@ COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_CHECKED_IN_1="%d Currency successfully chec COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_CHECKED_IN_MORE="%d Currencies successfully checked in." COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_DELETED="%s Currencies deleted." COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_DELETED_1="%s Currency deleted." +COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_FAILED_PUBLISHING="%s Currencies failed publishing." +COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_FAILED_PUBLISHING_1="%s Currency failed publishing." COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_FEATURED="%s Currencies featured." COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_FEATURED_1="%s Currency featured." COM_SUPPORTGROUPS_CURRENCIES_N_ITEMS_PUBLISHED="%s Currencies published." @@ -680,6 +690,8 @@ COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_CHECKED_IN_1="%d Facility successfully chec COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_CHECKED_IN_MORE="%d Facilities successfully checked in." COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_DELETED="%s Facilities deleted." COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_DELETED_1="%s Facility deleted." +COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_FAILED_PUBLISHING="%s Facilities failed publishing." +COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_FAILED_PUBLISHING_1="%s Facility failed publishing." COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_FEATURED="%s Facilities featured." COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_FEATURED_1="%s Facility featured." COM_SUPPORTGROUPS_FACILITIES_N_ITEMS_PUBLISHED="%s Facilities published." @@ -772,6 +784,8 @@ COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_CHECKED_IN_1="%d Facility Type successf COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Facility Types successfully checked in." COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_DELETED="%s Facility Types deleted." COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_DELETED_1="%s Facility Type deleted." +COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Facility Types failed publishing." +COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Facility Type failed publishing." COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_FEATURED="%s Facility Types featured." COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_FEATURED_1="%s Facility Type featured." COM_SUPPORTGROUPS_FACILITY_TYPES_N_ITEMS_PUBLISHED="%s Facility Types published." @@ -845,6 +859,8 @@ COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_1="%d Help Document successf COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_MORE="%d Help Documents successfully checked in." COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_DELETED="%s Help Documents deleted." COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_DELETED_1="%s Help Document deleted." +COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_FAILED_PUBLISHING="%s Help Documents failed publishing." +COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Help Document failed publishing." COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_FEATURED="%s Help Documents featured." COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_FEATURED_1="%s Help Document featured." COM_SUPPORTGROUPS_HELP_DOCUMENTS_N_ITEMS_PUBLISHED="%s Help Documents published." @@ -891,7 +907,6 @@ COM_SUPPORTGROUPS_HELP_DOCUMENT_MODIFIED_DATE_LABEL="Modified Date" COM_SUPPORTGROUPS_HELP_DOCUMENT_NEW="A New Help Document" COM_SUPPORTGROUPS_HELP_DOCUMENT_NOT_REQUIRED="Not Required" COM_SUPPORTGROUPS_HELP_DOCUMENT_ORDERING_LABEL="Ordering" -COM_SUPPORTGROUPS_HELP_DOCUMENT_PERMISSION="Permissions" COM_SUPPORTGROUPS_HELP_DOCUMENT_PUBLISHING="Publishing" COM_SUPPORTGROUPS_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_SUPPORTGROUPS_HELP_DOCUMENT_SELECT_AN_OPTION="Select an option" @@ -1008,6 +1023,8 @@ COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_CHECKED_IN_1="%d Info Type successfully che COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Info Types successfully checked in." COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_DELETED="%s Info Types deleted." COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_DELETED_1="%s Info Type deleted." +COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Info Types failed publishing." +COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Info Type failed publishing." COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_FEATURED="%s Info Types featured." COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_FEATURED_1="%s Info Type featured." COM_SUPPORTGROUPS_INFO_TYPES_N_ITEMS_PUBLISHED="%s Info Types published." @@ -1101,6 +1118,8 @@ COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_CHECKED_IN_1="%d Payment successfully checked COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_CHECKED_IN_MORE="%d Payments successfully checked in." COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_DELETED="%s Payments deleted." COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_DELETED_1="%s Payment deleted." +COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_FAILED_PUBLISHING="%s Payments failed publishing." +COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Payment failed publishing." COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_FEATURED="%s Payments featured." COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_FEATURED_1="%s Payment featured." COM_SUPPORTGROUPS_PAYMENTS_N_ITEMS_PUBLISHED="%s Payments published." @@ -1219,6 +1238,8 @@ COM_SUPPORTGROUPS_REGIONS_N_ITEMS_CHECKED_IN_1="%d Region successfully checked i COM_SUPPORTGROUPS_REGIONS_N_ITEMS_CHECKED_IN_MORE="%d Regions successfully checked in." COM_SUPPORTGROUPS_REGIONS_N_ITEMS_DELETED="%s Regions deleted." COM_SUPPORTGROUPS_REGIONS_N_ITEMS_DELETED_1="%s Region deleted." +COM_SUPPORTGROUPS_REGIONS_N_ITEMS_FAILED_PUBLISHING="%s Regions failed publishing." +COM_SUPPORTGROUPS_REGIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Region failed publishing." COM_SUPPORTGROUPS_REGIONS_N_ITEMS_FEATURED="%s Regions featured." COM_SUPPORTGROUPS_REGIONS_N_ITEMS_FEATURED_1="%s Region featured." COM_SUPPORTGROUPS_REGIONS_N_ITEMS_PUBLISHED="%s Regions published." @@ -1346,6 +1367,8 @@ COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_CHECKED_IN_1="%d Support Group successf COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_CHECKED_IN_MORE="%d Support Groups successfully checked in." COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_DELETED="%s Support Groups deleted." COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_DELETED_1="%s Support Group deleted." +COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_FAILED_PUBLISHING="%s Support Groups failed publishing." +COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_FAILED_PUBLISHING_1="%s Support Group failed publishing." COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_FEATURED="%s Support Groups featured." COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_FEATURED_1="%s Support Group featured." COM_SUPPORTGROUPS_SUPPORT_GROUPS_N_ITEMS_PUBLISHED="%s Support Groups published." diff --git a/admin/layouts/additional_info/metadata.php b/admin/layouts/additional_info/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/additional_info/metadata.php +++ b/admin/layouts/additional_info/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/additional_info/publishing.php b/admin/layouts/additional_info/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/additional_info/publishing.php +++ b/admin/layouts/additional_info/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/additional_info/settings_above.php b/admin/layouts/additional_info/settings_above.php index b59554f..8d46386 100644 --- a/admin/layouts/additional_info/settings_above.php +++ b/admin/layouts/additional_info/settings_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_above.php diff --git a/admin/layouts/additional_info/settings_fullwidth.php b/admin/layouts/additional_info/settings_fullwidth.php index 5a7b8a0..b83236c 100644 --- a/admin/layouts/additional_info/settings_fullwidth.php +++ b/admin/layouts/additional_info/settings_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_fullwidth.php diff --git a/admin/layouts/additional_info/settings_left.php b/admin/layouts/additional_info/settings_left.php index 78da7a5..c4e68b2 100644 --- a/admin/layouts/additional_info/settings_left.php +++ b/admin/layouts/additional_info/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_left.php diff --git a/admin/layouts/additional_info/support_groups_fullwidth.php b/admin/layouts/additional_info/support_groups_fullwidth.php index 98fa663..8104e2e 100644 --- a/admin/layouts/additional_info/support_groups_fullwidth.php +++ b/admin/layouts/additional_info/support_groups_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_groups_fullwidth.php @@ -124,25 +124,25 @@ else escape($item->female); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/area/metadata.php b/admin/layouts/area/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/area/metadata.php +++ b/admin/layouts/area/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/area/publishing.php b/admin/layouts/area/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/area/publishing.php +++ b/admin/layouts/area/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/area/settings_above.php b/admin/layouts/area/settings_above.php index 4648897..e2e0628 100644 --- a/admin/layouts/area/settings_above.php +++ b/admin/layouts/area/settings_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_above.php diff --git a/admin/layouts/area/settings_fullwidth.php b/admin/layouts/area/settings_fullwidth.php index 5a7b8a0..b83236c 100644 --- a/admin/layouts/area/settings_fullwidth.php +++ b/admin/layouts/area/settings_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_fullwidth.php diff --git a/admin/layouts/area/settings_left.php b/admin/layouts/area/settings_left.php index 8b84aef..c9bfd55 100644 --- a/admin/layouts/area/settings_left.php +++ b/admin/layouts/area/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_left.php diff --git a/admin/layouts/area/settings_right.php b/admin/layouts/area/settings_right.php index 2a87092..40d5671 100644 --- a/admin/layouts/area/settings_right.php +++ b/admin/layouts/area/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_right.php diff --git a/admin/layouts/area/support_groups_fullwidth.php b/admin/layouts/area/support_groups_fullwidth.php index 5cdc38e..f822651 100644 --- a/admin/layouts/area/support_groups_fullwidth.php +++ b/admin/layouts/area/support_groups_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_groups_fullwidth.php @@ -127,25 +127,25 @@ $can = SupportgroupsHelper::getActions('support_group'); escape($item->female); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/area_type/details_left.php b/admin/layouts/area_type/details_left.php index 913f173..75fae68 100644 --- a/admin/layouts/area_type/details_left.php +++ b/admin/layouts/area_type/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/area_type/details_right.php b/admin/layouts/area_type/details_right.php index 9529368..fb57780 100644 --- a/admin/layouts/area_type/details_right.php +++ b/admin/layouts/area_type/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/area_type/publishing.php b/admin/layouts/area_type/publishing.php index 1bd0eec..1c1b703 100644 --- a/admin/layouts/area_type/publishing.php +++ b/admin/layouts/area_type/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/area_type/publlshing.php b/admin/layouts/area_type/publlshing.php index 9c9916a..06bf2f7 100644 --- a/admin/layouts/area_type/publlshing.php +++ b/admin/layouts/area_type/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publlshing.php diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 43a3b62..67eb203 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage batchselection.php diff --git a/admin/layouts/country/metadata.php b/admin/layouts/country/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/country/metadata.php +++ b/admin/layouts/country/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/country/publishing.php b/admin/layouts/country/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/country/publishing.php +++ b/admin/layouts/country/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/regions_fullwidth.php b/admin/layouts/country/regions_fullwidth.php index d5ccdb8..82bbf24 100644 --- a/admin/layouts/country/regions_fullwidth.php +++ b/admin/layouts/country/regions_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage regions_fullwidth.php @@ -104,25 +104,25 @@ $can = SupportgroupsHelper::getActions('region'); escape($item->country_name); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/country/settings_above.php b/admin/layouts/country/settings_above.php index b59554f..8d46386 100644 --- a/admin/layouts/country/settings_above.php +++ b/admin/layouts/country/settings_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_above.php diff --git a/admin/layouts/country/settings_left.php b/admin/layouts/country/settings_left.php index 1f074d7..a2f19c0 100644 --- a/admin/layouts/country/settings_left.php +++ b/admin/layouts/country/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_left.php diff --git a/admin/layouts/country/settings_right.php b/admin/layouts/country/settings_right.php index 3561b30..db4cfdc 100644 --- a/admin/layouts/country/settings_right.php +++ b/admin/layouts/country/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_right.php diff --git a/admin/layouts/currency/details_above.php b/admin/layouts/currency/details_above.php index e5d221d..e5dc24c 100644 --- a/admin/layouts/currency/details_above.php +++ b/admin/layouts/currency/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_above.php diff --git a/admin/layouts/currency/details_left.php b/admin/layouts/currency/details_left.php index 554a8d8..053b349 100644 --- a/admin/layouts/currency/details_left.php +++ b/admin/layouts/currency/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/currency/details_right.php b/admin/layouts/currency/details_right.php index b093df7..644a444 100644 --- a/admin/layouts/currency/details_right.php +++ b/admin/layouts/currency/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/currency/metadata.php b/admin/layouts/currency/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/currency/metadata.php +++ b/admin/layouts/currency/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/currency/publishing.php b/admin/layouts/currency/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/currency/publishing.php +++ b/admin/layouts/currency/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/facility/location_fullwidth.php b/admin/layouts/facility/location_fullwidth.php index a27ba73..9a7195d 100644 --- a/admin/layouts/facility/location_fullwidth.php +++ b/admin/layouts/facility/location_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage location_fullwidth.php diff --git a/admin/layouts/facility/metadata.php b/admin/layouts/facility/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/facility/metadata.php +++ b/admin/layouts/facility/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/facility/publishing.php b/admin/layouts/facility/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/facility/publishing.php +++ b/admin/layouts/facility/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/facility/settings_above.php b/admin/layouts/facility/settings_above.php index b59554f..8d46386 100644 --- a/admin/layouts/facility/settings_above.php +++ b/admin/layouts/facility/settings_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_above.php diff --git a/admin/layouts/facility/settings_fullwidth.php b/admin/layouts/facility/settings_fullwidth.php index 5a7b8a0..b83236c 100644 --- a/admin/layouts/facility/settings_fullwidth.php +++ b/admin/layouts/facility/settings_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_fullwidth.php diff --git a/admin/layouts/facility/settings_left.php b/admin/layouts/facility/settings_left.php index 4b7ee9b..de7e2f5 100644 --- a/admin/layouts/facility/settings_left.php +++ b/admin/layouts/facility/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_left.php diff --git a/admin/layouts/facility/settings_right.php b/admin/layouts/facility/settings_right.php index 5daa7d1..a73dab7 100644 --- a/admin/layouts/facility/settings_right.php +++ b/admin/layouts/facility/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_right.php diff --git a/admin/layouts/facility/settings_under.php b/admin/layouts/facility/settings_under.php index 63db2d2..1e4d266 100644 --- a/admin/layouts/facility/settings_under.php +++ b/admin/layouts/facility/settings_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage settings_under.php diff --git a/admin/layouts/facility_type/details_left.php b/admin/layouts/facility_type/details_left.php index 913f173..75fae68 100644 --- a/admin/layouts/facility_type/details_left.php +++ b/admin/layouts/facility_type/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/facility_type/details_right.php b/admin/layouts/facility_type/details_right.php index 9529368..fb57780 100644 --- a/admin/layouts/facility_type/details_right.php +++ b/admin/layouts/facility_type/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/facility_type/publishing.php b/admin/layouts/facility_type/publishing.php index 1bd0eec..1c1b703 100644 --- a/admin/layouts/facility_type/publishing.php +++ b/admin/layouts/facility_type/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/facility_type/publlshing.php b/admin/layouts/facility_type/publlshing.php index 9c9916a..06bf2f7 100644 --- a/admin/layouts/facility_type/publlshing.php +++ b/admin/layouts/facility_type/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publlshing.php diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index 897ab87..a240c3d 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index b8f9939..b793ed5 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index d26b0da..82989c2 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 507e257..e2a857b 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 32222e5..358d792 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_under.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 1bd0eec..c5fcf03 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index 9c9916a..06bf2f7 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publlshing.php diff --git a/admin/layouts/info_type/details_left.php b/admin/layouts/info_type/details_left.php index 913f173..75fae68 100644 --- a/admin/layouts/info_type/details_left.php +++ b/admin/layouts/info_type/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/info_type/details_right.php b/admin/layouts/info_type/details_right.php index 9529368..fb57780 100644 --- a/admin/layouts/info_type/details_right.php +++ b/admin/layouts/info_type/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/info_type/publishing.php b/admin/layouts/info_type/publishing.php index 1bd0eec..1c1b703 100644 --- a/admin/layouts/info_type/publishing.php +++ b/admin/layouts/info_type/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/info_type/publlshing.php b/admin/layouts/info_type/publlshing.php index 9c9916a..06bf2f7 100644 --- a/admin/layouts/info_type/publlshing.php +++ b/admin/layouts/info_type/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publlshing.php diff --git a/admin/layouts/payment/details_above.php b/admin/layouts/payment/details_above.php index 5211e7f..82ab67a 100644 --- a/admin/layouts/payment/details_above.php +++ b/admin/layouts/payment/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_above.php diff --git a/admin/layouts/payment/details_left.php b/admin/layouts/payment/details_left.php index 5617276..6cc37d8 100644 --- a/admin/layouts/payment/details_left.php +++ b/admin/layouts/payment/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/payment/details_right.php b/admin/layouts/payment/details_right.php index 08fdda8..7a004e5 100644 --- a/admin/layouts/payment/details_right.php +++ b/admin/layouts/payment/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/payment/publishing.php b/admin/layouts/payment/publishing.php index 1bd0eec..1c1b703 100644 --- a/admin/layouts/payment/publishing.php +++ b/admin/layouts/payment/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/payment/publlshing.php b/admin/layouts/payment/publlshing.php index 9c9916a..06bf2f7 100644 --- a/admin/layouts/payment/publlshing.php +++ b/admin/layouts/payment/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publlshing.php diff --git a/admin/layouts/region/details_above.php b/admin/layouts/region/details_above.php index e5d221d..e5dc24c 100644 --- a/admin/layouts/region/details_above.php +++ b/admin/layouts/region/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_above.php diff --git a/admin/layouts/region/details_right.php b/admin/layouts/region/details_right.php index 2bf854f..57607c7 100644 --- a/admin/layouts/region/details_right.php +++ b/admin/layouts/region/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/region/metadata.php b/admin/layouts/region/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/region/metadata.php +++ b/admin/layouts/region/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/region/publishing.php b/admin/layouts/region/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/region/publishing.php +++ b/admin/layouts/region/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/support_group/details_above.php b/admin/layouts/support_group/details_above.php index e5d221d..e5dc24c 100644 --- a/admin/layouts/support_group/details_above.php +++ b/admin/layouts/support_group/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_above.php diff --git a/admin/layouts/support_group/details_fullwidth.php b/admin/layouts/support_group/details_fullwidth.php index 851dc4b..bc3216d 100644 --- a/admin/layouts/support_group/details_fullwidth.php +++ b/admin/layouts/support_group/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_fullwidth.php diff --git a/admin/layouts/support_group/details_left.php b/admin/layouts/support_group/details_left.php index b2e89e5..4ae5e33 100644 --- a/admin/layouts/support_group/details_left.php +++ b/admin/layouts/support_group/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_left.php diff --git a/admin/layouts/support_group/details_right.php b/admin/layouts/support_group/details_right.php index 4a66346..35372e9 100644 --- a/admin/layouts/support_group/details_right.php +++ b/admin/layouts/support_group/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_right.php diff --git a/admin/layouts/support_group/details_under.php b/admin/layouts/support_group/details_under.php index e7335e1..367038a 100644 --- a/admin/layouts/support_group/details_under.php +++ b/admin/layouts/support_group/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage details_under.php diff --git a/admin/layouts/support_group/location_fullwidth.php b/admin/layouts/support_group/location_fullwidth.php index a27ba73..9a7195d 100644 --- a/admin/layouts/support_group/location_fullwidth.php +++ b/admin/layouts/support_group/location_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage location_fullwidth.php diff --git a/admin/layouts/support_group/location_left.php b/admin/layouts/support_group/location_left.php index 8eb53e2..f402f49 100644 --- a/admin/layouts/support_group/location_left.php +++ b/admin/layouts/support_group/location_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage location_left.php diff --git a/admin/layouts/support_group/metadata.php b/admin/layouts/support_group/metadata.php index d81e5d1..930c1d8 100644 --- a/admin/layouts/support_group/metadata.php +++ b/admin/layouts/support_group/metadata.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage metadata.php diff --git a/admin/layouts/support_group/payments_fullwidth.php b/admin/layouts/support_group/payments_fullwidth.php index 5781dc0..1ce0fbf 100644 --- a/admin/layouts/support_group/payments_fullwidth.php +++ b/admin/layouts/support_group/payments_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payments_fullwidth.php @@ -98,25 +98,25 @@ $can = SupportgroupsHelper::getActions('payment'); escape($item->amount); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/support_group/publishing.php b/admin/layouts/support_group/publishing.php index bdc034f..5bd6a45 100644 --- a/admin/layouts/support_group/publishing.php +++ b/admin/layouts/support_group/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage publishing.php @@ -40,6 +40,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/models/additional_info.php b/admin/models/additional_info.php index 71a10fd..b80d526 100644 --- a/admin/models/additional_info.php +++ b/admin/models/additional_info.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_info.php @@ -26,8 +26,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; /** @@ -159,9 +159,17 @@ class SupportgroupsModelAdditional_info 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 (SupportgroupsHelper::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_supportgroups')) diff --git a/admin/models/additional_information.php b/admin/models/additional_information.php index 29845a0..c2581f0 100644 --- a/admin/models/additional_information.php +++ b/admin/models/additional_information.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_information.php @@ -40,21 +40,28 @@ class SupportgroupsModelAdditional_information 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' + 'g.name','info_type', + 'a.name','name' ); } 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,30 +71,31 @@ class SupportgroupsModelAdditional_information 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); $info_type = $this->getUserStateFromRequest($this->context . '.filter.info_type', 'filter_info_type'); - $this->setState('filter.info_type', $info_type); - - $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.info_type', $info_type); + + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); // List state information. parent::populateState($ordering, $direction); @@ -169,9 +177,17 @@ class SupportgroupsModelAdditional_information 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 (SupportgroupsHelper::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_supportgroups')) @@ -194,15 +210,27 @@ class SupportgroupsModelAdditional_information extends JModelList } } - // Filter by info_type. - if ($info_type = $this->getState('filter.info_type')) + // Filter by Info_type. + $_info_type = $this->getState('filter.info_type'); + if (is_numeric($_info_type)) { - $query->where('a.info_type = ' . $db->quote($db->escape($info_type))); + if (is_float($_info_type)) + { + $query->where('a.info_type = ' . (float) $_info_type); + } + else + { + $query->where('a.info_type = ' . (int) $_info_type); + } + } + elseif (SupportgroupsHelper::checkString($_info_type)) + { + $query->where('a.info_type = ' . $db->quote($db->escape($_info_type))); } // 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)); @@ -222,7 +250,7 @@ class SupportgroupsModelAdditional_information extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -240,7 +268,24 @@ class SupportgroupsModelAdditional_information extends JModelList // From the supportgroups_additional_info table $query->from($db->quoteName('#__supportgroups_additional_info', '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_supportgroups')) { @@ -328,11 +373,12 @@ class SupportgroupsModelAdditional_information 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.info_type'); + $id .= ':' . $this->getState('filter.info_type'); + $id .= ':' . $this->getState('filter.name'); return parent::getStoreId($id); } diff --git a/admin/models/ajax.php b/admin/models/ajax.php index d52274e..9720f2a 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage ajax.php diff --git a/admin/models/area.php b/admin/models/area.php index ff2f73b..8f9e255 100644 --- a/admin/models/area.php +++ b/admin/models/area.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area.php @@ -26,8 +26,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; /** @@ -178,9 +178,17 @@ class SupportgroupsModelArea 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 (SupportgroupsHelper::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_supportgroups')) diff --git a/admin/models/area_type.php b/admin/models/area_type.php index 3542dc7..56e71d5 100644 --- a/admin/models/area_type.php +++ b/admin/models/area_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_type.php @@ -26,8 +26,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/area_types.php b/admin/models/area_types.php index 1d95c5b..415e919 100644 --- a/admin/models/area_types.php +++ b/admin/models/area_types.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_types.php @@ -40,6 +40,7 @@ class SupportgroupsModelArea_types 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', @@ -49,11 +50,17 @@ class SupportgroupsModelArea_types 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) { @@ -63,27 +70,28 @@ class SupportgroupsModelArea_types 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); - - $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); @@ -161,9 +169,17 @@ class SupportgroupsModelArea_types 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 (SupportgroupsHelper::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_supportgroups')) @@ -189,7 +205,7 @@ class SupportgroupsModelArea_types 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)); @@ -209,7 +225,7 @@ class SupportgroupsModelArea_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -227,7 +243,24 @@ class SupportgroupsModelArea_types extends JModelList // From the supportgroups_area_type table $query->from($db->quoteName('#__supportgroups_area_type', '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_supportgroups')) { @@ -315,6 +348,7 @@ class SupportgroupsModelArea_types 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/areas.php b/admin/models/areas.php index 39126b8..6900a50 100644 --- a/admin/models/areas.php +++ b/admin/models/areas.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage areas.php @@ -40,22 +40,29 @@ class SupportgroupsModelAreas 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', - 'h.name' + 'g.name','area_type', + 'h.name','region', + 'a.name','name' ); } 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) { @@ -65,33 +72,34 @@ class SupportgroupsModelAreas 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); $area_type = $this->getUserStateFromRequest($this->context . '.filter.area_type', 'filter_area_type'); $this->setState('filter.area_type', $area_type); $region = $this->getUserStateFromRequest($this->context . '.filter.region', 'filter_region'); - $this->setState('filter.region', $region); - - $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.region', $region); + + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); // List state information. parent::populateState($ordering, $direction); @@ -186,9 +194,17 @@ class SupportgroupsModelAreas 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 (SupportgroupsHelper::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_supportgroups')) @@ -211,20 +227,44 @@ class SupportgroupsModelAreas extends JModelList } } - // Filter by area_type. - if ($area_type = $this->getState('filter.area_type')) + // Filter by Area_type. + $_area_type = $this->getState('filter.area_type'); + if (is_numeric($_area_type)) { - $query->where('a.area_type = ' . $db->quote($db->escape($area_type))); + if (is_float($_area_type)) + { + $query->where('a.area_type = ' . (float) $_area_type); + } + else + { + $query->where('a.area_type = ' . (int) $_area_type); + } } - // Filter by region. - if ($region = $this->getState('filter.region')) + elseif (SupportgroupsHelper::checkString($_area_type)) { - $query->where('a.region = ' . $db->quote($db->escape($region))); + $query->where('a.area_type = ' . $db->quote($db->escape($_area_type))); + } + // Filter by Region. + $_region = $this->getState('filter.region'); + if (is_numeric($_region)) + { + if (is_float($_region)) + { + $query->where('a.region = ' . (float) $_region); + } + else + { + $query->where('a.region = ' . (int) $_region); + } + } + elseif (SupportgroupsHelper::checkString($_region)) + { + $query->where('a.region = ' . $db->quote($db->escape($_region))); } // 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)); @@ -244,7 +284,7 @@ class SupportgroupsModelAreas extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -262,7 +302,24 @@ class SupportgroupsModelAreas extends JModelList // From the supportgroups_area table $query->from($db->quoteName('#__supportgroups_area', '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_supportgroups')) { @@ -359,12 +416,13 @@ class SupportgroupsModelAreas 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.area_type'); - $id .= ':' . $this->getState('filter.region'); + $id .= ':' . $this->getState('filter.region'); + $id .= ':' . $this->getState('filter.name'); return parent::getStoreId($id); } diff --git a/admin/models/countries.php b/admin/models/countries.php index 433fe6b..45ff508 100644 --- a/admin/models/countries.php +++ b/admin/models/countries.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage countries.php @@ -40,12 +40,13 @@ class SupportgroupsModelCountries 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', + 'g.name','currency', 'a.worldzone','worldzone', + 'a.name','name', 'a.codethree','codethree', 'a.codetwo','codetwo' ); @@ -53,11 +54,17 @@ class SupportgroupsModelCountries 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) { @@ -67,9 +74,25 @@ class SupportgroupsModelCountries 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); $currency = $this->getUserStateFromRequest($this->context . '.filter.currency', 'filter_currency'); $this->setState('filter.currency', $currency); @@ -77,29 +100,14 @@ class SupportgroupsModelCountries extends JModelList $worldzone = $this->getUserStateFromRequest($this->context . '.filter.worldzone', 'filter_worldzone'); $this->setState('filter.worldzone', $worldzone); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + $codethree = $this->getUserStateFromRequest($this->context . '.filter.codethree', 'filter_codethree'); $this->setState('filter.codethree', $codethree); $codetwo = $this->getUserStateFromRequest($this->context . '.filter.codetwo', 'filter_codetwo'); $this->setState('filter.codetwo', $codetwo); - - $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); @@ -181,9 +189,17 @@ class SupportgroupsModelCountries 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 (SupportgroupsHelper::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_supportgroups')) @@ -206,20 +222,44 @@ class SupportgroupsModelCountries 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 (SupportgroupsHelper::checkString($_currency)) + { + $query->where('a.currency = ' . $db->quote($db->escape($_currency))); } // Filter by Worldzone. - if ($worldzone = $this->getState('filter.worldzone')) + $_worldzone = $this->getState('filter.worldzone'); + if (is_numeric($_worldzone)) { - $query->where('a.worldzone = ' . $db->quote($db->escape($worldzone))); + if (is_float($_worldzone)) + { + $query->where('a.worldzone = ' . (float) $_worldzone); + } + else + { + $query->where('a.worldzone = ' . (int) $_worldzone); + } + } + elseif (SupportgroupsHelper::checkString($_worldzone)) + { + $query->where('a.worldzone = ' . $db->quote($db->escape($_worldzone))); } // 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)); @@ -239,7 +279,7 @@ class SupportgroupsModelCountries extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -257,7 +297,24 @@ class SupportgroupsModelCountries extends JModelList // From the supportgroups_country table $query->from($db->quoteName('#__supportgroups_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) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_supportgroups')) { @@ -345,12 +402,13 @@ class SupportgroupsModelCountries 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.currency'); $id .= ':' . $this->getState('filter.worldzone'); + $id .= ':' . $this->getState('filter.name'); $id .= ':' . $this->getState('filter.codethree'); $id .= ':' . $this->getState('filter.codetwo'); diff --git a/admin/models/country.php b/admin/models/country.php index 0a3e8b0..42bacd4 100644 --- a/admin/models/country.php +++ b/admin/models/country.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage country.php @@ -26,8 +26,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; /** @@ -172,9 +172,17 @@ class SupportgroupsModelCountry 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 (SupportgroupsHelper::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_supportgroups')) diff --git a/admin/models/currencies.php b/admin/models/currencies.php index d6da27a..6e83984 100644 --- a/admin/models/currencies.php +++ b/admin/models/currencies.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currencies.php @@ -40,6 +40,7 @@ class SupportgroupsModelCurrencies 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', @@ -52,11 +53,17 @@ class SupportgroupsModelCurrencies 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) { @@ -66,7 +73,26 @@ class SupportgroupsModelCurrencies 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); @@ -78,24 +104,6 @@ class SupportgroupsModelCurrencies 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); @@ -173,9 +181,17 @@ class SupportgroupsModelCurrencies 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 (SupportgroupsHelper::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_supportgroups')) @@ -201,7 +217,7 @@ class SupportgroupsModelCurrencies 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)); @@ -221,7 +237,7 @@ class SupportgroupsModelCurrencies extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -239,7 +255,24 @@ class SupportgroupsModelCurrencies extends JModelList // From the supportgroups_currency table $query->from($db->quoteName('#__supportgroups_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_supportgroups')) { @@ -327,6 +360,7 @@ class SupportgroupsModelCurrencies 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 97ca435..c3d8b21 100644 --- a/admin/models/currency.php +++ b/admin/models/currency.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currency.php @@ -26,8 +26,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/facilities.php b/admin/models/facilities.php index c101af5..7142b87 100644 --- a/admin/models/facilities.php +++ b/admin/models/facilities.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facilities.php @@ -40,11 +40,12 @@ class SupportgroupsModelFacilities 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','facility_type', 'a.name','name', - 'g.name', 'a.phone','phone', 'a.details','details' ); @@ -52,11 +53,17 @@ class SupportgroupsModelFacilities 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) { @@ -66,36 +73,37 @@ class SupportgroupsModelFacilities 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); $facility_type = $this->getUserStateFromRequest($this->context . '.filter.facility_type', 'filter_facility_type'); $this->setState('filter.facility_type', $facility_type); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + $phone = $this->getUserStateFromRequest($this->context . '.filter.phone', 'filter_phone'); $this->setState('filter.phone', $phone); $details = $this->getUserStateFromRequest($this->context . '.filter.details', 'filter_details'); $this->setState('filter.details', $details); - - $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); @@ -177,9 +185,17 @@ class SupportgroupsModelFacilities 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 (SupportgroupsHelper::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_supportgroups')) @@ -202,15 +218,27 @@ class SupportgroupsModelFacilities extends JModelList } } - // Filter by facility_type. - if ($facility_type = $this->getState('filter.facility_type')) + // Filter by Facility_type. + $_facility_type = $this->getState('filter.facility_type'); + if (is_numeric($_facility_type)) { - $query->where('a.facility_type = ' . $db->quote($db->escape($facility_type))); + if (is_float($_facility_type)) + { + $query->where('a.facility_type = ' . (float) $_facility_type); + } + else + { + $query->where('a.facility_type = ' . (int) $_facility_type); + } + } + elseif (SupportgroupsHelper::checkString($_facility_type)) + { + $query->where('a.facility_type = ' . $db->quote($db->escape($_facility_type))); } // 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)); @@ -230,7 +258,7 @@ class SupportgroupsModelFacilities extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -248,7 +276,24 @@ class SupportgroupsModelFacilities extends JModelList // From the supportgroups_facility table $query->from($db->quoteName('#__supportgroups_facility', '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_supportgroups')) { @@ -336,11 +381,12 @@ class SupportgroupsModelFacilities 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.facility_type'); + $id .= ':' . $this->getState('filter.name'); $id .= ':' . $this->getState('filter.phone'); $id .= ':' . $this->getState('filter.details'); diff --git a/admin/models/facility.php b/admin/models/facility.php index 5f2aada..6c122cf 100644 --- a/admin/models/facility.php +++ b/admin/models/facility.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility.php @@ -26,8 +26,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/facility_type.php b/admin/models/facility_type.php index eca708e..b69cccc 100644 --- a/admin/models/facility_type.php +++ b/admin/models/facility_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_type.php @@ -26,8 +26,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/facility_types.php b/admin/models/facility_types.php index fc2fd7e..8414985 100644 --- a/admin/models/facility_types.php +++ b/admin/models/facility_types.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_types.php @@ -40,6 +40,7 @@ class SupportgroupsModelFacility_types 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', @@ -49,11 +50,17 @@ class SupportgroupsModelFacility_types 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) { @@ -63,27 +70,28 @@ class SupportgroupsModelFacility_types 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); - - $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); @@ -161,9 +169,17 @@ class SupportgroupsModelFacility_types 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 (SupportgroupsHelper::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_supportgroups')) @@ -189,7 +205,7 @@ class SupportgroupsModelFacility_types 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)); @@ -209,7 +225,7 @@ class SupportgroupsModelFacility_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -227,7 +243,24 @@ class SupportgroupsModelFacility_types extends JModelList // From the supportgroups_facility_type table $query->from($db->quoteName('#__supportgroups_facility_type', '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_supportgroups')) { @@ -315,6 +348,7 @@ class SupportgroupsModelFacility_types 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/fields/additionalinfo.php b/admin/models/fields/additionalinfo.php index 184bc8f..2b37958 100644 --- a/admin/models/fields/additionalinfo.php +++ b/admin/models/fields/additionalinfo.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additionalinfo.php diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index 0c69d99..84746f5 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage adminviewfolderlist.php diff --git a/admin/models/fields/areas.php b/admin/models/fields/areas.php index ec82014..653c573 100644 --- a/admin/models/fields/areas.php +++ b/admin/models/fields/areas.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage areas.php diff --git a/admin/models/fields/areastype.php b/admin/models/fields/areastype.php index 4667f8e..073f253 100644 --- a/admin/models/fields/areastype.php +++ b/admin/models/fields/areastype.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage areastype.php diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index b72992f..59f9d6c 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage articles.php diff --git a/admin/models/fields/countries.php b/admin/models/fields/countries.php index 17e2195..e60eb2c 100644 --- a/admin/models/fields/countries.php +++ b/admin/models/fields/countries.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage countries.php diff --git a/admin/models/fields/currency.php b/admin/models/fields/currency.php index ec587e2..2a74d4b 100644 --- a/admin/models/fields/currency.php +++ b/admin/models/fields/currency.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currency.php diff --git a/admin/models/fields/facilities.php b/admin/models/fields/facilities.php index b0a0818..f0b65e3 100644 --- a/admin/models/fields/facilities.php +++ b/admin/models/fields/facilities.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facilities.php diff --git a/admin/models/fields/facilitiestype.php b/admin/models/fields/facilitiestype.php index 16bad45..deee128 100644 --- a/admin/models/fields/facilitiestype.php +++ b/admin/models/fields/facilitiestype.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facilitiestype.php diff --git a/admin/models/fields/infotype.php b/admin/models/fields/infotype.php index 3be1cd0..42aa2d8 100644 --- a/admin/models/fields/infotype.php +++ b/admin/models/fields/infotype.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage infotype.php diff --git a/admin/models/fields/regions.php b/admin/models/fields/regions.php index 33e6285..4f572ac 100644 --- a/admin/models/fields/regions.php +++ b/admin/models/fields/regions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage regions.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index 543c845..c0ecf00 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage siteviewfolderlist.php diff --git a/admin/models/fields/supportgroups.php b/admin/models/fields/supportgroups.php index 91d2d5e..ae21fd8 100644 --- a/admin/models/fields/supportgroups.php +++ b/admin/models/fields/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php diff --git a/admin/models/forms/additional_info.js b/admin/models/forms/additional_info.js index 7de96fa..5bfa6ac 100644 --- a/admin/models/forms/additional_info.js +++ b/admin/models/forms/additional_info.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_info.js diff --git a/admin/models/forms/additional_info.xml b/admin/models/forms/additional_info.xml index 0e7e11d..007bde0 100644 --- a/admin/models/forms/additional_info.xml +++ b/admin/models/forms/additional_info.xml @@ -102,6 +102,14 @@ rows="3" cols="30" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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); @@ -81,25 +104,10 @@ class SupportgroupsModelHelp_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); @@ -239,9 +247,17 @@ class SupportgroupsModelHelp_documents 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 (SupportgroupsHelper::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_supportgroups')) @@ -265,29 +281,77 @@ class SupportgroupsModelHelp_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 (SupportgroupsHelper::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 (SupportgroupsHelper::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 (SupportgroupsHelper::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 (SupportgroupsHelper::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)); @@ -307,7 +371,7 @@ class SupportgroupsModelHelp_documents extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -325,7 +389,24 @@ class SupportgroupsModelHelp_documents extends JModelList // From the supportgroups_help_document table $query->from($db->quoteName('#__supportgroups_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) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_supportgroups')) { @@ -413,14 +494,15 @@ class SupportgroupsModelHelp_documents 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.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 c1ff5cb..e7f5500 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage import.php @@ -440,7 +440,15 @@ class SupportgroupsModelImport 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/info_type.php b/admin/models/info_type.php index e1457d1..88abd6d 100644 --- a/admin/models/info_type.php +++ b/admin/models/info_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_type.php @@ -26,8 +26,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/info_types.php b/admin/models/info_types.php index 13ef2ec..01e4154 100644 --- a/admin/models/info_types.php +++ b/admin/models/info_types.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_types.php @@ -40,6 +40,7 @@ class SupportgroupsModelInfo_types 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', @@ -49,11 +50,17 @@ class SupportgroupsModelInfo_types 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) { @@ -63,27 +70,28 @@ class SupportgroupsModelInfo_types 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); - - $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); @@ -161,9 +169,17 @@ class SupportgroupsModelInfo_types 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 (SupportgroupsHelper::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_supportgroups')) @@ -189,7 +205,7 @@ class SupportgroupsModelInfo_types 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)); @@ -209,7 +225,7 @@ class SupportgroupsModelInfo_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -227,7 +243,24 @@ class SupportgroupsModelInfo_types extends JModelList // From the supportgroups_info_type table $query->from($db->quoteName('#__supportgroups_info_type', '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_supportgroups')) { @@ -315,6 +348,7 @@ class SupportgroupsModelInfo_types 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/payment.php b/admin/models/payment.php index c9c1685..fe72159 100644 --- a/admin/models/payment.php +++ b/admin/models/payment.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payment.php @@ -26,8 +26,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/payments.php b/admin/models/payments.php index c659cb0..fdbc2d9 100644 --- a/admin/models/payments.php +++ b/admin/models/payments.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payments.php @@ -40,10 +40,11 @@ class SupportgroupsModelPayments 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','support_group', 'a.year','year', 'a.amount','amount' ); @@ -51,11 +52,17 @@ class SupportgroupsModelPayments 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) { @@ -65,7 +72,26 @@ class SupportgroupsModelPayments 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); + $support_group = $this->getUserStateFromRequest($this->context . '.filter.support_group', 'filter_support_group'); $this->setState('filter.support_group', $support_group); @@ -74,24 +100,6 @@ class SupportgroupsModelPayments extends JModelList $amount = $this->getUserStateFromRequest($this->context . '.filter.amount', 'filter_amount'); $this->setState('filter.amount', $amount); - - $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 +245,17 @@ class SupportgroupsModelPayments 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 (SupportgroupsHelper::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_supportgroups')) @@ -262,20 +278,44 @@ class SupportgroupsModelPayments extends JModelList } } - // Filter by support_group. - if ($support_group = $this->getState('filter.support_group')) + // Filter by Support_group. + $_support_group = $this->getState('filter.support_group'); + if (is_numeric($_support_group)) { - $query->where('a.support_group = ' . $db->quote($db->escape($support_group))); + if (is_float($_support_group)) + { + $query->where('a.support_group = ' . (float) $_support_group); + } + else + { + $query->where('a.support_group = ' . (int) $_support_group); + } + } + elseif (SupportgroupsHelper::checkString($_support_group)) + { + $query->where('a.support_group = ' . $db->quote($db->escape($_support_group))); } // 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); + } + } + elseif (SupportgroupsHelper::checkString($_year)) + { + $query->where('a.year = ' . $db->quote($db->escape($_year))); } // 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)); @@ -295,7 +335,7 @@ class SupportgroupsModelPayments extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -313,7 +353,24 @@ class SupportgroupsModelPayments extends JModelList // From the supportgroups_payment table $query->from($db->quoteName('#__supportgroups_payment', '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_supportgroups')) { @@ -411,6 +468,7 @@ class SupportgroupsModelPayments 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/region.php b/admin/models/region.php index 1c6789a..bf3061d 100644 --- a/admin/models/region.php +++ b/admin/models/region.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage region.php @@ -26,8 +26,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/regions.php b/admin/models/regions.php index d3270a2..b08d9b5 100644 --- a/admin/models/regions.php +++ b/admin/models/regions.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage regions.php @@ -40,21 +40,28 @@ class SupportgroupsModelRegions 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' + 'g.name','country', + 'a.name','name' ); } 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,30 +71,31 @@ class SupportgroupsModelRegions 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); $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); + $this->setState('filter.country', $country); + + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); // List state information. parent::populateState($ordering, $direction); @@ -169,9 +177,17 @@ class SupportgroupsModelRegions 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 (SupportgroupsHelper::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_supportgroups')) @@ -194,15 +210,27 @@ class SupportgroupsModelRegions 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 (SupportgroupsHelper::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)); @@ -222,7 +250,7 @@ class SupportgroupsModelRegions extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -240,7 +268,24 @@ class SupportgroupsModelRegions extends JModelList // From the supportgroups_region table $query->from($db->quoteName('#__supportgroups_region', '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_supportgroups')) { @@ -328,11 +373,12 @@ class SupportgroupsModelRegions 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.country'); + $id .= ':' . $this->getState('filter.country'); + $id .= ':' . $this->getState('filter.name'); return parent::getStoreId($id); } diff --git a/admin/models/support_group.php b/admin/models/support_group.php index 2ff8879..31ef06b 100644 --- a/admin/models/support_group.php +++ b/admin/models/support_group.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_group.php @@ -26,8 +26,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; /** @@ -197,9 +197,17 @@ class SupportgroupsModelSupport_group 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 (SupportgroupsHelper::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_supportgroups')) diff --git a/admin/models/support_groups.php b/admin/models/support_groups.php index ceee435..eb9eefd 100644 --- a/admin/models/support_groups.php +++ b/admin/models/support_groups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_groups.php @@ -40,13 +40,14 @@ class SupportgroupsModelSupport_groups 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','area', + 'h.name','facility', 'a.name','name', 'a.phone','phone', - 'g.name', - 'h.name', 'a.male','male', 'a.female','female' ); @@ -220,11 +221,17 @@ class SupportgroupsModelSupport_groups extends JModelList } return false; } - + /** * 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) { @@ -234,12 +241,25 @@ class SupportgroupsModelSupport_groups 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); + } - $phone = $this->getUserStateFromRequest($this->context . '.filter.phone', 'filter_phone'); - $this->setState('filter.phone', $phone); + $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); $area = $this->getUserStateFromRequest($this->context . '.filter.area', 'filter_area'); $this->setState('filter.area', $area); @@ -247,29 +267,17 @@ class SupportgroupsModelSupport_groups extends JModelList $facility = $this->getUserStateFromRequest($this->context . '.filter.facility', 'filter_facility'); $this->setState('filter.facility', $facility); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $phone = $this->getUserStateFromRequest($this->context . '.filter.phone', 'filter_phone'); + $this->setState('filter.phone', $phone); + $male = $this->getUserStateFromRequest($this->context . '.filter.male', 'filter_male'); $this->setState('filter.male', $male); $female = $this->getUserStateFromRequest($this->context . '.filter.female', 'filter_female'); $this->setState('filter.female', $female); - - $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); @@ -355,9 +363,17 @@ class SupportgroupsModelSupport_groups 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 (SupportgroupsHelper::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_supportgroups')) @@ -380,20 +396,44 @@ class SupportgroupsModelSupport_groups extends JModelList } } - // Filter by area. - if ($area = $this->getState('filter.area')) + // Filter by Area. + $_area = $this->getState('filter.area'); + if (is_numeric($_area)) { - $query->where('a.area = ' . $db->quote($db->escape($area))); + if (is_float($_area)) + { + $query->where('a.area = ' . (float) $_area); + } + else + { + $query->where('a.area = ' . (int) $_area); + } } - // Filter by facility. - if ($facility = $this->getState('filter.facility')) + elseif (SupportgroupsHelper::checkString($_area)) { - $query->where('a.facility = ' . $db->quote($db->escape($facility))); + $query->where('a.area = ' . $db->quote($db->escape($_area))); + } + // Filter by Facility. + $_facility = $this->getState('filter.facility'); + if (is_numeric($_facility)) + { + if (is_float($_facility)) + { + $query->where('a.facility = ' . (float) $_facility); + } + else + { + $query->where('a.facility = ' . (int) $_facility); + } + } + elseif (SupportgroupsHelper::checkString($_facility)) + { + $query->where('a.facility = ' . $db->quote($db->escape($_facility))); } // 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)); @@ -413,7 +453,7 @@ class SupportgroupsModelSupport_groups extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SupportgroupsHelper::checkArray($pks)) + if (($pks_size = SupportgroupsHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -431,7 +471,24 @@ class SupportgroupsModelSupport_groups extends JModelList // From the supportgroups_support_group table $query->from($db->quoteName('#__supportgroups_support_group', '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_supportgroups')) { @@ -519,13 +576,14 @@ class SupportgroupsModelSupport_groups 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.phone'); $id .= ':' . $this->getState('filter.area'); $id .= ':' . $this->getState('filter.facility'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.phone'); $id .= ':' . $this->getState('filter.male'); $id .= ':' . $this->getState('filter.female'); diff --git a/admin/models/supportgroups.php b/admin/models/supportgroups.php index 1660283..86cbe90 100644 --- a/admin/models/supportgroups.php +++ b/admin/models/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php @@ -122,8 +122,8 @@ class SupportgroupsModelSupportgroups extends JModelList $viewName = $name; $alt = $name; $url = $url; - $image = $name.'.'.$type; - $name = 'COM_SUPPORTGROUPS_DASHBOARD_'.SupportgroupsHelper::safeString($name,'U'); + $image = $name . '.' . $type; + $name = 'COM_SUPPORTGROUPS_DASHBOARD_' . SupportgroupsHelper::safeString($name,'U'); } } // internal views @@ -145,17 +145,27 @@ class SupportgroupsModelSupportgroups extends JModelList switch($action) { case 'add': - $url = 'index.php?option=com_supportgroups&view='.$name.'&layout=edit'; - $image = $name.'_'.$action.'.'.$type; - $alt = $name.' '.$action; + $url = 'index.php?option=com_supportgroups&view=' . $name . '&layout=edit'; + $image = $name . '_' . $action. '.' . $type; + $alt = $name . ' ' . $action; $name = 'COM_SUPPORTGROUPS_DASHBOARD_'.SupportgroupsHelper::safeString($name,'U').'_ADD'; $add = true; break; default: - $url = 'index.php?option=com_categories&view=categories&extension=com_supportgroups.'.$name; - $image = $name.'_'.$action.'.'.$type; - $alt = $name.' '.$action; - $name = 'COM_SUPPORTGROUPS_DASHBOARD_'.SupportgroupsHelper::safeString($name,'U').'_'.SupportgroupsHelper::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_supportgroups.' . $name; + } + $url = 'index.php?option=com_categories&view=categories&extension=' . $extension; + $image = $name . '_' . $action . '.' . $type; + $alt = $viewName . ' ' . $action; + $name = 'COM_SUPPORTGROUPS_DASHBOARD_' . SupportgroupsHelper::safeString($name,'U') . '_' . SupportgroupsHelper::safeString($action,'U'); break; } } @@ -163,9 +173,9 @@ class SupportgroupsModelSupportgroups extends JModelList { $viewName = $name; $alt = $name; - $url = 'index.php?option=com_supportgroups&view='.$name; - $image = $name.'.'.$type; - $name = 'COM_SUPPORTGROUPS_DASHBOARD_'.SupportgroupsHelper::safeString($name,'U'); + $url = 'index.php?option=com_supportgroups&view=' . $name; + $image = $name . '.' . $type; + $name = 'COM_SUPPORTGROUPS_DASHBOARD_' . SupportgroupsHelper::safeString($name,'U'); $hover = false; } } @@ -173,8 +183,8 @@ class SupportgroupsModelSupportgroups extends JModelList { $viewName = $view; $alt = $view; - $url = 'index.php?option=com_supportgroups&view='.$view; - $image = $view.'.png'; + $url = 'index.php?option=com_supportgroups&view=' . $view; + $image = $view . '.png'; $name = ucwords($view).'

'; $hover = false; } @@ -186,7 +196,7 @@ class SupportgroupsModelSupportgroups extends JModelList $dashboard_list = false; $accessTo = ''; $accessAdd = ''; - // acces checking start + // access checking start $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? SupportgroupsHelper::checkString($viewAccess[$viewName.'.create']):false; $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? SupportgroupsHelper::checkString($viewAccess[$viewName.'.access']):false; // set main controllers @@ -201,7 +211,7 @@ class SupportgroupsModelSupportgroups 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']; diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 59e5bc2..7787542 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -487,9 +487,14 @@ INSERT INTO `#__supportgroups_area` (`id`, `alias`, `color`, `details`, `name`, -- INSERT INTO `#__supportgroups_region` (`id`, `alias`, `country`, `name`, `published`, `created`) VALUES -(1, 'khomas', 146, 'Khomas', 1, '2016-05-17 05:01:46'), -(2, 'karas', 146, 'Karas', 1, '2016-05-17 05:01:57'), -(3, 'region', 13, 'Region', 1, '2016-11-15 04:52:45'); +(1, 'act', 13, 'ACT', 1, '2016-05-17 05:01:46'), +(2, 'nsw', 13, 'NSW', 1, '2016-05-17 05:01:57'), +(3, 'nt', 13, 'NT', 1, '2016-11-15 04:52:45'), +(4, 'qld', 13, 'QLD', 1, '2020-06-02 12:55:29'), +(5, 'sa', 13, 'SA', 1, '2020-06-02 12:55:29'), +(6, 'tas', 13, 'TAS', 1, '2020-06-02 12:55:29'), +(7, 'vic', 13, 'VIC', 1, '2020-06-02 12:55:29'), +(8, 'wa', 13, 'WA', 1, '2020-06-02 12:55:29'); -- -- Dumping data for table `#__supportgroups_country` @@ -914,13 +919,3 @@ INSERT INTO `#__supportgroups_currency` (`id`, `asset_id`, `alias`, `codethree`, (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 6c5b6d3..414192e 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -10,3 +10,4 @@ DROP TABLE IF EXISTS `#__supportgroups_region`; DROP TABLE IF EXISTS `#__supportgroups_country`; DROP TABLE IF EXISTS `#__supportgroups_currency`; DROP TABLE IF EXISTS `#__supportgroups_help_document`; + diff --git a/admin/supportgroups.php b/admin/supportgroups.php index c9e59cf..5fd3f7d 100644 --- a/admin/supportgroups.php +++ b/admin/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php @@ -25,6 +25,7 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + JHtml::_('behavior.tabstate'); // Access check. diff --git a/admin/tables/additional_info.php b/admin/tables/additional_info.php index 89c1bf7..244bef6 100644 --- a/admin/tables/additional_info.php +++ b/admin/tables/additional_info.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage additional_info.php diff --git a/admin/tables/area.php b/admin/tables/area.php index 8c6a98f..86339ed 100644 --- a/admin/tables/area.php +++ b/admin/tables/area.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area.php diff --git a/admin/tables/area_type.php b/admin/tables/area_type.php index 5921a57..1d7991e 100644 --- a/admin/tables/area_type.php +++ b/admin/tables/area_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage area_type.php diff --git a/admin/tables/country.php b/admin/tables/country.php index a4f7242..c768928 100644 --- a/admin/tables/country.php +++ b/admin/tables/country.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage country.php diff --git a/admin/tables/currency.php b/admin/tables/currency.php index f36b63d..503b2ee 100644 --- a/admin/tables/currency.php +++ b/admin/tables/currency.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage currency.php diff --git a/admin/tables/facility.php b/admin/tables/facility.php index 01a577e..9266a38 100644 --- a/admin/tables/facility.php +++ b/admin/tables/facility.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility.php diff --git a/admin/tables/facility_type.php b/admin/tables/facility_type.php index a817bcb..00cdb55 100644 --- a/admin/tables/facility_type.php +++ b/admin/tables/facility_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage facility_type.php diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index 323996e..9bb7d54 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help_document.php diff --git a/admin/tables/info_type.php b/admin/tables/info_type.php index ccf109f..77b107f 100644 --- a/admin/tables/info_type.php +++ b/admin/tables/info_type.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage info_type.php diff --git a/admin/tables/payment.php b/admin/tables/payment.php index c8fdac3..a278d5c 100644 --- a/admin/tables/payment.php +++ b/admin/tables/payment.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage payment.php diff --git a/admin/tables/region.php b/admin/tables/region.php index 15178f4..009a003 100644 --- a/admin/tables/region.php +++ b/admin/tables/region.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage region.php diff --git a/admin/tables/support_group.php b/admin/tables/support_group.php index f0ce4c1..5d8042d 100644 --- a/admin/tables/support_group.php +++ b/admin/tables/support_group.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage support_group.php diff --git a/admin/views/additional_info/submitbutton.js b/admin/views/additional_info/submitbutton.js index e252e0e..a5dff0c 100644 --- a/admin/views/additional_info/submitbutton.js +++ b/admin/views/additional_info/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/additional_info/tmpl/edit.php b/admin/views/additional_info/tmpl/edit.php index 440d251..5aa7b5f 100644 --- a/admin/views/additional_info/tmpl/edit.php +++ b/admin/views/additional_info/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -70,7 +70,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'additional_infoTab'; ?> - canDo->get('additional_info.delete') || $this->canDo->get('additional_info.edit.created_by') || $this->canDo->get('additional_info.edit.state') || $this->canDo->get('additional_info.edit.created')) : ?> + canDo->get('additional_info.edit.created_by') || $this->canDo->get('additional_info.edit.created') || $this->canDo->get('additional_info.edit.state') || ($this->canDo->get('additional_info.delete') && $this->canDo->get('additional_info.edit.state'))) : ?>
diff --git a/admin/views/additional_info/view.html.php b/admin/views/additional_info/view.html.php index 2d6ced9..d906540 100644 --- a/admin/views/additional_info/view.html.php +++ b/admin/views/additional_info/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/additional_information/tmpl/default.php b/admin/views/additional_information/tmpl/default.php index c6f7151..f32edb4 100644 --- a/admin/views/additional_information/tmpl/default.php +++ b/admin/views/additional_information/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=additional_information.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'additional_infoList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFORMATION_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/additional_information/tmpl/default_batch_body.php b/admin/views/additional_information/tmpl/default_batch_body.php index ba59aaf..6b9d747 100644 --- a/admin/views/additional_information/tmpl/default_batch_body.php +++ b/admin/views/additional_information/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/additional_information/tmpl/default_batch_footer.php b/admin/views/additional_information/tmpl/default_batch_footer.php index b7385df..c34af1f 100644 --- a/admin/views/additional_information/tmpl/default_batch_footer.php +++ b/admin/views/additional_information/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/additional_information/tmpl/default_body.php b/admin/views/additional_information/tmpl/default_body.php index 4da063f..417a227 100644 --- a/admin/views/additional_information/tmpl/default_body.php +++ b/admin/views/additional_information/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=additional_information&task=additional_info.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=additional_information&task=add get('additional_info.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/additional_information/tmpl/default_foot.php b/admin/views/additional_information/tmpl/default_foot.php index 306b130..2785100 100644 --- a/admin/views/additional_information/tmpl/default_foot.php +++ b/admin/views/additional_information/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/additional_information/tmpl/default_head.php b/admin/views/additional_information/tmpl/default_head.php index 095199b..0da7f26 100644 --- a/admin/views/additional_information/tmpl/default_head.php +++ b/admin/views/additional_information/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/additional_information/tmpl/default_toolbar.php b/admin/views/additional_information/tmpl/default_toolbar.php index cc621cf..af4adf5 100644 --- a/admin/views/additional_information/tmpl/default_toolbar.php +++ b/admin/views/additional_information/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/additional_information/view.html.php b/admin/views/additional_information/view.html.php index de07828..7d24954 100644 --- a/admin/views/additional_information/view.html.php +++ b/admin/views/additional_information/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewAdditional_information extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewAdditional_information extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Info Type Name Selection $this->info_typeNameOptions = JFormHelper::loadFieldType('Infotype')->options; // We do some sanitation for Info Type Name filter @@ -215,20 +198,41 @@ class SupportgroupsViewAdditional_information extends JViewLegacy { // Info Type Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFO_INFO_TYPE_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFO_INFO_TYPE_LABEL') . ' -', 'filter_info_type', JHtml::_('select.options', $this->info_typeNameOptions, 'value', 'text', $this->state->get('filter.info_type')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Info Type Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFO_INFO_TYPE_LABEL').' -', - 'batch[info_type]', - JHtml::_('select.options', $this->info_typeNameOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Info Type Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Info Type Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFO_INFO_TYPE_LABEL').' -', + 'batch[info_type]', + JHtml::_('select.options', $this->info_typeNameOptions, 'value', 'text') + ); } } @@ -273,7 +277,7 @@ class SupportgroupsViewAdditional_information extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFO_NAME_LABEL'), 'g.name' => JText::_('COM_SUPPORTGROUPS_ADDITIONAL_INFO_INFO_TYPE_LABEL'), diff --git a/admin/views/area/submitbutton.js b/admin/views/area/submitbutton.js index 1313060..14eeae0 100644 --- a/admin/views/area/submitbutton.js +++ b/admin/views/area/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/area/tmpl/edit.php b/admin/views/area/tmpl/edit.php index d829242..b030c6d 100644 --- a/admin/views/area/tmpl/edit.php +++ b/admin/views/area/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'areaTab'; ?> - canDo->get('area.delete') || $this->canDo->get('area.edit.created_by') || $this->canDo->get('area.edit.state') || $this->canDo->get('area.edit.created')) : ?> + canDo->get('area.edit.created_by') || $this->canDo->get('area.edit.created') || $this->canDo->get('area.edit.state') || ($this->canDo->get('area.delete') && $this->canDo->get('area.edit.state'))) : ?>
diff --git a/admin/views/area/view.html.php b/admin/views/area/view.html.php index f2ffa35..073c8cc 100644 --- a/admin/views/area/view.html.php +++ b/admin/views/area/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/area_type/submitbutton.js b/admin/views/area_type/submitbutton.js index 3838feb..2ce459f 100644 --- a/admin/views/area_type/submitbutton.js +++ b/admin/views/area_type/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/area_type/tmpl/edit.php b/admin/views/area_type/tmpl/edit.php index 39abd6b..5faf17e 100644 --- a/admin/views/area_type/tmpl/edit.php +++ b/admin/views/area_type/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 = 'area_typeTab'; ?> - canDo->get('area_type.delete') || $this->canDo->get('area_type.edit.created_by') || $this->canDo->get('area_type.edit.state') || $this->canDo->get('area_type.edit.created')) : ?> + canDo->get('area_type.edit.created_by') || $this->canDo->get('area_type.edit.created') || $this->canDo->get('area_type.edit.state') || ($this->canDo->get('area_type.delete') && $this->canDo->get('area_type.edit.state'))) : ?>
diff --git a/admin/views/area_type/view.html.php b/admin/views/area_type/view.html.php index 79eb7a4..594295d 100644 --- a/admin/views/area_type/view.html.php +++ b/admin/views/area_type/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/area_types/tmpl/default.php b/admin/views/area_types/tmpl/default.php index 814b0c5..092d409 100644 --- a/admin/views/area_types/tmpl/default.php +++ b/admin/views/area_types/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=area_types.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'area_typeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_AREA_TYPES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_AREA_TYPES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/area_types/tmpl/default_batch_body.php b/admin/views/area_types/tmpl/default_batch_body.php index aa8d579..c344671 100644 --- a/admin/views/area_types/tmpl/default_batch_body.php +++ b/admin/views/area_types/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/area_types/tmpl/default_batch_footer.php b/admin/views/area_types/tmpl/default_batch_footer.php index 3d98e78..13f23a4 100644 --- a/admin/views/area_types/tmpl/default_batch_footer.php +++ b/admin/views/area_types/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/area_types/tmpl/default_body.php b/admin/views/area_types/tmpl/default_body.php index dcb96b7..89d1f80 100644 --- a/admin/views/area_types/tmpl/default_body.php +++ b/admin/views/area_types/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=area_types&task=area_type.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=area_types&task=area_type.edit" get('area_type.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/area_types/tmpl/default_foot.php b/admin/views/area_types/tmpl/default_foot.php index 30cb8fa..0f5f7e1 100644 --- a/admin/views/area_types/tmpl/default_foot.php +++ b/admin/views/area_types/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/area_types/tmpl/default_head.php b/admin/views/area_types/tmpl/default_head.php index 95327ec..b147d63 100644 --- a/admin/views/area_types/tmpl/default_head.php +++ b/admin/views/area_types/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/area_types/tmpl/default_toolbar.php b/admin/views/area_types/tmpl/default_toolbar.php index 644f82d..c0412a2 100644 --- a/admin/views/area_types/tmpl/default_toolbar.php +++ b/admin/views/area_types/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/area_types/view.html.php b/admin/views/area_types/view.html.php index d34bcaa..d7f20a0 100644 --- a/admin/views/area_types/view.html.php +++ b/admin/views/area_types/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewArea_types extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,39 +166,42 @@ class SupportgroupsViewArea_types extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); + } + + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); } } @@ -243,7 +246,7 @@ class SupportgroupsViewArea_types extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_AREA_TYPE_NAME_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') diff --git a/admin/views/areas/tmpl/default.php b/admin/views/areas/tmpl/default.php index 266ffaf..a4a5dfb 100644 --- a/admin/views/areas/tmpl/default.php +++ b/admin/views/areas/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=areas.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'areaList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_AREAS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_AREAS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/areas/tmpl/default_batch_body.php b/admin/views/areas/tmpl/default_batch_body.php index b8d3ac7..eb13da8 100644 --- a/admin/views/areas/tmpl/default_batch_body.php +++ b/admin/views/areas/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/areas/tmpl/default_batch_footer.php b/admin/views/areas/tmpl/default_batch_footer.php index c07125c..7be5d5d 100644 --- a/admin/views/areas/tmpl/default_batch_footer.php +++ b/admin/views/areas/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/areas/tmpl/default_body.php b/admin/views/areas/tmpl/default_body.php index 13b8e05..2e4fb3c 100644 --- a/admin/views/areas/tmpl/default_body.php +++ b/admin/views/areas/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=areas&task=area.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=areas&task=area.edit"; get('area.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/areas/tmpl/default_foot.php b/admin/views/areas/tmpl/default_foot.php index 33e3f47..32c7cd7 100644 --- a/admin/views/areas/tmpl/default_foot.php +++ b/admin/views/areas/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/areas/tmpl/default_head.php b/admin/views/areas/tmpl/default_head.php index b98ba9b..f788054 100644 --- a/admin/views/areas/tmpl/default_head.php +++ b/admin/views/areas/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/areas/tmpl/default_toolbar.php b/admin/views/areas/tmpl/default_toolbar.php index eda3a3f..f02e340 100644 --- a/admin/views/areas/tmpl/default_toolbar.php +++ b/admin/views/areas/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/areas/view.html.php b/admin/views/areas/view.html.php index e9f3157..23a5562 100644 --- a/admin/views/areas/view.html.php +++ b/admin/views/areas/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewAreas extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewAreas extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Area Type Name Selection $this->area_typeNameOptions = JFormHelper::loadFieldType('Areastype')->options; // We do some sanitation for Area Type Name filter @@ -215,20 +198,10 @@ class SupportgroupsViewAreas extends JViewLegacy { // Area Type Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_AREA_AREA_TYPE_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_AREA_AREA_TYPE_LABEL') . ' -', 'filter_area_type', JHtml::_('select.options', $this->area_typeNameOptions, 'value', 'text', $this->state->get('filter.area_type')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Area Type Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_AREA_AREA_TYPE_LABEL').' -', - 'batch[area_type]', - JHtml::_('select.options', $this->area_typeNameOptions, 'value', 'text') - ); - } } // Set Region Name Selection @@ -245,20 +218,52 @@ class SupportgroupsViewAreas extends JViewLegacy { // Region Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_AREA_REGION_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_AREA_REGION_LABEL') . ' -', 'filter_region', JHtml::_('select.options', $this->regionNameOptions, 'value', 'text', $this->state->get('filter.region')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Region Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_AREA_REGION_LABEL').' -', - 'batch[region]', - JHtml::_('select.options', $this->regionNameOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Area Type Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Area Type Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_AREA_AREA_TYPE_LABEL').' -', + 'batch[area_type]', + JHtml::_('select.options', $this->area_typeNameOptions, 'value', 'text') + ); + } + + // Only load Region Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Region Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_AREA_REGION_LABEL').' -', + 'batch[region]', + JHtml::_('select.options', $this->regionNameOptions, 'value', 'text') + ); } } @@ -303,7 +308,7 @@ class SupportgroupsViewAreas extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_AREA_NAME_LABEL'), 'g.name' => JText::_('COM_SUPPORTGROUPS_AREA_AREA_TYPE_LABEL'), diff --git a/admin/views/countries/tmpl/default.php b/admin/views/countries/tmpl/default.php index ba10be1..b375b05 100644 --- a/admin/views/countries/tmpl/default.php +++ b/admin/views/countries/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=countries.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'countryList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_COUNTRIES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_COUNTRIES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/countries/tmpl/default_batch_body.php b/admin/views/countries/tmpl/default_batch_body.php index 197d495..de4b12a 100644 --- a/admin/views/countries/tmpl/default_batch_body.php +++ b/admin/views/countries/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/countries/tmpl/default_batch_footer.php b/admin/views/countries/tmpl/default_batch_footer.php index 2d2711e..1921f62 100644 --- a/admin/views/countries/tmpl/default_batch_footer.php +++ b/admin/views/countries/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/countries/tmpl/default_body.php b/admin/views/countries/tmpl/default_body.php index 59dd248..ff55604 100644 --- a/admin/views/countries/tmpl/default_body.php +++ b/admin/views/countries/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=countries&task=country.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=countries&task=country.edit"; get('country.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/countries/tmpl/default_foot.php b/admin/views/countries/tmpl/default_foot.php index 33e3f47..32c7cd7 100644 --- a/admin/views/countries/tmpl/default_foot.php +++ b/admin/views/countries/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/countries/tmpl/default_head.php b/admin/views/countries/tmpl/default_head.php index 4d446b8..7fb344f 100644 --- a/admin/views/countries/tmpl/default_head.php +++ b/admin/views/countries/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/countries/tmpl/default_toolbar.php b/admin/views/countries/tmpl/default_toolbar.php index fa1de0d..3e7eaeb 100644 --- a/admin/views/countries/tmpl/default_toolbar.php +++ b/admin/views/countries/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/countries/view.html.php b/admin/views/countries/view.html.php index b7d73c2..59a3cd4 100644 --- a/admin/views/countries/view.html.php +++ b/admin/views/countries/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewCountries extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewCountries extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Currency Name Selection $this->currencyNameOptions = JFormHelper::loadFieldType('Currency')->options; // We do some sanitation for Currency Name filter @@ -215,20 +198,10 @@ class SupportgroupsViewCountries extends JViewLegacy { // Currency Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_COUNTRY_CURRENCY_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_COUNTRY_CURRENCY_LABEL') . ' -', 'filter_currency', JHtml::_('select.options', $this->currencyNameOptions, 'value', 'text', $this->state->get('filter.currency')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Currency Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_COUNTRY_CURRENCY_LABEL').' -', - 'batch[currency]', - JHtml::_('select.options', $this->currencyNameOptions, 'value', 'text') - ); - } } // Set Worldzone Selection @@ -249,16 +222,48 @@ class SupportgroupsViewCountries extends JViewLegacy 'filter_worldzone', JHtml::_('select.options', $this->worldzoneOptions, 'value', 'text', $this->state->get('filter.worldzone')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Worldzone Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_COUNTRY_WORLDZONE_LABEL').' -', - 'batch[worldzone]', - JHtml::_('select.options', $this->worldzoneOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Currency Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Currency Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_COUNTRY_CURRENCY_LABEL').' -', + 'batch[currency]', + JHtml::_('select.options', $this->currencyNameOptions, 'value', 'text') + ); + } + + // Only load Worldzone batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Worldzone Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_COUNTRY_WORLDZONE_LABEL').' -', + 'batch[worldzone]', + JHtml::_('select.options', $this->worldzoneOptions, 'value', 'text') + ); } } @@ -303,7 +308,7 @@ class SupportgroupsViewCountries extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_COUNTRY_NAME_LABEL'), 'g.name' => JText::_('COM_SUPPORTGROUPS_COUNTRY_CURRENCY_LABEL'), @@ -331,18 +336,17 @@ class SupportgroupsViewCountries extends JViewLegacy $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); if ($results) { $results = array_unique($results); - $_filter = array(); foreach ($results as $worldzone) { // Now add the worldzone and its text to the options array $_filter[] = JHtml::_('select.option', $worldzone, $worldzone); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/views/country/submitbutton.js b/admin/views/country/submitbutton.js index 37319ce..86c473c 100644 --- a/admin/views/country/submitbutton.js +++ b/admin/views/country/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/country/tmpl/edit.php b/admin/views/country/tmpl/edit.php index 9b6060e..e2fbf43 100644 --- a/admin/views/country/tmpl/edit.php +++ b/admin/views/country/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -90,7 +90,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'countryTab'; ?> - canDo->get('country.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('country.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('country.edit.state') || ($this->canDo->get('country.delete') && $this->canDo->get('country.edit.state'))) : ?>
diff --git a/admin/views/country/view.html.php b/admin/views/country/view.html.php index 0c7afc0..42c5586 100644 --- a/admin/views/country/view.html.php +++ b/admin/views/country/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/currencies/tmpl/default.php b/admin/views/currencies/tmpl/default.php index 32e56de..4ddb52a 100644 --- a/admin/views/currencies/tmpl/default.php +++ b/admin/views/currencies/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=currencies.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'currencyList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_CURRENCIES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_CURRENCIES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/currencies/tmpl/default_batch_body.php b/admin/views/currencies/tmpl/default_batch_body.php index 565d13b..9aef2fb 100644 --- a/admin/views/currencies/tmpl/default_batch_body.php +++ b/admin/views/currencies/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/currencies/tmpl/default_batch_footer.php b/admin/views/currencies/tmpl/default_batch_footer.php index cdde99c..685bbb4 100644 --- a/admin/views/currencies/tmpl/default_batch_footer.php +++ b/admin/views/currencies/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/currencies/tmpl/default_body.php b/admin/views/currencies/tmpl/default_body.php index cc819ff..ae1e569 100644 --- a/admin/views/currencies/tmpl/default_body.php +++ b/admin/views/currencies/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=currencies&task=currency.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=currencies&task=currency.edit"; get('currency.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/currencies/tmpl/default_foot.php b/admin/views/currencies/tmpl/default_foot.php index 33e3f47..32c7cd7 100644 --- a/admin/views/currencies/tmpl/default_foot.php +++ b/admin/views/currencies/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/currencies/tmpl/default_head.php b/admin/views/currencies/tmpl/default_head.php index e994415..f752e3a 100644 --- a/admin/views/currencies/tmpl/default_head.php +++ b/admin/views/currencies/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/currencies/tmpl/default_toolbar.php b/admin/views/currencies/tmpl/default_toolbar.php index a6f072e..046743a 100644 --- a/admin/views/currencies/tmpl/default_toolbar.php +++ b/admin/views/currencies/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/currencies/view.html.php b/admin/views/currencies/view.html.php index e245f06..63da495 100644 --- a/admin/views/currencies/view.html.php +++ b/admin/views/currencies/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewCurrencies extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,39 +166,42 @@ class SupportgroupsViewCurrencies extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); + } + + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); } } @@ -243,7 +246,7 @@ class SupportgroupsViewCurrencies extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_CURRENCY_NAME_LABEL'), 'a.codethree' => JText::_('COM_SUPPORTGROUPS_CURRENCY_CODETHREE_LABEL'), diff --git a/admin/views/currency/submitbutton.js b/admin/views/currency/submitbutton.js index 50e0895..190335a 100644 --- a/admin/views/currency/submitbutton.js +++ b/admin/views/currency/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/currency/tmpl/edit.php b/admin/views/currency/tmpl/edit.php index b5eae4e..3008c4a 100644 --- a/admin/views/currency/tmpl/edit.php +++ b/admin/views/currency/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -78,7 +78,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'currencyTab'; ?> - canDo->get('currency.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('currency.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('currency.edit.state') || ($this->canDo->get('currency.delete') && $this->canDo->get('currency.edit.state'))) : ?>
diff --git a/admin/views/currency/view.html.php b/admin/views/currency/view.html.php index 9fd5917..797fa8f 100644 --- a/admin/views/currency/view.html.php +++ b/admin/views/currency/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/facilities/tmpl/default.php b/admin/views/facilities/tmpl/default.php index 14b4279..96777ec 100644 --- a/admin/views/facilities/tmpl/default.php +++ b/admin/views/facilities/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=facilities.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'facilityList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_FACILITIES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_FACILITIES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/facilities/tmpl/default_batch_body.php b/admin/views/facilities/tmpl/default_batch_body.php index 88808b3..a38cd73 100644 --- a/admin/views/facilities/tmpl/default_batch_body.php +++ b/admin/views/facilities/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/facilities/tmpl/default_batch_footer.php b/admin/views/facilities/tmpl/default_batch_footer.php index c9fd3be..f1c14e8 100644 --- a/admin/views/facilities/tmpl/default_batch_footer.php +++ b/admin/views/facilities/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/facilities/tmpl/default_body.php b/admin/views/facilities/tmpl/default_body.php index ebf5f7a..c9049b7 100644 --- a/admin/views/facilities/tmpl/default_body.php +++ b/admin/views/facilities/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=facilities&task=facility.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=facilities&task=facility.edit"; get('facility.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/facilities/tmpl/default_foot.php b/admin/views/facilities/tmpl/default_foot.php index 66a30b9..f05d7d8 100644 --- a/admin/views/facilities/tmpl/default_foot.php +++ b/admin/views/facilities/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/facilities/tmpl/default_head.php b/admin/views/facilities/tmpl/default_head.php index 49e08d4..c71d8b6 100644 --- a/admin/views/facilities/tmpl/default_head.php +++ b/admin/views/facilities/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/facilities/tmpl/default_toolbar.php b/admin/views/facilities/tmpl/default_toolbar.php index b863400..f1ad4d0 100644 --- a/admin/views/facilities/tmpl/default_toolbar.php +++ b/admin/views/facilities/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/facilities/view.html.php b/admin/views/facilities/view.html.php index 542f9c0..f994039 100644 --- a/admin/views/facilities/view.html.php +++ b/admin/views/facilities/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewFacilities extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewFacilities extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Facility Type Name Selection $this->facility_typeNameOptions = JFormHelper::loadFieldType('Facilitiestype')->options; // We do some sanitation for Facility Type Name filter @@ -215,20 +198,41 @@ class SupportgroupsViewFacilities extends JViewLegacy { // Facility Type Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_FACILITY_FACILITY_TYPE_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_FACILITY_FACILITY_TYPE_LABEL') . ' -', 'filter_facility_type', JHtml::_('select.options', $this->facility_typeNameOptions, 'value', 'text', $this->state->get('filter.facility_type')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Facility Type Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_FACILITY_FACILITY_TYPE_LABEL').' -', - 'batch[facility_type]', - JHtml::_('select.options', $this->facility_typeNameOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Facility Type Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Facility Type Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_FACILITY_FACILITY_TYPE_LABEL').' -', + 'batch[facility_type]', + JHtml::_('select.options', $this->facility_typeNameOptions, 'value', 'text') + ); } } @@ -273,7 +277,7 @@ class SupportgroupsViewFacilities extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_FACILITY_NAME_LABEL'), 'g.name' => JText::_('COM_SUPPORTGROUPS_FACILITY_FACILITY_TYPE_LABEL'), diff --git a/admin/views/facility/submitbutton.js b/admin/views/facility/submitbutton.js index 5f2da20..dfbd7dd 100644 --- a/admin/views/facility/submitbutton.js +++ b/admin/views/facility/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/facility/tmpl/edit.php b/admin/views/facility/tmpl/edit.php index aeb53b7..a65a501 100644 --- a/admin/views/facility/tmpl/edit.php +++ b/admin/views/facility/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -71,7 +71,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'facilityTab'; ?> - canDo->get('facility.delete') || $this->canDo->get('facility.edit.created_by') || $this->canDo->get('facility.edit.state') || $this->canDo->get('facility.edit.created')) : ?> + canDo->get('facility.edit.created_by') || $this->canDo->get('facility.edit.created') || $this->canDo->get('facility.edit.state') || ($this->canDo->get('facility.delete') && $this->canDo->get('facility.edit.state'))) : ?>
diff --git a/admin/views/facility/view.html.php b/admin/views/facility/view.html.php index a6a6112..c218a78 100644 --- a/admin/views/facility/view.html.php +++ b/admin/views/facility/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/facility_type/submitbutton.js b/admin/views/facility_type/submitbutton.js index 89fe8a2..fce3399 100644 --- a/admin/views/facility_type/submitbutton.js +++ b/admin/views/facility_type/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/facility_type/tmpl/edit.php b/admin/views/facility_type/tmpl/edit.php index 2910196..d76729b 100644 --- a/admin/views/facility_type/tmpl/edit.php +++ b/admin/views/facility_type/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 = 'facility_typeTab'; ?> - canDo->get('facility_type.delete') || $this->canDo->get('facility_type.edit.created_by') || $this->canDo->get('facility_type.edit.state') || $this->canDo->get('facility_type.edit.created')) : ?> + canDo->get('facility_type.edit.created_by') || $this->canDo->get('facility_type.edit.created') || $this->canDo->get('facility_type.edit.state') || ($this->canDo->get('facility_type.delete') && $this->canDo->get('facility_type.edit.state'))) : ?>
diff --git a/admin/views/facility_type/view.html.php b/admin/views/facility_type/view.html.php index 891f66b..d85d97b 100644 --- a/admin/views/facility_type/view.html.php +++ b/admin/views/facility_type/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/facility_types/tmpl/default.php b/admin/views/facility_types/tmpl/default.php index 9504fc1..97b596c 100644 --- a/admin/views/facility_types/tmpl/default.php +++ b/admin/views/facility_types/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=facility_types.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'facility_typeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_FACILITY_TYPES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_FACILITY_TYPES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/facility_types/tmpl/default_batch_body.php b/admin/views/facility_types/tmpl/default_batch_body.php index 599d82d..385ec6a 100644 --- a/admin/views/facility_types/tmpl/default_batch_body.php +++ b/admin/views/facility_types/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/facility_types/tmpl/default_batch_footer.php b/admin/views/facility_types/tmpl/default_batch_footer.php index 502d847..0326480 100644 --- a/admin/views/facility_types/tmpl/default_batch_footer.php +++ b/admin/views/facility_types/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/facility_types/tmpl/default_body.php b/admin/views/facility_types/tmpl/default_body.php index 56f4cd8..dd99810 100644 --- a/admin/views/facility_types/tmpl/default_body.php +++ b/admin/views/facility_types/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=facility_types&task=facility_type.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=facility_types&task=facility_ty get('facility_type.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/facility_types/tmpl/default_foot.php b/admin/views/facility_types/tmpl/default_foot.php index 30cb8fa..0f5f7e1 100644 --- a/admin/views/facility_types/tmpl/default_foot.php +++ b/admin/views/facility_types/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/facility_types/tmpl/default_head.php b/admin/views/facility_types/tmpl/default_head.php index fb06cd0..549d98f 100644 --- a/admin/views/facility_types/tmpl/default_head.php +++ b/admin/views/facility_types/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/facility_types/tmpl/default_toolbar.php b/admin/views/facility_types/tmpl/default_toolbar.php index da999b7..d6b03d4 100644 --- a/admin/views/facility_types/tmpl/default_toolbar.php +++ b/admin/views/facility_types/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/facility_types/view.html.php b/admin/views/facility_types/view.html.php index 63b4bd2..99d4ba9 100644 --- a/admin/views/facility_types/view.html.php +++ b/admin/views/facility_types/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewFacility_types extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,39 +166,42 @@ class SupportgroupsViewFacility_types extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); + } + + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); } } @@ -243,7 +246,7 @@ class SupportgroupsViewFacility_types extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_FACILITY_TYPE_NAME_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') diff --git a/admin/views/help_document/submitbutton.js b/admin/views/help_document/submitbutton.js index 43a2d71..d24c5e2 100644 --- a/admin/views/help_document/submitbutton.js +++ b/admin/views/help_document/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 69a0936..b4682d1 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -83,7 +83,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'help_documentTab'; ?> - canDo->get('help_document.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('help_document.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('help_document.edit.state') || ($this->canDo->get('help_document.delete') && $this->canDo->get('help_document.edit.state'))) : ?>
@@ -96,25 +96,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - canDo->get('core.admin')) : ?> - -
-
-
-
- form->getFieldset('accesscontrol') as $field): ?> -
- label; echo $field->input;?> -
-
- -
-
-
-
- - -
diff --git a/admin/views/help_document/view.html.php b/admin/views/help_document/view.html.php index 8f44b05..afbc7b9 100644 --- a/admin/views/help_document/view.html.php +++ b/admin/views/help_document/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php index 8dd1f5f..e7cebff 100644 --- a/admin/views/help_documents/tmpl/default.php +++ b/admin/views/help_documents/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=help_documents.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'help_documentList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENTS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/help_documents/tmpl/default_batch_body.php b/admin/views/help_documents/tmpl/default_batch_body.php index 8b7da9c..f1072b0 100644 --- a/admin/views/help_documents/tmpl/default_batch_body.php +++ b/admin/views/help_documents/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/help_documents/tmpl/default_batch_footer.php b/admin/views/help_documents/tmpl/default_batch_footer.php index fbbcc18..2ec299d 100644 --- a/admin/views/help_documents/tmpl/default_batch_footer.php +++ b/admin/views/help_documents/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/help_documents/tmpl/default_body.php b/admin/views/help_documents/tmpl/default_body.php index 32e8cb5..a8a1065 100644 --- a/admin/views/help_documents/tmpl/default_body.php +++ b/admin/views/help_documents/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=help_documents&task=help_document.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=help_documents&task=help_docume get('help_document.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/help_documents/tmpl/default_foot.php b/admin/views/help_documents/tmpl/default_foot.php index a06974c..2bb8c03 100644 --- a/admin/views/help_documents/tmpl/default_foot.php +++ b/admin/views/help_documents/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php index c67d3b6..cabdcb8 100644 --- a/admin/views/help_documents/tmpl/default_head.php +++ b/admin/views/help_documents/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/help_documents/tmpl/default_toolbar.php b/admin/views/help_documents/tmpl/default_toolbar.php index b5cac03..b0e99b3 100644 --- a/admin/views/help_documents/tmpl/default_toolbar.php +++ b/admin/views/help_documents/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 49c7cf5..394cf09 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewHelp_documents extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewHelp_documents extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Type Selection $this->typeOptions = $this->getTheTypeSelections(); // We do some sanitation for Type filter @@ -219,16 +202,6 @@ class SupportgroupsViewHelp_documents extends JViewLegacy 'filter_type', JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Type Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_LABEL').' -', - 'batch[type]', - JHtml::_('select.options', $this->typeOptions, 'value', 'text') - ); - } } // Set Location Selection @@ -249,16 +222,6 @@ class SupportgroupsViewHelp_documents extends JViewLegacy 'filter_location', JHtml::_('select.options', $this->locationOptions, 'value', 'text', $this->state->get('filter.location')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Location Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION_LABEL').' -', - 'batch[location]', - JHtml::_('select.options', $this->locationOptions, 'value', 'text') - ); - } } // Set Admin View Selection @@ -275,20 +238,10 @@ class SupportgroupsViewHelp_documents extends JViewLegacy { // Admin View Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_LABEL') . ' -', 'filter_admin_view', JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text', $this->state->get('filter.admin_view')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Admin View Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', - 'batch[admin_view]', - JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text') - ); - } } // Set Site View Selection @@ -305,20 +258,74 @@ class SupportgroupsViewHelp_documents extends JViewLegacy { // Site View Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_LABEL') . ' -', 'filter_site_view', JHtml::_('select.options', $this->site_viewOptions, 'value', 'text', $this->state->get('filter.site_view')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Site View Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', - 'batch[site_view]', - JHtml::_('select.options', $this->site_viewOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Type batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_LABEL').' -', + 'batch[type]', + JHtml::_('select.options', $this->typeOptions, 'value', 'text') + ); + } + + // Only load Location batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Location Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_LOCATION_LABEL').' -', + 'batch[location]', + JHtml::_('select.options', $this->locationOptions, 'value', 'text') + ); + } + + // Only load Admin View batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Admin View Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', + 'batch[admin_view]', + JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text') + ); + } + + // Only load Site View batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Site View Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', + 'batch[site_view]', + JHtml::_('select.options', $this->site_viewOptions, 'value', 'text') + ); } } @@ -363,7 +370,7 @@ class SupportgroupsViewHelp_documents extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.title' => JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_TITLE_LABEL'), 'a.type' => JText::_('COM_SUPPORTGROUPS_HELP_DOCUMENT_TYPE_LABEL'), @@ -391,13 +398,13 @@ class SupportgroupsViewHelp_documents extends JViewLegacy $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); if ($results) { // get model $model = $this->getModel(); $results = array_unique($results); - $_filter = array(); foreach ($results as $type) { // Translate the type selection @@ -405,9 +412,8 @@ class SupportgroupsViewHelp_documents extends JViewLegacy // Now add the type and its text to the options array $_filter[] = JHtml::_('select.option', $type, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } protected function getTheLocationSelections() @@ -427,13 +433,13 @@ class SupportgroupsViewHelp_documents extends JViewLegacy $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); if ($results) { // get model $model = $this->getModel(); $results = array_unique($results); - $_filter = array(); foreach ($results as $location) { // Translate the location selection @@ -441,8 +447,7 @@ class SupportgroupsViewHelp_documents extends JViewLegacy // Now add the location and its text to the options array $_filter[] = JHtml::_('select.option', $location, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index c85952d..1da7817 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index cfbbb8a..9e3dc39 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/info_type/submitbutton.js b/admin/views/info_type/submitbutton.js index 8ca33ec..8673e12 100644 --- a/admin/views/info_type/submitbutton.js +++ b/admin/views/info_type/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/info_type/tmpl/edit.php b/admin/views/info_type/tmpl/edit.php index 9c7a173..d43a1a8 100644 --- a/admin/views/info_type/tmpl/edit.php +++ b/admin/views/info_type/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 = 'info_typeTab'; ?> - canDo->get('info_type.delete') || $this->canDo->get('info_type.edit.created_by') || $this->canDo->get('info_type.edit.state') || $this->canDo->get('info_type.edit.created')) : ?> + canDo->get('info_type.edit.created_by') || $this->canDo->get('info_type.edit.created') || $this->canDo->get('info_type.edit.state') || ($this->canDo->get('info_type.delete') && $this->canDo->get('info_type.edit.state'))) : ?>
diff --git a/admin/views/info_type/view.html.php b/admin/views/info_type/view.html.php index f99b72e..151d8c4 100644 --- a/admin/views/info_type/view.html.php +++ b/admin/views/info_type/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/info_types/tmpl/default.php b/admin/views/info_types/tmpl/default.php index ff06382..c7ce960 100644 --- a/admin/views/info_types/tmpl/default.php +++ b/admin/views/info_types/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=info_types.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'info_typeList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_INFO_TYPES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_INFO_TYPES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/info_types/tmpl/default_batch_body.php b/admin/views/info_types/tmpl/default_batch_body.php index 4de6e01..fda3ea7 100644 --- a/admin/views/info_types/tmpl/default_batch_body.php +++ b/admin/views/info_types/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/info_types/tmpl/default_batch_footer.php b/admin/views/info_types/tmpl/default_batch_footer.php index 12803bd..8384358 100644 --- a/admin/views/info_types/tmpl/default_batch_footer.php +++ b/admin/views/info_types/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/info_types/tmpl/default_body.php b/admin/views/info_types/tmpl/default_body.php index 597d90b..0ed3f58 100644 --- a/admin/views/info_types/tmpl/default_body.php +++ b/admin/views/info_types/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=info_types&task=info_type.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=info_types&task=info_type.edit" get('info_type.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/info_types/tmpl/default_foot.php b/admin/views/info_types/tmpl/default_foot.php index 30cb8fa..0f5f7e1 100644 --- a/admin/views/info_types/tmpl/default_foot.php +++ b/admin/views/info_types/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/info_types/tmpl/default_head.php b/admin/views/info_types/tmpl/default_head.php index 3c94c15..d0378a1 100644 --- a/admin/views/info_types/tmpl/default_head.php +++ b/admin/views/info_types/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/info_types/tmpl/default_toolbar.php b/admin/views/info_types/tmpl/default_toolbar.php index d550035..1b31155 100644 --- a/admin/views/info_types/tmpl/default_toolbar.php +++ b/admin/views/info_types/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/info_types/view.html.php b/admin/views/info_types/view.html.php index 5cdb18b..834b8b2 100644 --- a/admin/views/info_types/view.html.php +++ b/admin/views/info_types/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewInfo_types extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,39 +166,42 @@ class SupportgroupsViewInfo_types extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); + } + + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); } } @@ -243,7 +246,7 @@ class SupportgroupsViewInfo_types extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_INFO_TYPE_NAME_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') diff --git a/admin/views/payment/submitbutton.js b/admin/views/payment/submitbutton.js index 08b670d..081f47e 100644 --- a/admin/views/payment/submitbutton.js +++ b/admin/views/payment/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/payment/tmpl/edit.php b/admin/views/payment/tmpl/edit.php index 9b9f72f..4cd3c01 100644 --- a/admin/views/payment/tmpl/edit.php +++ b/admin/views/payment/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -56,7 +56,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'paymentTab'; ?> - canDo->get('payment.delete') || $this->canDo->get('payment.edit.created_by') || $this->canDo->get('payment.edit.state') || $this->canDo->get('payment.edit.created')) : ?> + canDo->get('payment.edit.created_by') || $this->canDo->get('payment.edit.created') || $this->canDo->get('payment.edit.state') || ($this->canDo->get('payment.delete') && $this->canDo->get('payment.edit.state'))) : ?>
diff --git a/admin/views/payment/view.html.php b/admin/views/payment/view.html.php index 47b858f..630dc22 100644 --- a/admin/views/payment/view.html.php +++ b/admin/views/payment/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/payments/tmpl/default.php b/admin/views/payments/tmpl/default.php index 4948d4f..f38cd0b 100644 --- a/admin/views/payments/tmpl/default.php +++ b/admin/views/payments/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=payments.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'paymentList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_PAYMENTS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_PAYMENTS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/payments/tmpl/default_batch_body.php b/admin/views/payments/tmpl/default_batch_body.php index 8868e02..716e6d2 100644 --- a/admin/views/payments/tmpl/default_batch_body.php +++ b/admin/views/payments/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/payments/tmpl/default_batch_footer.php b/admin/views/payments/tmpl/default_batch_footer.php index 0546942..dea4b89 100644 --- a/admin/views/payments/tmpl/default_batch_footer.php +++ b/admin/views/payments/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/payments/tmpl/default_body.php b/admin/views/payments/tmpl/default_body.php index c0d0e29..5c86595 100644 --- a/admin/views/payments/tmpl/default_body.php +++ b/admin/views/payments/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=payments&task=payment.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=payments&task=payment.edit"; get('payment.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/payments/tmpl/default_foot.php b/admin/views/payments/tmpl/default_foot.php index 306b130..2785100 100644 --- a/admin/views/payments/tmpl/default_foot.php +++ b/admin/views/payments/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/payments/tmpl/default_head.php b/admin/views/payments/tmpl/default_head.php index 0b59844..4971456 100644 --- a/admin/views/payments/tmpl/default_head.php +++ b/admin/views/payments/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/payments/tmpl/default_toolbar.php b/admin/views/payments/tmpl/default_toolbar.php index bce2a8e..3ce25c0 100644 --- a/admin/views/payments/tmpl/default_toolbar.php +++ b/admin/views/payments/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/payments/view.html.php b/admin/views/payments/view.html.php index e2ace4d..18210ae 100644 --- a/admin/views/payments/view.html.php +++ b/admin/views/payments/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewPayments extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewPayments extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Support Group Name Selection $this->support_groupNameOptions = JFormHelper::loadFieldType('Supportgroups')->options; // We do some sanitation for Support Group Name filter @@ -215,20 +198,10 @@ class SupportgroupsViewPayments extends JViewLegacy { // Support Group Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL') . ' -', 'filter_support_group', JHtml::_('select.options', $this->support_groupNameOptions, 'value', 'text', $this->state->get('filter.support_group')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Support Group Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL').' -', - 'batch[support_group]', - JHtml::_('select.options', $this->support_groupNameOptions, 'value', 'text') - ); - } } // Set Year Selection @@ -249,16 +222,48 @@ class SupportgroupsViewPayments extends JViewLegacy 'filter_year', JHtml::_('select.options', $this->yearOptions, 'value', 'text', $this->state->get('filter.year')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Year Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_PAYMENT_YEAR_LABEL').' -', - 'batch[year]', - JHtml::_('select.options', $this->yearOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Support Group Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Support Group Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL').' -', + 'batch[support_group]', + JHtml::_('select.options', $this->support_groupNameOptions, 'value', 'text') + ); + } + + // Only load Year batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Year Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_PAYMENT_YEAR_LABEL').' -', + 'batch[year]', + JHtml::_('select.options', $this->yearOptions, 'value', 'text') + ); } } @@ -303,7 +308,7 @@ class SupportgroupsViewPayments extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'g.name' => JText::_('COM_SUPPORTGROUPS_PAYMENT_SUPPORT_GROUP_LABEL'), 'a.year' => JText::_('COM_SUPPORTGROUPS_PAYMENT_YEAR_LABEL'), @@ -329,13 +334,13 @@ class SupportgroupsViewPayments extends JViewLegacy $db->setQuery($query); $results = $db->loadColumn(); + $_filter = array(); if ($results) { // get model $model = $this->getModel(); $results = array_unique($results); - $_filter = array(); foreach ($results as $year) { // Translate the year selection @@ -343,8 +348,7 @@ class SupportgroupsViewPayments extends JViewLegacy // Now add the year and its text to the options array $_filter[] = JHtml::_('select.option', $year, JText::_($text)); } - return $_filter; } - return false; + return $_filter; } } diff --git a/admin/views/region/submitbutton.js b/admin/views/region/submitbutton.js index 8000ed0..b553275 100644 --- a/admin/views/region/submitbutton.js +++ b/admin/views/region/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/region/tmpl/edit.php b/admin/views/region/tmpl/edit.php index 6ac2560..77ede4b 100644 --- a/admin/views/region/tmpl/edit.php +++ b/admin/views/region/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -75,7 +75,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'regionTab'; ?> - canDo->get('region.delete') || $this->canDo->get('region.edit.created_by') || $this->canDo->get('region.edit.state') || $this->canDo->get('region.edit.created')) : ?> + canDo->get('region.edit.created_by') || $this->canDo->get('region.edit.created') || $this->canDo->get('region.edit.state') || ($this->canDo->get('region.delete') && $this->canDo->get('region.edit.state'))) : ?>
diff --git a/admin/views/region/view.html.php b/admin/views/region/view.html.php index fb5e274..216e65f 100644 --- a/admin/views/region/view.html.php +++ b/admin/views/region/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/regions/tmpl/default.php b/admin/views/regions/tmpl/default.php index 6cc8787..4cc9fee 100644 --- a/admin/views/regions/tmpl/default.php +++ b/admin/views/regions/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=regions.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'regionList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_REGIONS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_REGIONS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/regions/tmpl/default_batch_body.php b/admin/views/regions/tmpl/default_batch_body.php index 670b9b3..384e607 100644 --- a/admin/views/regions/tmpl/default_batch_body.php +++ b/admin/views/regions/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/regions/tmpl/default_batch_footer.php b/admin/views/regions/tmpl/default_batch_footer.php index 244e604..fd0f0a6 100644 --- a/admin/views/regions/tmpl/default_batch_footer.php +++ b/admin/views/regions/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/regions/tmpl/default_body.php b/admin/views/regions/tmpl/default_body.php index 206b2cf..3ee3ee6 100644 --- a/admin/views/regions/tmpl/default_body.php +++ b/admin/views/regions/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=regions&task=region.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=regions&task=region.edit"; get('region.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/regions/tmpl/default_foot.php b/admin/views/regions/tmpl/default_foot.php index c6d3497..0004db2 100644 --- a/admin/views/regions/tmpl/default_foot.php +++ b/admin/views/regions/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/regions/tmpl/default_head.php b/admin/views/regions/tmpl/default_head.php index 5d192ce..5196fca 100644 --- a/admin/views/regions/tmpl/default_head.php +++ b/admin/views/regions/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/regions/tmpl/default_toolbar.php b/admin/views/regions/tmpl/default_toolbar.php index d63cb92..d52a6b9 100644 --- a/admin/views/regions/tmpl/default_toolbar.php +++ b/admin/views/regions/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/regions/view.html.php b/admin/views/regions/view.html.php index b6fa16d..b408fce 100644 --- a/admin/views/regions/view.html.php +++ b/admin/views/regions/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewRegions extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -166,41 +166,24 @@ class SupportgroupsViewRegions extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Country Name Selection $this->countryNameOptions = JFormHelper::loadFieldType('Countries')->options; // We do some sanitation for Country Name filter @@ -215,20 +198,41 @@ class SupportgroupsViewRegions extends JViewLegacy { // Country Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_REGION_COUNTRY_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_REGION_COUNTRY_LABEL') . ' -', 'filter_country', JHtml::_('select.options', $this->countryNameOptions, 'value', 'text', $this->state->get('filter.country')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Country Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_REGION_COUNTRY_LABEL').' -', - 'batch[country]', - JHtml::_('select.options', $this->countryNameOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Country Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Country Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_REGION_COUNTRY_LABEL').' -', + 'batch[country]', + JHtml::_('select.options', $this->countryNameOptions, 'value', 'text') + ); } } @@ -273,7 +277,7 @@ class SupportgroupsViewRegions extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_REGION_NAME_LABEL'), 'g.name' => JText::_('COM_SUPPORTGROUPS_REGION_COUNTRY_LABEL'), diff --git a/admin/views/support_group/submitbutton.js b/admin/views/support_group/submitbutton.js index b6b0c0e..e9c7e01 100644 --- a/admin/views/support_group/submitbutton.js +++ b/admin/views/support_group/submitbutton.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage submitbutton.js diff --git a/admin/views/support_group/tmpl/edit.php b/admin/views/support_group/tmpl/edit.php index 83e0e31..c2347fe 100644 --- a/admin/views/support_group/tmpl/edit.php +++ b/admin/views/support_group/tmpl/edit.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage edit.php @@ -26,10 +26,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 ?> @@ -108,7 +108,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'support_groupTab'; ?> - canDo->get('support_group.delete') || $this->canDo->get('support_group.edit.created_by') || $this->canDo->get('support_group.edit.state') || $this->canDo->get('support_group.edit.created')) : ?> + canDo->get('support_group.edit.created_by') || $this->canDo->get('support_group.edit.created') || $this->canDo->get('support_group.edit.state') || ($this->canDo->get('support_group.delete') && $this->canDo->get('support_group.edit.state'))) : ?>
diff --git a/admin/views/support_group/view.html.php b/admin/views/support_group/view.html.php index b98cf7d..89dc0b1 100644 --- a/admin/views/support_group/view.html.php +++ b/admin/views/support_group/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/admin/views/support_groups/tmpl/default.php b/admin/views/support_groups/tmpl/default.php index f993f94..8306584 100644 --- a/admin/views/support_groups/tmpl/default.php +++ b/admin/views/support_groups/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,76 +24,73 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_supportgroups&task=support_groups.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'support_groupList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUPS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + diff --git a/admin/views/support_groups/tmpl/default_batch_body.php b/admin/views/support_groups/tmpl/default_batch_body.php index 5abd8ff..b1c8a8d 100644 --- a/admin/views/support_groups/tmpl/default_batch_body.php +++ b/admin/views/support_groups/tmpl/default_batch_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/support_groups/tmpl/default_batch_footer.php b/admin/views/support_groups/tmpl/default_batch_footer.php index 61d1276..0114898 100644 --- a/admin/views/support_groups/tmpl/default_batch_footer.php +++ b/admin/views/support_groups/tmpl/default_batch_footer.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_batch_footer.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); ?> diff --git a/admin/views/support_groups/tmpl/default_body.php b/admin/views/support_groups/tmpl/default_body.php index 8bc787f..e193ae5 100644 --- a/admin/views/support_groups/tmpl/default_body.php +++ b/admin/views/support_groups/tmpl/default_body.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_body.php @@ -24,7 +24,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); $edit = "index.php?option=com_supportgroups&view=support_groups&task=support_group.edit"; @@ -39,11 +39,8 @@ $edit = "index.php?option=com_supportgroups&view=support_groups&task=support_gro get('support_group.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/support_groups/tmpl/default_foot.php b/admin/views/support_groups/tmpl/default_foot.php index a06974c..2bb8c03 100644 --- a/admin/views/support_groups/tmpl/default_foot.php +++ b/admin/views/support_groups/tmpl/default_foot.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_foot.php diff --git a/admin/views/support_groups/tmpl/default_head.php b/admin/views/support_groups/tmpl/default_head.php index f6c0b7f..e98a49a 100644 --- a/admin/views/support_groups/tmpl/default_head.php +++ b/admin/views/support_groups/tmpl/default_head.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_head.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + ', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> diff --git a/admin/views/support_groups/tmpl/default_toolbar.php b/admin/views/support_groups/tmpl/default_toolbar.php index 0445fae..e3fa8e0 100644 --- a/admin/views/support_groups/tmpl/default_toolbar.php +++ b/admin/views/support_groups/tmpl/default_toolbar.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_toolbar.php diff --git a/admin/views/support_groups/view.html.php b/admin/views/support_groups/view.html.php index 6509fbe..a2c0c37 100644 --- a/admin/views/support_groups/view.html.php +++ b/admin/views/support_groups/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -50,8 +50,8 @@ class SupportgroupsViewSupport_groups extends JViewLegacy $this->user = JFactory::getUser(); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); - $this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC')); + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -137,7 +137,7 @@ class SupportgroupsViewSupport_groups extends JViewLegacy if ($this->user->authorise('support_group.smart_export', 'com_supportgroups')) { // add Smart Export button. - JToolBarHelper::custom('support_groups.smartExport', 'download', '', 'COM_SUPPORTGROUPS_SMART_EXPORT', 'true'); + JToolBarHelper::custom('support_groups.smartExport', 'download custom-button-smartexport', '', 'COM_SUPPORTGROUPS_SMART_EXPORT', 'true'); } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) @@ -171,41 +171,24 @@ class SupportgroupsViewSupport_groups extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_supportgroups'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } + // Only load publish filter if state change is allowed + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + // Set Area Name Selection $this->areaNameOptions = JFormHelper::loadFieldType('Areas')->options; // We do some sanitation for Area Name filter @@ -220,20 +203,10 @@ class SupportgroupsViewSupport_groups extends JViewLegacy { // Area Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_AREA_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_AREA_LABEL') . ' -', 'filter_area', JHtml::_('select.options', $this->areaNameOptions, 'value', 'text', $this->state->get('filter.area')) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Area Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_AREA_LABEL').' -', - 'batch[area]', - JHtml::_('select.options', $this->areaNameOptions, 'value', 'text') - ); - } } // Set Facility Name Selection @@ -250,20 +223,52 @@ class SupportgroupsViewSupport_groups extends JViewLegacy { // Facility Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_FACILITY_LABEL').' -', + '- Select ' . JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_FACILITY_LABEL') . ' -', 'filter_facility', JHtml::_('select.options', $this->facilityNameOptions, 'value', 'text', $this->state->get('filter.facility')) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Facility Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_FACILITY_LABEL').' -', - 'batch[facility]', - JHtml::_('select.options', $this->facilityNameOptions, 'value', 'text') - ); - } + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SUPPORTGROUPS_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Area Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Area Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_AREA_LABEL').' -', + 'batch[area]', + JHtml::_('select.options', $this->areaNameOptions, 'value', 'text') + ); + } + + // Only load Facility Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Facility Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_FACILITY_LABEL').' -', + 'batch[facility]', + JHtml::_('select.options', $this->facilityNameOptions, 'value', 'text') + ); } } @@ -308,7 +313,7 @@ class SupportgroupsViewSupport_groups extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_NAME_LABEL'), 'a.phone' => JText::_('COM_SUPPORTGROUPS_SUPPORT_GROUP_PHONE_LABEL'), diff --git a/admin/views/supportgroups/tmpl/default.php b/admin/views/supportgroups/tmpl/default.php index 63c49cc..630b064 100644 --- a/admin/views/supportgroups/tmpl/default.php +++ b/admin/views/supportgroups/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php diff --git a/admin/views/supportgroups/tmpl/default_main.php b/admin/views/supportgroups/tmpl/default_main.php index 47ed953..2983ec2 100644 --- a/admin/views/supportgroups/tmpl/default_main.php +++ b/admin/views/supportgroups/tmpl/default_main.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_main.php diff --git a/admin/views/supportgroups/tmpl/default_readme_information.php b/admin/views/supportgroups/tmpl/default_readme_information.php index 9658d9b..fa034da 100644 --- a/admin/views/supportgroups/tmpl/default_readme_information.php +++ b/admin/views/supportgroups/tmpl/default_readme_information.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_readme_information.php diff --git a/admin/views/supportgroups/tmpl/default_vast_development_method_notice_board.php b/admin/views/supportgroups/tmpl/default_vast_development_method_notice_board.php index b7ca437..26d4691 100644 --- a/admin/views/supportgroups/tmpl/default_vast_development_method_notice_board.php +++ b/admin/views/supportgroups/tmpl/default_vast_development_method_notice_board.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_vast_development_method_notice_board.php diff --git a/admin/views/supportgroups/tmpl/default_vdm.php b/admin/views/supportgroups/tmpl/default_vdm.php index 602de96..3beab92 100644 --- a/admin/views/supportgroups/tmpl/default_vdm.php +++ b/admin/views/supportgroups/tmpl/default_vdm.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default_vdm.php diff --git a/admin/views/supportgroups/view.html.php b/admin/views/supportgroups/view.html.php index 3c15f26..2fe1981 100644 --- a/admin/views/supportgroups/view.html.php +++ b/admin/views/supportgroups/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php diff --git a/script.php b/script.php index 29ec8f6..edbb7d3 100644 --- a/script.php +++ b/script.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage script.php @@ -89,7 +89,7 @@ class com_supportgroupsInstallerScript $support_group_done = $db->execute(); if ($support_group_done) { - // If succesfully remove Support_group add queued success message. + // If successfully remove Support_group add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.support_group) type alias was removed from the #__content_type table')); } @@ -104,7 +104,7 @@ class com_supportgroupsInstallerScript $support_group_done = $db->execute(); if ($support_group_done) { - // If succesfully remove Support_group add queued success message. + // If successfully remove Support_group add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.support_group) type alias was removed from the #__contentitem_tag_map table')); } @@ -119,7 +119,7 @@ class com_supportgroupsInstallerScript $support_group_done = $db->execute(); if ($support_group_done) { - // If succesfully remove Support_group add queued success message. + // If successfully removed Support_group add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.support_group) type alias was removed from the #__ucm_content table')); } @@ -175,7 +175,7 @@ class com_supportgroupsInstallerScript $payment_done = $db->execute(); if ($payment_done) { - // If succesfully remove Payment add queued success message. + // If successfully remove Payment add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.payment) type alias was removed from the #__content_type table')); } @@ -190,7 +190,7 @@ class com_supportgroupsInstallerScript $payment_done = $db->execute(); if ($payment_done) { - // If succesfully remove Payment add queued success message. + // If successfully remove Payment add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.payment) type alias was removed from the #__contentitem_tag_map table')); } @@ -205,7 +205,7 @@ class com_supportgroupsInstallerScript $payment_done = $db->execute(); if ($payment_done) { - // If succesfully remove Payment add queued success message. + // If successfully removed Payment add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.payment) type alias was removed from the #__ucm_content table')); } @@ -261,7 +261,7 @@ class com_supportgroupsInstallerScript $facility_done = $db->execute(); if ($facility_done) { - // If succesfully remove Facility add queued success message. + // If successfully remove Facility add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.facility) type alias was removed from the #__content_type table')); } @@ -276,7 +276,7 @@ class com_supportgroupsInstallerScript $facility_done = $db->execute(); if ($facility_done) { - // If succesfully remove Facility add queued success message. + // If successfully remove Facility add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.facility) type alias was removed from the #__contentitem_tag_map table')); } @@ -291,7 +291,7 @@ class com_supportgroupsInstallerScript $facility_done = $db->execute(); if ($facility_done) { - // If succesfully remove Facility add queued success message. + // If successfully removed Facility add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.facility) type alias was removed from the #__ucm_content table')); } @@ -347,7 +347,7 @@ class com_supportgroupsInstallerScript $facility_type_done = $db->execute(); if ($facility_type_done) { - // If succesfully remove Facility_type add queued success message. + // If successfully remove Facility_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.facility_type) type alias was removed from the #__content_type table')); } @@ -362,7 +362,7 @@ class com_supportgroupsInstallerScript $facility_type_done = $db->execute(); if ($facility_type_done) { - // If succesfully remove Facility_type add queued success message. + // If successfully remove Facility_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.facility_type) type alias was removed from the #__contentitem_tag_map table')); } @@ -377,7 +377,7 @@ class com_supportgroupsInstallerScript $facility_type_done = $db->execute(); if ($facility_type_done) { - // If succesfully remove Facility_type add queued success message. + // If successfully removed Facility_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.facility_type) type alias was removed from the #__ucm_content table')); } @@ -433,7 +433,7 @@ class com_supportgroupsInstallerScript $additional_info_done = $db->execute(); if ($additional_info_done) { - // If succesfully remove Additional_info add queued success message. + // If successfully remove Additional_info add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.additional_info) type alias was removed from the #__content_type table')); } @@ -448,7 +448,7 @@ class com_supportgroupsInstallerScript $additional_info_done = $db->execute(); if ($additional_info_done) { - // If succesfully remove Additional_info add queued success message. + // If successfully remove Additional_info add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.additional_info) type alias was removed from the #__contentitem_tag_map table')); } @@ -463,7 +463,7 @@ class com_supportgroupsInstallerScript $additional_info_done = $db->execute(); if ($additional_info_done) { - // If succesfully remove Additional_info add queued success message. + // If successfully removed Additional_info add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.additional_info) type alias was removed from the #__ucm_content table')); } @@ -519,7 +519,7 @@ class com_supportgroupsInstallerScript $info_type_done = $db->execute(); if ($info_type_done) { - // If succesfully remove Info_type add queued success message. + // If successfully remove Info_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.info_type) type alias was removed from the #__content_type table')); } @@ -534,7 +534,7 @@ class com_supportgroupsInstallerScript $info_type_done = $db->execute(); if ($info_type_done) { - // If succesfully remove Info_type add queued success message. + // If successfully remove Info_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.info_type) type alias was removed from the #__contentitem_tag_map table')); } @@ -549,7 +549,7 @@ class com_supportgroupsInstallerScript $info_type_done = $db->execute(); if ($info_type_done) { - // If succesfully remove Info_type add queued success message. + // If successfully removed Info_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.info_type) type alias was removed from the #__ucm_content table')); } @@ -605,7 +605,7 @@ class com_supportgroupsInstallerScript $area_done = $db->execute(); if ($area_done) { - // If succesfully remove Area add queued success message. + // If successfully remove Area add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.area) type alias was removed from the #__content_type table')); } @@ -620,7 +620,7 @@ class com_supportgroupsInstallerScript $area_done = $db->execute(); if ($area_done) { - // If succesfully remove Area add queued success message. + // If successfully remove Area add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.area) type alias was removed from the #__contentitem_tag_map table')); } @@ -635,7 +635,7 @@ class com_supportgroupsInstallerScript $area_done = $db->execute(); if ($area_done) { - // If succesfully remove Area add queued success message. + // If successfully removed Area add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.area) type alias was removed from the #__ucm_content table')); } @@ -691,7 +691,7 @@ class com_supportgroupsInstallerScript $area_type_done = $db->execute(); if ($area_type_done) { - // If succesfully remove Area_type add queued success message. + // If successfully remove Area_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.area_type) type alias was removed from the #__content_type table')); } @@ -706,7 +706,7 @@ class com_supportgroupsInstallerScript $area_type_done = $db->execute(); if ($area_type_done) { - // If succesfully remove Area_type add queued success message. + // If successfully remove Area_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.area_type) type alias was removed from the #__contentitem_tag_map table')); } @@ -721,7 +721,7 @@ class com_supportgroupsInstallerScript $area_type_done = $db->execute(); if ($area_type_done) { - // If succesfully remove Area_type add queued success message. + // If successfully removed Area_type add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.area_type) type alias was removed from the #__ucm_content table')); } @@ -777,7 +777,7 @@ class com_supportgroupsInstallerScript $region_done = $db->execute(); if ($region_done) { - // If succesfully remove Region add queued success message. + // If successfully remove Region add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.region) type alias was removed from the #__content_type table')); } @@ -792,7 +792,7 @@ class com_supportgroupsInstallerScript $region_done = $db->execute(); if ($region_done) { - // If succesfully remove Region add queued success message. + // If successfully remove Region add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.region) type alias was removed from the #__contentitem_tag_map table')); } @@ -807,7 +807,7 @@ class com_supportgroupsInstallerScript $region_done = $db->execute(); if ($region_done) { - // If succesfully remove Region add queued success message. + // If successfully removed Region add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.region) type alias was removed from the #__ucm_content table')); } @@ -863,7 +863,7 @@ class com_supportgroupsInstallerScript $country_done = $db->execute(); if ($country_done) { - // If succesfully remove Country add queued success message. + // If successfully remove Country add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.country) type alias was removed from the #__content_type table')); } @@ -878,7 +878,7 @@ class com_supportgroupsInstallerScript $country_done = $db->execute(); if ($country_done) { - // If succesfully remove Country add queued success message. + // If successfully remove Country add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.country) type alias was removed from the #__contentitem_tag_map table')); } @@ -893,7 +893,7 @@ class com_supportgroupsInstallerScript $country_done = $db->execute(); if ($country_done) { - // If succesfully remove Country add queued success message. + // If successfully removed Country add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.country) type alias was removed from the #__ucm_content table')); } @@ -949,7 +949,7 @@ class com_supportgroupsInstallerScript $currency_done = $db->execute(); if ($currency_done) { - // If succesfully remove Currency add queued success message. + // If successfully remove Currency add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.currency) type alias was removed from the #__content_type table')); } @@ -964,7 +964,7 @@ class com_supportgroupsInstallerScript $currency_done = $db->execute(); if ($currency_done) { - // If succesfully remove Currency add queued success message. + // If successfully remove Currency add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.currency) type alias was removed from the #__contentitem_tag_map table')); } @@ -979,7 +979,7 @@ class com_supportgroupsInstallerScript $currency_done = $db->execute(); if ($currency_done) { - // If succesfully remove Currency add queued success message. + // If successfully removed Currency add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.currency) type alias was removed from the #__ucm_content table')); } @@ -1035,7 +1035,7 @@ class com_supportgroupsInstallerScript $help_document_done = $db->execute(); if ($help_document_done) { - // If succesfully remove Help_document add queued success message. + // If successfully remove Help_document add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.help_document) type alias was removed from the #__content_type table')); } @@ -1050,7 +1050,7 @@ class com_supportgroupsInstallerScript $help_document_done = $db->execute(); if ($help_document_done) { - // If succesfully remove Help_document add queued success message. + // If successfully remove Help_document add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.help_document) type alias was removed from the #__contentitem_tag_map table')); } @@ -1065,7 +1065,7 @@ class com_supportgroupsInstallerScript $help_document_done = $db->execute(); if ($help_document_done) { - // If succesfully remove Help_document add queued success message. + // If successfully removed Help_document add queued success message. $app->enqueueMessage(JText::_('The (com_supportgroups.help_document) type alias was removed from the #__ucm_content table')); } @@ -1109,10 +1109,31 @@ class com_supportgroupsInstallerScript $help_document_done = $db->execute(); if ($help_document_done) { - // If succesfully remove supportgroups add queued success message. + // If successfully removed supportgroups add queued success message. $app->enqueueMessage(JText::_('All related items was removed from the #__assets table')); } + // Get the biggest rule column in the assets table at this point. + $get_rule_length = "SELECT CHAR_LENGTH(`rules`) as rule_size FROM #__assets ORDER BY rule_size DESC LIMIT 1"; + $db->setQuery($get_rule_length); + if ($db->execute()) + { + $rule_length = $db->loadResult(); + // Check the size of the rules column + if ($rule_length < 5120) + { + // Revert the assets table rules column back to the default + $revert_rule = "ALTER TABLE `#__assets` CHANGE `rules` `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.';"; + $db->setQuery($revert_rule); + $db->execute(); + $app->enqueueMessage(JText::_('Reverted the #__assets table rules column back to its default size of varchar(5120)')); + } + else + { + + $app->enqueueMessage(JText::_('Could not revert the #__assets table rules column back to its default size of varchar(5120), since there is still one or more components that still requires the column to be larger.')); + } + } // Set db if not set already. if (!isset($db)) @@ -1656,9 +1677,9 @@ class com_supportgroupsInstallerScript $help_document->type_title = 'Supportgroups Help_document'; $help_document->type_alias = 'com_supportgroups.help_document'; $help_document->table = '{"special": {"dbtable": "#__supportgroups_help_document","key": "id","type": "Help_document","prefix": "supportgroupsTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","not_required":"not_required","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}'; + $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}'; $help_document->router = 'SupportgroupsHelperRoute::getHelp_documentRoute'; - $help_document->content_history_options = '{"formFile": "administrator/components/com_supportgroups/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}'; + $help_document->content_history_options = '{"formFile": "administrator/components/com_supportgroups/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}'; // Set the object into the content types table. $help_document_Inserted = $db->insertObject('#__content_types', $help_document); @@ -1678,6 +1699,22 @@ class com_supportgroupsInstallerScript $db->setQuery($query); $allDone = $db->execute(); + // Get the biggest rule column in the assets table at this point. + $get_rule_length = "SELECT CHAR_LENGTH(`rules`) as rule_size FROM #__assets ORDER BY rule_size DESC LIMIT 1"; + $db->setQuery($get_rule_length); + if ($db->execute()) + { + $rule_length = $db->loadResult(); + // Check the size of the rules column + if ($rule_length <= 40800) + { + // Fix the assets table rules column size + $fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` TEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to TEXT by JCB';"; + $db->setQuery($fix_rules_size); + $db->execute(); + $app->enqueueMessage(JText::_('The #__assets table rules column was resized to the TEXT datatype for the components possible large permission rules.')); + } + } echo ' '; @@ -2229,9 +2266,9 @@ class com_supportgroupsInstallerScript $help_document->type_title = 'Supportgroups Help_document'; $help_document->type_alias = 'com_supportgroups.help_document'; $help_document->table = '{"special": {"dbtable": "#__supportgroups_help_document","key": "id","type": "Help_document","prefix": "supportgroupsTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","not_required":"not_required","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}'; + $help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","alias":"alias","content":"content","article":"article","url":"url","target":"target"}}'; $help_document->router = 'SupportgroupsHelperRoute::getHelp_documentRoute'; - $help_document->content_history_options = '{"formFile": "administrator/components/com_supportgroups/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}'; + $help_document->content_history_options = '{"formFile": "administrator/components/com_supportgroups/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","article","target"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}'; // Check if help_document type is already in content_type DB. $help_document_id = null; diff --git a/site/assets/css/map.css b/site/assets/css/map.css index a13ee22..b821a23 100644 --- a/site/assets/css/map.css +++ b/site/assets/css/map.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage map.css diff --git a/site/assets/css/site.css b/site/assets/css/site.css index f300065..b381619 100644 --- a/site/assets/css/site.css +++ b/site/assets/css/site.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage site.css diff --git a/site/assets/css/supportgroups.css b/site/assets/css/supportgroups.css index afd6d8f..68e6268 100644 --- a/site/assets/css/supportgroups.css +++ b/site/assets/css/supportgroups.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.css diff --git a/site/assets/js/site.js b/site/assets/js/site.js index 06756ca..c5c984b 100644 --- a/site/assets/js/site.js +++ b/site/assets/js/site.js @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage site.js diff --git a/site/controller.php b/site/controller.php index c8f2377..2baf519 100644 --- a/site/controller.php +++ b/site/controller.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage controller.php diff --git a/site/controllers/ajax.json.php b/site/controllers/ajax.json.php index cd5c960..2b3c210 100644 --- a/site/controllers/ajax.json.php +++ b/site/controllers/ajax.json.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage ajax.json.php diff --git a/site/controllers/help.php b/site/controllers/help.php index dfbdef5..48fbd0f 100644 --- a/site/controllers/help.php +++ b/site/controllers/help.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage help.php diff --git a/site/helpers/category.php b/site/helpers/category.php index 2b26f31..af35778 100644 --- a/site/helpers/category.php +++ b/site/helpers/category.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage category.php diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php index 03da9b6..043e266 100644 --- a/site/helpers/headercheck.php +++ b/site/helpers/headercheck.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage headercheck.php diff --git a/site/helpers/route.php b/site/helpers/route.php index 8a515a0..de9157b 100644 --- a/site/helpers/route.php +++ b/site/helpers/route.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage route.php diff --git a/site/helpers/supportgroups.php b/site/helpers/supportgroups.php index b69c035..b77aef6 100644 --- a/site/helpers/supportgroups.php +++ b/site/helpers/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php @@ -26,8 +26,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; /** diff --git a/site/models/ajax.php b/site/models/ajax.php index 23de951..300166d 100644 --- a/site/models/ajax.php +++ b/site/models/ajax.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage ajax.php diff --git a/site/models/map.php b/site/models/map.php index 1eeec88..fb4433e 100644 --- a/site/models/map.php +++ b/site/models/map.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage map.php diff --git a/site/models/supportgroups.php b/site/models/supportgroups.php index 49e427e..58e965e 100644 --- a/site/models/supportgroups.php +++ b/site/models/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php diff --git a/site/router.php b/site/router.php index a2163ed..07d1e36 100644 --- a/site/router.php +++ b/site/router.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage router.php diff --git a/site/supportgroups.php b/site/supportgroups.php index 47b3b2b..516746b 100644 --- a/site/supportgroups.php +++ b/site/supportgroups.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage supportgroups.php @@ -25,6 +25,7 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + JHtml::_('behavior.tabstate'); // Set the component css/js @@ -33,7 +34,7 @@ $document->addStyleSheet('components/com_supportgroups/assets/css/site.css'); $document->addScript('components/com_supportgroups/assets/js/site.js'); // Require helper files -JLoader::register('SupportgroupsHelper', __DIR__ . '/helpers/supportgroups.php'); +JLoader::register('SupportgroupsHelper', __DIR__ . '/helpers/supportgroups.php'); JLoader::register('SupportgroupsHelperRoute', __DIR__ . '/helpers/route.php'); // Get an instance of the controller prefixed by Supportgroups diff --git a/site/views/map/tmpl/default.php b/site/views/map/tmpl/default.php index df5818e..7ae8638 100644 --- a/site/views/map/tmpl/default.php +++ b/site/views/map/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,11 +24,12 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); + + // get modules $model_behind_map = $this->getModules('behind-map','div','uk-panel'); - ?> toolbar->render(); ?> backToRef; ?> diff --git a/site/views/map/view.html.php b/site/views/map/view.html.php index 3e0f127..c2fd7d3 100644 --- a/site/views/map/view.html.php +++ b/site/views/map/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -410,8 +410,6 @@ class SupportgroupsViewMap extends JViewLegacy */ protected function addToolBar() { - // adding the joomla toolbar to the front - JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php'); // set help url for this view if found $help_url = SupportgroupsHelper::getHelpUrl('map'); @@ -439,7 +437,7 @@ class SupportgroupsViewMap extends JViewLegacy { // this is where you want to load your module position $modules = JModuleHelper::getModules($position); - if ($modules) + if (SupportgroupsHelper::checkArray($modules, true)) { // set the place holder $this->setModules[$position] = array(); diff --git a/site/views/supportgroups/tmpl/default.php b/site/views/supportgroups/tmpl/default.php index dab03c6..ffedba6 100644 --- a/site/views/supportgroups/tmpl/default.php +++ b/site/views/supportgroups/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage default.php @@ -24,11 +24,12 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); + + // get modules $model_behind_map = $this->getModules('behind-table','div','uk-panel'); - ?> toolbar->render(); ?> items) && SupportgroupsHelper::checkArray($this->items)): ?> diff --git a/site/views/supportgroups/view.html.php b/site/views/supportgroups/view.html.php index b2fc578..5e08fb1 100644 --- a/site/views/supportgroups/view.html.php +++ b/site/views/supportgroups/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 1.0.11 - @build 30th May, 2020 + @build 6th January, 2021 @created 24th February, 2016 @package Support Groups @subpackage view.html.php @@ -355,8 +355,6 @@ class SupportgroupsViewSupportgroups extends JViewLegacy */ protected function addToolBar() { - // adding the joomla toolbar to the front - JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php'); // set help url for this view if found $help_url = SupportgroupsHelper::getHelpUrl('supportgroups'); @@ -384,7 +382,7 @@ class SupportgroupsViewSupportgroups extends JViewLegacy { // this is where you want to load your module position $modules = JModuleHelper::getModules($position); - if ($modules) + if (SupportgroupsHelper::checkArray($modules, true)) { // set the place holder $this->setModules[$position] = array(); diff --git a/supportgroups.xml b/supportgroups.xml index ba7233c..7e7bc07 100644 --- a/supportgroups.xml +++ b/supportgroups.xml @@ -1,7 +1,7 @@ COM_SUPPORTGROUPS - 30th May, 2020 + 6th January, 2021 Llewellyn van der Merwe joomla@vdm.io http://www.vdm.io