diff --git a/README.md b/README.md index 4e55679e..bcc52dc7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sermon Distributor (2.0.x) - ![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor") + ![Sermon Distributor image](https://raw.githubusercontent.com/Llewellynvdm/Joomla-Sermon-Distributor/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor") Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox. @@ -23,45 +23,74 @@ The best way to see all your options is to install this component on you Joomla + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Sermon Distributor](https://www.vdm.io/) + *First Build*: 22nd October, 2015 -+ *Last Build*: 30th May, 2020 ++ *Last Build*: 30th November, 2020 + *Version*: 2.0.x + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time :hourglass: -**193 Hours** or **24 Eight Hour Days** (actual time the author saved - +**203 Hours** or **25 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **69273** -+ *File count*: **443** ++ *Line count*: **72694** ++ *File count*: **459** + *Folder count*: **93** -**128 Hours** or **16 Eight Hour Days** (the actual time the author spent) +**133 Hours** or **17 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @48hours** = codingtime / 4; -> **planning @28hours** = codingtime / 7; -> **mapping @19hours** = codingtime / 10; -> **office @32hours** = codingtime / 6;) +> **debugging @51hours** = codingtime / 4; +> **planning @29hours** = codingtime / 7; +> **mapping @20hours** = codingtime / 10; +> **office @34hours** = codingtime / 6;) -**321 Hours** or **40 Eight Hour Days** +**336 Hours** or **42 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **8 weeks** or **1.7 months** +Project duration: **8.4 weeks** or **1.8 months** > This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) -## Donations + +## 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). -Come on buy me a coffee :) - * PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm) - * Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf - * Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 \ No newline at end of file +[![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 4e55679e..bcc52dc7 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,6 +1,6 @@ # Sermon Distributor (2.0.x) - ![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor") + ![Sermon Distributor image](https://raw.githubusercontent.com/Llewellynvdm/Joomla-Sermon-Distributor/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor") Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox. @@ -23,45 +23,74 @@ The best way to see all your options is to install this component on you Joomla + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Sermon Distributor](https://www.vdm.io/) + *First Build*: 22nd October, 2015 -+ *Last Build*: 30th May, 2020 ++ *Last Build*: 30th November, 2020 + *Version*: 2.0.x + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time :hourglass: -**193 Hours** or **24 Eight Hour Days** (actual time the author saved - +**203 Hours** or **25 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **69273** -+ *File count*: **443** ++ *Line count*: **72694** ++ *File count*: **459** + *Folder count*: **93** -**128 Hours** or **16 Eight Hour Days** (the actual time the author spent) +**133 Hours** or **17 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @48hours** = codingtime / 4; -> **planning @28hours** = codingtime / 7; -> **mapping @19hours** = codingtime / 10; -> **office @32hours** = codingtime / 6;) +> **debugging @51hours** = codingtime / 4; +> **planning @29hours** = codingtime / 7; +> **mapping @20hours** = codingtime / 10; +> **office @34hours** = codingtime / 6;) -**321 Hours** or **40 Eight Hour Days** +**336 Hours** or **42 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **8 weeks** or **1.7 months** +Project duration: **8.4 weeks** or **1.8 months** > This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) -## Donations + +## 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). -Come on buy me a coffee :) - * PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm) - * Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf - * Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 \ No newline at end of file +[![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/admin.css b/admin/assets/css/admin.css index caa06819..f8be9d87 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 8a819aa5..f3d30fce 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/external_source.css b/admin/assets/css/external_source.css index ea4518a8..965061c1 100644 --- a/admin/assets/css/external_source.css +++ b/admin/assets/css/external_source.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/external_sources.css b/admin/assets/css/external_sources.css index 1ebd41d8..f245088d 100644 --- a/admin/assets/css/external_sources.css +++ b/admin/assets/css/external_sources.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css index c61d2818..e6d5bf84 100644 --- a/admin/assets/css/help_document.css +++ b/admin/assets/css/help_document.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css index e3460ff4..8c4f3363 100644 --- a/admin/assets/css/help_documents.css +++ b/admin/assets/css/help_documents.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/local_listing.css b/admin/assets/css/local_listing.css index ca2f72df..dbd16f60 100644 --- a/admin/assets/css/local_listing.css +++ b/admin/assets/css/local_listing.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/local_listings.css b/admin/assets/css/local_listings.css index 766c3116..346df221 100644 --- a/admin/assets/css/local_listings.css +++ b/admin/assets/css/local_listings.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/manual_updater.css b/admin/assets/css/manual_updater.css index e49b3f78..baedfc1f 100644 --- a/admin/assets/css/manual_updater.css +++ b/admin/assets/css/manual_updater.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/preacher.css b/admin/assets/css/preacher.css index e2969a0d..c25302b3 100644 --- a/admin/assets/css/preacher.css +++ b/admin/assets/css/preacher.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/preachers.css b/admin/assets/css/preachers.css index 0a2b6850..58f0916a 100644 --- a/admin/assets/css/preachers.css +++ b/admin/assets/css/preachers.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/series.css b/admin/assets/css/series.css index ad9bdc2c..251160e1 100644 --- a/admin/assets/css/series.css +++ b/admin/assets/css/series.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/series_list.css b/admin/assets/css/series_list.css index ea64c0e1..a5c52f78 100644 --- a/admin/assets/css/series_list.css +++ b/admin/assets/css/series_list.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/sermon.css b/admin/assets/css/sermon.css index 7cd91fe6..5b712d5e 100644 --- a/admin/assets/css/sermon.css +++ b/admin/assets/css/sermon.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/sermons.css b/admin/assets/css/sermons.css index c44e98d9..198443a7 100644 --- a/admin/assets/css/sermons.css +++ b/admin/assets/css/sermons.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/statistic.css b/admin/assets/css/statistic.css index 10a37d50..f724cdd2 100644 --- a/admin/assets/css/statistic.css +++ b/admin/assets/css/statistic.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/css/statistics.css b/admin/assets/css/statistics.css index 4fc1316a..c5c2a6be 100644 --- a/admin/assets/css/statistics.css +++ b/admin/assets/css/statistics.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 58b4e54f..e8282bc2 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* JS Document */ diff --git a/admin/controller.php b/admin/controller.php index 517e4f49..27ee6b22 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index fea8f1ed..a4efae80 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/external_source.php b/admin/controllers/external_source.php index f175b942..1457be3d 100644 --- a/admin/controllers/external_source.php +++ b/admin/controllers/external_source.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/external_sources.php b/admin/controllers/external_sources.php index d08606f2..24adbbdc 100644 --- a/admin/controllers/external_sources.php +++ b/admin/controllers/external_sources.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/help.php b/admin/controllers/help.php index 2b9a6d82..e8ce790c 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index 5689a2f8..cd067a1e 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index 3e739bc5..89b5a9b5 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 27d39b06..d5a15116 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/local_listing.php b/admin/controllers/local_listing.php index 02762a8d..16766b51 100644 --- a/admin/controllers/local_listing.php +++ b/admin/controllers/local_listing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/local_listings.php b/admin/controllers/local_listings.php index 17d15425..39b4a98d 100644 --- a/admin/controllers/local_listings.php +++ b/admin/controllers/local_listings.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/manual_updater.php b/admin/controllers/manual_updater.php index aa09236a..ac7d51c4 100644 --- a/admin/controllers/manual_updater.php +++ b/admin/controllers/manual_updater.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/preacher.php b/admin/controllers/preacher.php index a98d622b..8ea50cf6 100644 --- a/admin/controllers/preacher.php +++ b/admin/controllers/preacher.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/preachers.php b/admin/controllers/preachers.php index 711782ec..dd5ee0f2 100644 --- a/admin/controllers/preachers.php +++ b/admin/controllers/preachers.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/series.php b/admin/controllers/series.php index 32105d84..c498c01e 100644 --- a/admin/controllers/series.php +++ b/admin/controllers/series.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/series_list.php b/admin/controllers/series_list.php index e2aa1af3..6addf6a5 100644 --- a/admin/controllers/series_list.php +++ b/admin/controllers/series_list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/sermon.php b/admin/controllers/sermon.php index 88fbb0cc..5fe7572e 100644 --- a/admin/controllers/sermon.php +++ b/admin/controllers/sermon.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/sermondistributor.php b/admin/controllers/sermondistributor.php index 72c658bc..97dda78a 100644 --- a/admin/controllers/sermondistributor.php +++ b/admin/controllers/sermondistributor.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/sermons.php b/admin/controllers/sermons.php index 99bc8da2..0662f573 100644 --- a/admin/controllers/sermons.php +++ b/admin/controllers/sermons.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/statistic.php b/admin/controllers/statistic.php index d493def3..cf8b9599 100644 --- a/admin/controllers/statistic.php +++ b/admin/controllers/statistic.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/controllers/statistics.php b/admin/controllers/statistics.php index d137c66a..b02eb371 100644 --- a/admin/controllers/statistics.php +++ b/admin/controllers/statistics.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index ff5da52f..ffa6b0b8 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index f5befc31..05153d94 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/helpers/sermondistributor.php b/admin/helpers/sermondistributor.php index 59f60aab..29ee8f68 100644 --- a/admin/helpers/sermondistributor.php +++ b/admin/helpers/sermondistributor.php @@ -17,15 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; @@ -2021,9 +2022,9 @@ abstract class SermondistributorHelper /** * Change to nice fancy date */ - public static function fancyDate($date) + public static function fancyDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2033,9 +2034,9 @@ abstract class SermondistributorHelper /** * get date based in period past */ - public static function fancyDynamicDate($date) + public static function fancyDynamicDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2059,9 +2060,9 @@ abstract class SermondistributorHelper /** * Change to nice fancy day time and date */ - public static function fancyDayTimeDate($time) + public static function fancyDayTimeDate($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -2071,9 +2072,9 @@ abstract class SermondistributorHelper /** * Change to nice fancy time and date */ - public static function fancyDateTime($time) + public static function fancyDateTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -2083,9 +2084,9 @@ abstract class SermondistributorHelper /** * Change to nice hour:minutes time */ - public static function fancyTime($time) + public static function fancyTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -2095,9 +2096,9 @@ abstract class SermondistributorHelper /** * set the date day as Sunday through Saturday */ - public static function setDayName($date) + public static function setDayName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2107,9 +2108,9 @@ abstract class SermondistributorHelper /** * set the date month as January through December */ - public static function setMonthName($date) + public static function setMonthName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2119,9 +2120,9 @@ abstract class SermondistributorHelper /** * set the date day as 1st */ - public static function setDay($date) + public static function setDay($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2131,9 +2132,9 @@ abstract class SermondistributorHelper /** * set the date month as 5 */ - public static function setMonth($date) + public static function setMonth($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2143,9 +2144,9 @@ abstract class SermondistributorHelper /** * set the date year as 2004 (for charts) */ - public static function setYear($date) + public static function setYear($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2155,9 +2156,9 @@ abstract class SermondistributorHelper /** * set the date as 2004/05 (for charts) */ - public static function setYearMonth($date, $spacer = '/') + public static function setYearMonth($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2167,15 +2168,27 @@ abstract class SermondistributorHelper /** * set the date as 2004/05/03 (for charts) */ - public static function setYearMonthDay($date, $spacer = '/') + public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } return date('Y' . $spacer . 'm' . $spacer . 'd', $date); } + /** + * set the date as 03/05/2004 + */ + public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true) + { + if ($check_stamp && !self::isValidTimeStamp($date)) + { + $date = strtotime($date); + } + return date('d' . $spacer . 'm' . $spacer . 'Y', $date); + } + /** * Check if string is a valid time stamp */ @@ -2186,6 +2199,16 @@ abstract class SermondistributorHelper && ($timestamp >= ~PHP_INT_MAX); } + /** + * Check if string is a valid date + * https://www.php.net/manual/en/function.checkdate.php#113205 + */ + public static function isValidateDate($date, $format = 'Y-m-d H:i:s') + { + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + /** * Workers to load tasks @@ -3162,6 +3185,8 @@ abstract class SermondistributorHelper ->setLastModifiedBy($modified) ->setTitle($title) ->setSubject($subjectTab); + // The file type + $file_type = 'Xls'; // set description if ($description) { @@ -3201,21 +3226,46 @@ abstract class SermondistributorHelper )); // 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++; } @@ -3235,7 +3285,7 @@ abstract class SermondistributorHelper // 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'); @@ -3246,7 +3296,7 @@ abstract class SermondistributorHelper 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_sermondistributor.ini b/admin/language/en-GB/en-GB.com_sermondistributor.ini index eedb25a1..6ded0fa0 100644 --- a/admin/language/en-GB/en-GB.com_sermondistributor.ini +++ b/admin/language/en-GB/en-GB.com_sermondistributor.ini @@ -398,6 +398,8 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_CHECKED_IN_1="%d External Source COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_CHECKED_IN_MORE="%d External Sources successfully checked in." COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_DELETED="%s External Sources deleted." COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_DELETED_1="%s External Source deleted." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_FAILED_PUBLISHING="%s External Sources failed publishing." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_FAILED_PUBLISHING_1="%s External Source failed publishing." COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_FEATURED="%s External Sources featured." COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_FEATURED_1="%s External Source featured." COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_PUBLISHED="%s External Sources published." @@ -657,6 +659,80 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WMV=".wmv" COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLS=".xls" COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLSX=".xlsx" COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ZIP=".zip" +COM_SERMONDISTRIBUTOR_FILTER_ADMIN_VIEW_ASCENDING="Admin View ascending" +COM_SERMONDISTRIBUTOR_FILTER_ADMIN_VIEW_DESCENDING="Admin View descending" +COM_SERMONDISTRIBUTOR_FILTER_BUILD_ASCENDING="Build ascending" +COM_SERMONDISTRIBUTOR_FILTER_BUILD_DESCENDING="Build descending" +COM_SERMONDISTRIBUTOR_FILTER_COUNTER_ASCENDING="Counter ascending" +COM_SERMONDISTRIBUTOR_FILTER_COUNTER_DESCENDING="Counter descending" +COM_SERMONDISTRIBUTOR_FILTER_DESCRIPTION_ASCENDING="Description ascending" +COM_SERMONDISTRIBUTOR_FILTER_DESCRIPTION_DESCENDING="Description descending" +COM_SERMONDISTRIBUTOR_FILTER_EXTERNALSOURCES_ASCENDING="Externalsources ascending" +COM_SERMONDISTRIBUTOR_FILTER_EXTERNALSOURCES_DESCENDING="Externalsources descending" +COM_SERMONDISTRIBUTOR_FILTER_EXTERNAL_SOURCE_ASCENDING="External Source ascending" +COM_SERMONDISTRIBUTOR_FILTER_EXTERNAL_SOURCE_DESCENDING="External Source descending" +COM_SERMONDISTRIBUTOR_FILTER_FILENAME_ASCENDING="Filename ascending" +COM_SERMONDISTRIBUTOR_FILTER_FILENAME_DESCENDING="Filename descending" +COM_SERMONDISTRIBUTOR_FILTER_KEY_ASCENDING="Key ascending" +COM_SERMONDISTRIBUTOR_FILTER_KEY_DESCENDING="Key descending" +COM_SERMONDISTRIBUTOR_FILTER_LINK_TYPE_ASCENDING="Link Type ascending" +COM_SERMONDISTRIBUTOR_FILTER_LINK_TYPE_DESCENDING="Link Type descending" +COM_SERMONDISTRIBUTOR_FILTER_LOCATION_ASCENDING="Location ascending" +COM_SERMONDISTRIBUTOR_FILTER_LOCATION_DESCENDING="Location descending" +COM_SERMONDISTRIBUTOR_FILTER_NAME_ASCENDING="Name ascending" +COM_SERMONDISTRIBUTOR_FILTER_NAME_DESCENDING="Name descending" +COM_SERMONDISTRIBUTOR_FILTER_PREACHER_ASCENDING="Preacher ascending" +COM_SERMONDISTRIBUTOR_FILTER_PREACHER_DESCENDING="Preacher descending" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED="Status" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_EXTERNAL_SOURCES="Status options for external sources" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_HELP_DOCUMENTS="Status options for help documents" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_LOCAL_LISTINGS="Status options for local listings" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_PREACHERS="Status options for preachers" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_SERIES_LIST="Status options for series list" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_SERMONS="Status options for sermons" +COM_SERMONDISTRIBUTOR_FILTER_PUBLISHED_STATISTICS="Status options for statistics" +COM_SERMONDISTRIBUTOR_FILTER_SEARCH="Searchpreachers" +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_EXTERNAL_SOURCES="Search the external source items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_HELP_DOCUMENTS="Search the help document items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_LOCAL_LISTINGS="Search the local listing items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_PREACHERS="Search the preacher items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_SERIES_LIST="Search the series items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_SERMONS="Search the sermon items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SEARCH_STATISTICS="Search the statistic items. Prefix with ID: to search for an item by ID." +COM_SERMONDISTRIBUTOR_FILTER_SELECT_ADMIN_VIEW="Select Admin View" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_BUILD="Select Build" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_EXTERNALSOURCES="Select Externalsources" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_EXTERNAL_SOURCE="Select External Source" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_LINK_TYPE="Select Link Type" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_LOCATION="Select Location" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_PREACHER="Select Preacher" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_SERIES="Select Series" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_SERMON="Select Sermon" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_SERMONS_CATEGORIES="Select Sermons Categories" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_SITE_VIEW="Select Site View" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_SOURCE="Select Source" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_TYPE="Select Type" +COM_SERMONDISTRIBUTOR_FILTER_SELECT_UPDATE_METHOD="Select Update Method" +COM_SERMONDISTRIBUTOR_FILTER_SERIES_ASCENDING="Series ascending" +COM_SERMONDISTRIBUTOR_FILTER_SERIES_DESCENDING="Series descending" +COM_SERMONDISTRIBUTOR_FILTER_SERMONS_CATEGORIES_ASCENDING="Sermons Categories ascending" +COM_SERMONDISTRIBUTOR_FILTER_SERMONS_CATEGORIES_DESCENDING="Sermons Categories descending" +COM_SERMONDISTRIBUTOR_FILTER_SERMON_ASCENDING="Sermon ascending" +COM_SERMONDISTRIBUTOR_FILTER_SERMON_DESCENDING="Sermon descending" +COM_SERMONDISTRIBUTOR_FILTER_SHORT_DESCRIPTION_ASCENDING="Short Description ascending" +COM_SERMONDISTRIBUTOR_FILTER_SHORT_DESCRIPTION_DESCENDING="Short Description descending" +COM_SERMONDISTRIBUTOR_FILTER_SITE_VIEW_ASCENDING="Site View ascending" +COM_SERMONDISTRIBUTOR_FILTER_SITE_VIEW_DESCENDING="Site View descending" +COM_SERMONDISTRIBUTOR_FILTER_SIZE_ASCENDING="Size ascending" +COM_SERMONDISTRIBUTOR_FILTER_SIZE_DESCENDING="Size descending" +COM_SERMONDISTRIBUTOR_FILTER_SOURCE_ASCENDING="Source ascending" +COM_SERMONDISTRIBUTOR_FILTER_SOURCE_DESCENDING="Source descending" +COM_SERMONDISTRIBUTOR_FILTER_TITLE_ASCENDING="Title ascending" +COM_SERMONDISTRIBUTOR_FILTER_TITLE_DESCENDING="Title descending" +COM_SERMONDISTRIBUTOR_FILTER_TYPE_ASCENDING="Type ascending" +COM_SERMONDISTRIBUTOR_FILTER_TYPE_DESCENDING="Type descending" +COM_SERMONDISTRIBUTOR_FILTER_UPDATE_METHOD_ASCENDING="Update Method ascending" +COM_SERMONDISTRIBUTOR_FILTER_UPDATE_METHOD_DESCENDING="Update Method descending" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT="Help Document" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS="Help Documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS="Help Documents Access" @@ -690,6 +766,8 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_1="%d Help Document succ COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_CHECKED_IN_MORE="%d Help Documents successfully checked in." COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_DELETED="%s Help Documents deleted." COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_DELETED_1="%s Help Document deleted." +COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_FAILED_PUBLISHING="%s Help Documents failed publishing." +COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Help Document failed publishing." COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_FEATURED="%s Help Documents featured." COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_FEATURED_1="%s Help Document featured." COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_N_ITEMS_PUBLISHED="%s Help Documents published." @@ -868,6 +946,8 @@ COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_CHECKED_IN_1="%d Local Listing succ COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_CHECKED_IN_MORE="%d Local Listings successfully checked in." COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_DELETED="%s Local Listings deleted." COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_DELETED_1="%s Local Listing deleted." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_FAILED_PUBLISHING="%s Local Listings failed publishing." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_FAILED_PUBLISHING_1="%s Local Listing failed publishing." COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_FEATURED="%s Local Listings featured." COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_FEATURED_1="%s Local Listing featured." COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_PUBLISHED="%s Local Listings published." @@ -1001,6 +1081,8 @@ COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_CHECKED_IN_1="%d Preacher successfully c COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_CHECKED_IN_MORE="%d Preachers successfully checked in." COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_DELETED="%s Preachers deleted." COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_DELETED_1="%s Preacher deleted." +COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_FAILED_PUBLISHING="%s Preachers failed publishing." +COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_FAILED_PUBLISHING_1="%s Preacher failed publishing." COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_FEATURED="%s Preachers featured." COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_FEATURED_1="%s Preacher featured." COM_SERMONDISTRIBUTOR_PREACHERS_N_ITEMS_PUBLISHED="%s Preachers published." @@ -1069,6 +1151,8 @@ COM_SERMONDISTRIBUTOR_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on COM_SERMONDISTRIBUTOR_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github" COM_SERMONDISTRIBUTOR_SAVE_SUCCESS="Great! Item successfully saved." COM_SERMONDISTRIBUTOR_SAVE_WARNING="The value already existed so please select another." +COM_SERMONDISTRIBUTOR_SELECT_A_PREACHER="Select a preacher" +COM_SERMONDISTRIBUTOR_SELECT_A_SERIES="Select a series" COM_SERMONDISTRIBUTOR_SERIES="Series" COM_SERMONDISTRIBUTOR_SERIES_ACCESS_SITE="Series (Site) Access" COM_SERMONDISTRIBUTOR_SERIES_ACCESS_SITE_DESC="Allows the users in this group to access site series." @@ -1128,6 +1212,8 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_CHECKED_IN_1="%d Series successfully c COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_CHECKED_IN_MORE="%d Series List successfully checked in." COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_DELETED="%s Series List deleted." COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_DELETED_1="%s Series deleted." +COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_FAILED_PUBLISHING="%s Series List failed publishing." +COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_FAILED_PUBLISHING_1="%s Series failed publishing." COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_FEATURED="%s Series List featured." COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_FEATURED_1="%s Series featured." COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_PUBLISHED="%s Series List published." @@ -1202,6 +1288,8 @@ COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_CHECKED_IN_1="%d Sermon successfully check COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_CHECKED_IN_MORE="%d Sermons successfully checked in." COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_DELETED="%s Sermons deleted." COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_DELETED_1="%s Sermon deleted." +COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_FAILED_PUBLISHING="%s Sermons failed publishing." +COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_FAILED_PUBLISHING_1="%s Sermon failed publishing." COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_FEATURED="%s Sermons featured." COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_FEATURED_1="%s Sermon featured." COM_SERMONDISTRIBUTOR_SERMONS_N_ITEMS_PUBLISHED="%s Sermons published." @@ -1426,6 +1514,8 @@ COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_CHECKED_IN_1="%d Statistic successfully COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_CHECKED_IN_MORE="%d Statistics successfully checked in." COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_DELETED="%s Statistics deleted." COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_DELETED_1="%s Statistic deleted." +COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_FAILED_PUBLISHING="%s Statistics failed publishing." +COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_FAILED_PUBLISHING_1="%s Statistic failed publishing." COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_FEATURED="%s Statistics featured." COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_FEATURED_1="%s Statistic featured." COM_SERMONDISTRIBUTOR_STATISTICS_N_ITEMS_PUBLISHED="%s Statistics published." diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 88a24454..6ca63306 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/build_option_fullwidth.php b/admin/layouts/external_source/build_option_fullwidth.php index 9494e5a5..902422ae 100644 --- a/admin/layouts/external_source/build_option_fullwidth.php +++ b/admin/layouts/external_source/build_option_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/details_above.php b/admin/layouts/external_source/details_above.php index ca11965c..aff935fe 100644 --- a/admin/layouts/external_source/details_above.php +++ b/admin/layouts/external_source/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/details_fullwidth.php b/admin/layouts/external_source/details_fullwidth.php index 9469955c..0d5c77de 100644 --- a/admin/layouts/external_source/details_fullwidth.php +++ b/admin/layouts/external_source/details_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/details_left.php b/admin/layouts/external_source/details_left.php index f44ce323..770b92ab 100644 --- a/admin/layouts/external_source/details_left.php +++ b/admin/layouts/external_source/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/details_right.php b/admin/layouts/external_source/details_right.php index 9ef3c323..ee10b1e8 100644 --- a/admin/layouts/external_source/details_right.php +++ b/admin/layouts/external_source/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/details_under.php b/admin/layouts/external_source/details_under.php index 40d64b5f..9dbd433a 100644 --- a/admin/layouts/external_source/details_under.php +++ b/admin/layouts/external_source/details_under.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/publishing.php b/admin/layouts/external_source/publishing.php index 09c57754..7299dace 100644 --- a/admin/layouts/external_source/publishing.php +++ b/admin/layouts/external_source/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/external_source/publlshing.php b/admin/layouts/external_source/publlshing.php index 8c261b37..f2d5604c 100644 --- a/admin/layouts/external_source/publlshing.php +++ b/admin/layouts/external_source/publlshing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index ef610f28..ba2888a1 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index c1134fe3..67a3d0b3 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index 3ce6bcc9..bf339552 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 292ae272..0091f500 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 40d64b5f..9dbd433a 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/metadata.php b/admin/layouts/help_document/metadata.php index 7908678e..5f0654ce 100644 --- a/admin/layouts/help_document/metadata.php +++ b/admin/layouts/help_document/metadata.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 6ef34a55..a2ccdca5 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/local_listing/details_above.php b/admin/layouts/local_listing/details_above.php index 97e912c7..88fdc2bd 100644 --- a/admin/layouts/local_listing/details_above.php +++ b/admin/layouts/local_listing/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/local_listing/details_fullwidth.php b/admin/layouts/local_listing/details_fullwidth.php index beb73afc..ac7de8ef 100644 --- a/admin/layouts/local_listing/details_fullwidth.php +++ b/admin/layouts/local_listing/details_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/local_listing/details_left.php b/admin/layouts/local_listing/details_left.php index f0a6359c..ed7d524a 100644 --- a/admin/layouts/local_listing/details_left.php +++ b/admin/layouts/local_listing/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/local_listing/details_right.php b/admin/layouts/local_listing/details_right.php index 8af2fa41..8dec85d8 100644 --- a/admin/layouts/local_listing/details_right.php +++ b/admin/layouts/local_listing/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/local_listing/publishing.php b/admin/layouts/local_listing/publishing.php index 09c57754..7299dace 100644 --- a/admin/layouts/local_listing/publishing.php +++ b/admin/layouts/local_listing/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/local_listing/publlshing.php b/admin/layouts/local_listing/publlshing.php index 8c261b37..f2d5604c 100644 --- a/admin/layouts/local_listing/publlshing.php +++ b/admin/layouts/local_listing/publlshing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/details_above.php b/admin/layouts/preacher/details_above.php index bdf475e9..6ddc477a 100644 --- a/admin/layouts/preacher/details_above.php +++ b/admin/layouts/preacher/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/details_fullwidth.php b/admin/layouts/preacher/details_fullwidth.php index 15032cf9..d6fc3393 100644 --- a/admin/layouts/preacher/details_fullwidth.php +++ b/admin/layouts/preacher/details_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/details_left.php b/admin/layouts/preacher/details_left.php index b58f7d5d..04ddcdd0 100644 --- a/admin/layouts/preacher/details_left.php +++ b/admin/layouts/preacher/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/details_right.php b/admin/layouts/preacher/details_right.php index 01326eb6..37210be6 100644 --- a/admin/layouts/preacher/details_right.php +++ b/admin/layouts/preacher/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/metadata.php b/admin/layouts/preacher/metadata.php index 7908678e..5f0654ce 100644 --- a/admin/layouts/preacher/metadata.php +++ b/admin/layouts/preacher/metadata.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/publishing.php b/admin/layouts/preacher/publishing.php index 6ef34a55..a2ccdca5 100644 --- a/admin/layouts/preacher/publishing.php +++ b/admin/layouts/preacher/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/preacher/sermons_fullwidth.php b/admin/layouts/preacher/sermons_fullwidth.php index 446459ae..7f9da82d 100644 --- a/admin/layouts/preacher/sermons_fullwidth.php +++ b/admin/layouts/preacher/sermons_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -141,25 +141,25 @@ $can = SermondistributorHelper::getActions('sermon'); source); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/series/details_above.php b/admin/layouts/series/details_above.php index bdf475e9..6ddc477a 100644 --- a/admin/layouts/series/details_above.php +++ b/admin/layouts/series/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/series/details_fullwidth.php b/admin/layouts/series/details_fullwidth.php index 15032cf9..d6fc3393 100644 --- a/admin/layouts/series/details_fullwidth.php +++ b/admin/layouts/series/details_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/series/details_left.php b/admin/layouts/series/details_left.php index b58f7d5d..04ddcdd0 100644 --- a/admin/layouts/series/details_left.php +++ b/admin/layouts/series/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/series/details_right.php b/admin/layouts/series/details_right.php index 7ea3c260..f486747f 100644 --- a/admin/layouts/series/details_right.php +++ b/admin/layouts/series/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/series/metadata.php b/admin/layouts/series/metadata.php index 7908678e..5f0654ce 100644 --- a/admin/layouts/series/metadata.php +++ b/admin/layouts/series/metadata.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/series/publishing.php b/admin/layouts/series/publishing.php index 6ef34a55..a2ccdca5 100644 --- a/admin/layouts/series/publishing.php +++ b/admin/layouts/series/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/series/sermons_fullwidth.php b/admin/layouts/series/sermons_fullwidth.php index ae83a584..2241a9b9 100644 --- a/admin/layouts/series/sermons_fullwidth.php +++ b/admin/layouts/series/sermons_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -136,25 +136,25 @@ $can = SermondistributorHelper::getActions('sermon'); source); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/sermon/details_above.php b/admin/layouts/sermon/details_above.php index 9fce031e..85d87cd5 100644 --- a/admin/layouts/sermon/details_above.php +++ b/admin/layouts/sermon/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/details_fullwidth.php b/admin/layouts/sermon/details_fullwidth.php index 15032cf9..d6fc3393 100644 --- a/admin/layouts/sermon/details_fullwidth.php +++ b/admin/layouts/sermon/details_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/details_left.php b/admin/layouts/sermon/details_left.php index 3d039431..b53890d8 100644 --- a/admin/layouts/sermon/details_left.php +++ b/admin/layouts/sermon/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/details_right.php b/admin/layouts/sermon/details_right.php index e44c4ee6..04efb277 100644 --- a/admin/layouts/sermon/details_right.php +++ b/admin/layouts/sermon/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/details_under.php b/admin/layouts/sermon/details_under.php index 244278e6..7435d15f 100644 --- a/admin/layouts/sermon/details_under.php +++ b/admin/layouts/sermon/details_under.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/files_fullwidth.php b/admin/layouts/sermon/files_fullwidth.php index 685b0e0d..1a366c21 100644 --- a/admin/layouts/sermon/files_fullwidth.php +++ b/admin/layouts/sermon/files_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/metadata.php b/admin/layouts/sermon/metadata.php index 7908678e..5f0654ce 100644 --- a/admin/layouts/sermon/metadata.php +++ b/admin/layouts/sermon/metadata.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/publishing.php b/admin/layouts/sermon/publishing.php index 6ef34a55..a2ccdca5 100644 --- a/admin/layouts/sermon/publishing.php +++ b/admin/layouts/sermon/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/sermon/stastics_fullwidth.php b/admin/layouts/sermon/stastics_fullwidth.php index 78a5631b..e99a3e4c 100644 --- a/admin/layouts/sermon/stastics_fullwidth.php +++ b/admin/layouts/sermon/stastics_fullwidth.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -117,25 +117,25 @@ else escape($item->counter); ?> - published == 1):?> + published == 1): ?> - published == 0):?> + published == 0): ?> - published == 2):?> + published == 2): ?> - published == -2):?> + published == -2): ?> diff --git a/admin/layouts/statistic/details_above.php b/admin/layouts/statistic/details_above.php index 253117bb..34546224 100644 --- a/admin/layouts/statistic/details_above.php +++ b/admin/layouts/statistic/details_above.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/statistic/details_left.php b/admin/layouts/statistic/details_left.php index 1a553e71..bed0c029 100644 --- a/admin/layouts/statistic/details_left.php +++ b/admin/layouts/statistic/details_left.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/statistic/details_right.php b/admin/layouts/statistic/details_right.php index d7aa362e..ff3a1133 100644 --- a/admin/layouts/statistic/details_right.php +++ b/admin/layouts/statistic/details_right.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/statistic/metadata.php b/admin/layouts/statistic/metadata.php index 7908678e..5f0654ce 100644 --- a/admin/layouts/statistic/metadata.php +++ b/admin/layouts/statistic/metadata.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/layouts/statistic/publishing.php b/admin/layouts/statistic/publishing.php index 6ef34a55..a2ccdca5 100644 --- a/admin/layouts/statistic/publishing.php +++ b/admin/layouts/statistic/publishing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/ajax.php b/admin/models/ajax.php index e60617d2..73692d7d 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/external_source.php b/admin/models/external_source.php index 57de94e0..189394fa 100644 --- a/admin/models/external_source.php +++ b/admin/models/external_source.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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; /** @@ -524,7 +524,7 @@ class SermondistributorModelExternal_source extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (SermondistributorHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && SermondistributorHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/external_sources.php b/admin/models/external_sources.php index eadf5b65..9c472644 100644 --- a/admin/models/external_sources.php +++ b/admin/models/external_sources.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -42,20 +42,26 @@ class SermondistributorModelExternal_sources extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.description','description', 'a.externalsources','externalsources', 'a.update_method','update_method', - 'a.build','build' + 'a.build','build', + 'a.description','description' ); } parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -65,36 +71,56 @@ class SermondistributorModelExternal_sources extends JModelList if ($layout = $app->input->get('layout')) { $this->context .= '.' . $layout; - } - $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); + } + + $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); + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); $externalsources = $this->getUserStateFromRequest($this->context . '.filter.externalsources', 'filter_externalsources'); - $this->setState('filter.externalsources', $externalsources); + if ($formSubmited) + { + $externalsources = $app->input->post->get('externalsources'); + $this->setState('filter.externalsources', $externalsources); + } $update_method = $this->getUserStateFromRequest($this->context . '.filter.update_method', 'filter_update_method'); - $this->setState('filter.update_method', $update_method); + if ($formSubmited) + { + $update_method = $app->input->post->get('update_method'); + $this->setState('filter.update_method', $update_method); + } $build = $this->getUserStateFromRequest($this->context . '.filter.build', 'filter_build'); - $this->setState('filter.build', $build); - - $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); + if ($formSubmited) + { + $build = $app->input->post->get('build'); + $this->setState('filter.build', $build); + } + + $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); @@ -300,24 +326,60 @@ class SermondistributorModelExternal_sources extends JModelList } // Filter by Externalsources. - if ($externalsources = $this->getState('filter.externalsources')) + $_externalsources = $this->getState('filter.externalsources'); + if (is_numeric($_externalsources)) { - $query->where('a.externalsources = ' . $db->quote($db->escape($externalsources))); + if (is_float($_externalsources)) + { + $query->where('a.externalsources = ' . (float) $_externalsources); + } + else + { + $query->where('a.externalsources = ' . (int) $_externalsources); + } + } + elseif (SermondistributorHelper::checkString($_externalsources)) + { + $query->where('a.externalsources = ' . $db->quote($db->escape($_externalsources))); } // Filter by Update_method. - if ($update_method = $this->getState('filter.update_method')) + $_update_method = $this->getState('filter.update_method'); + if (is_numeric($_update_method)) { - $query->where('a.update_method = ' . $db->quote($db->escape($update_method))); + if (is_float($_update_method)) + { + $query->where('a.update_method = ' . (float) $_update_method); + } + else + { + $query->where('a.update_method = ' . (int) $_update_method); + } + } + elseif (SermondistributorHelper::checkString($_update_method)) + { + $query->where('a.update_method = ' . $db->quote($db->escape($_update_method))); } // Filter by Build. - if ($build = $this->getState('filter.build')) + $_build = $this->getState('filter.build'); + if (is_numeric($_build)) { - $query->where('a.build = ' . $db->quote($db->escape($build))); + if (is_float($_build)) + { + $query->where('a.build = ' . (float) $_build); + } + else + { + $query->where('a.build = ' . (int) $_build); + } + } + elseif (SermondistributorHelper::checkString($_build)) + { + $query->where('a.build = ' . $db->quote($db->escape($_build))); } // 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)); @@ -337,7 +399,7 @@ class SermondistributorModelExternal_sources extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -355,7 +417,24 @@ class SermondistributorModelExternal_sources extends JModelList // From the sermondistributor_external_source table $query->from($db->quoteName('#__sermondistributor_external_source', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Order the results by ordering $query->order('a.ordering ASC'); @@ -450,10 +529,10 @@ class SermondistributorModelExternal_sources extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.description'); $id .= ':' . $this->getState('filter.externalsources'); $id .= ':' . $this->getState('filter.update_method'); - $id .= ':' . $this->getState('filter.build'); + $id .= ':' . $this->getState('filter.build'); + $id .= ':' . $this->getState('filter.description'); return parent::getStoreId($id); } diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index ddcbd695..3434deba 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index eb80daa0..7ea91b4c 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/fields/externalsource.php b/admin/models/fields/externalsource.php index a02e7bb6..ec6b4938 100644 --- a/admin/models/fields/externalsource.php +++ b/admin/models/fields/externalsource.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/fields/externalsourcefiles.php b/admin/models/fields/externalsourcefiles.php index 14a1d512..77fa91f1 100644 --- a/admin/models/fields/externalsourcefiles.php +++ b/admin/models/fields/externalsourcefiles.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/fields/externalsourcesfilterbuild.php b/admin/models/fields/externalsourcesfilterbuild.php new file mode 100644 index 00000000..19e8b490 --- /dev/null +++ b/admin/models/fields/externalsourcesfilterbuild.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Externalsourcesfilterbuild Form Field class for the Sermondistributor component + */ +class JFormFieldExternalsourcesfilterbuild extends JFormFieldList +{ + /** + * The externalsourcesfilterbuild field type. + * + * @var string + */ + public $type = 'externalsourcesfilterbuild'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('build')); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->order($db->quoteName('build') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get external_sourcesmodel + $model = SermondistributorHelper::getModel('external_sources'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_BUILD') . ' -'); + foreach ($results as $build) + { + // Translate the build selection + $text = $model->selectionTranslation($build,'build'); + // Now add the build and its text to the options array + $_filter[] = JHtml::_('select.option', $build, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/externalsourcesfilterexternalsources.php b/admin/models/fields/externalsourcesfilterexternalsources.php new file mode 100644 index 00000000..4ce2ea50 --- /dev/null +++ b/admin/models/fields/externalsourcesfilterexternalsources.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Externalsourcesfilterexternalsources Form Field class for the Sermondistributor component + */ +class JFormFieldExternalsourcesfilterexternalsources extends JFormFieldList +{ + /** + * The externalsourcesfilterexternalsources field type. + * + * @var string + */ + public $type = 'externalsourcesfilterexternalsources'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('externalsources')); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->order($db->quoteName('externalsources') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get external_sourcesmodel + $model = SermondistributorHelper::getModel('external_sources'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_EXTERNALSOURCES') . ' -'); + foreach ($results as $externalsources) + { + // Translate the externalsources selection + $text = $model->selectionTranslation($externalsources,'externalsources'); + // Now add the externalsources and its text to the options array + $_filter[] = JHtml::_('select.option', $externalsources, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/externalsourcesfilterupdatemethod.php b/admin/models/fields/externalsourcesfilterupdatemethod.php new file mode 100644 index 00000000..4ac66eae --- /dev/null +++ b/admin/models/fields/externalsourcesfilterupdatemethod.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Externalsourcesfilterupdatemethod Form Field class for the Sermondistributor component + */ +class JFormFieldExternalsourcesfilterupdatemethod extends JFormFieldList +{ + /** + * The externalsourcesfilterupdatemethod field type. + * + * @var string + */ + public $type = 'externalsourcesfilterupdatemethod'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('update_method')); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->order($db->quoteName('update_method') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get external_sourcesmodel + $model = SermondistributorHelper::getModel('external_sources'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_UPDATE_METHOD') . ' -'); + foreach ($results as $update_method) + { + // Translate the update_method selection + $text = $model->selectionTranslation($update_method,'update_method'); + // Now add the update_method and its text to the options array + $_filter[] = JHtml::_('select.option', $update_method, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/helpdocumentsfilterlocation.php b/admin/models/fields/helpdocumentsfilterlocation.php new file mode 100644 index 00000000..cd30c10b --- /dev/null +++ b/admin/models/fields/helpdocumentsfilterlocation.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Helpdocumentsfilterlocation Form Field class for the Sermondistributor component + */ +class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList +{ + /** + * The helpdocumentsfilterlocation field type. + * + * @var string + */ + public $type = 'helpdocumentsfilterlocation'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('location')); + $query->from($db->quoteName('#__sermondistributor_help_document')); + $query->order($db->quoteName('location') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get help_documentsmodel + $model = SermondistributorHelper::getModel('help_documents'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_LOCATION') . ' -'); + foreach ($results as $location) + { + // Translate the location selection + $text = $model->selectionTranslation($location,'location'); + // Now add the location and its text to the options array + $_filter[] = JHtml::_('select.option', $location, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/helpdocumentsfiltertype.php b/admin/models/fields/helpdocumentsfiltertype.php new file mode 100644 index 00000000..aa9f8c1e --- /dev/null +++ b/admin/models/fields/helpdocumentsfiltertype.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Helpdocumentsfiltertype Form Field class for the Sermondistributor component + */ +class JFormFieldHelpdocumentsfiltertype extends JFormFieldList +{ + /** + * The helpdocumentsfiltertype field type. + * + * @var string + */ + public $type = 'helpdocumentsfiltertype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__sermondistributor_help_document')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get help_documentsmodel + $model = SermondistributorHelper::getModel('help_documents'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_TYPE') . ' -'); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/localfiles.php b/admin/models/fields/localfiles.php index 673ddf5b..e92e04c7 100644 --- a/admin/models/fields/localfiles.php +++ b/admin/models/fields/localfiles.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/fields/locallistingsfilterbuild.php b/admin/models/fields/locallistingsfilterbuild.php new file mode 100644 index 00000000..f9dcb932 --- /dev/null +++ b/admin/models/fields/locallistingsfilterbuild.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Locallistingsfilterbuild Form Field class for the Sermondistributor component + */ +class JFormFieldLocallistingsfilterbuild extends JFormFieldList +{ + /** + * The locallistingsfilterbuild field type. + * + * @var string + */ + public $type = 'locallistingsfilterbuild'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('build')); + $query->from($db->quoteName('#__sermondistributor_local_listing')); + $query->order($db->quoteName('build') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get local_listingsmodel + $model = SermondistributorHelper::getModel('local_listings'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_BUILD') . ' -'); + foreach ($results as $build) + { + // Translate the build selection + $text = $model->selectionTranslation($build,'build'); + // Now add the build and its text to the options array + $_filter[] = JHtml::_('select.option', $build, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/preachers.php b/admin/models/fields/preachers.php index d72d72f1..eaa3e2d0 100644 --- a/admin/models/fields/preachers.php +++ b/admin/models/fields/preachers.php @@ -1,4 +1,4 @@ - + @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - A sermon distributor that links to Dropbox. + A sermon distributor that links to Dropbox. /----------------------------------------------------------------------------------------------------------------------------------*/ @@ -39,7 +39,111 @@ class JFormFieldPreachers extends JFormFieldList * * @var string */ - public $type = 'preachers'; + public $type = 'preachers'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create preacher + if ($user->authorise('preacher.create', 'com_sermondistributor') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit preacher + if ($user->authorise('preacher.edit', 'com_sermondistributor') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for preacher field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } /** * Method to get a list of options for a list input. @@ -48,9 +152,10 @@ class JFormFieldPreachers extends JFormFieldList */ protected function getOptions() { + // Get the database object. $db = JFactory::getDBO(); $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','preacher_request_id_name'))); + $query->select($db->quoteName(array('a.id','a.name'),array('id','preacher_name'))); $query->from($db->quoteName('#__sermondistributor_preacher', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); @@ -59,14 +164,16 @@ class JFormFieldPreachers extends JFormFieldList $options = array(); if ($items) { - if ($this->multiple === false) { - $options[] = JHtml::_('select.option', '', 'Select a preacher'); + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_SERMONDISTRIBUTOR_SELECT_A_PREACHER')); } foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->preacher_request_id_name); + $options[] = JHtml::_('select.option', $item->id, $item->preacher_name); } } + return $options; } } diff --git a/admin/models/fields/series.php b/admin/models/fields/series.php index 92daee88..59c38db0 100644 --- a/admin/models/fields/series.php +++ b/admin/models/fields/series.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -39,7 +39,111 @@ class JFormFieldSeries extends JFormFieldList * * @var string */ - public $type = 'series'; + public $type = 'series'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create series + if ($user->authorise('series.create', 'com_sermondistributor') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit series + if ($user->authorise('series.edit', 'com_sermondistributor') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_sermondistributor&view=all_series&task=series.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for series field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } /** * Method to get a list of options for a list input. @@ -48,23 +152,28 @@ class JFormFieldSeries extends JFormFieldList */ protected function getOptions() { - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','series_request_id_name'))); - $query->from($db->quoteName('#__sermondistributor_series', 'a')); - $query->where($db->quoteName('a.published') . ' = 1'); - $query->order('a.name ASC'); - $db->setQuery((string)$query); - $items = $db->loadObjectList(); - $options = array(); - if ($items) - { - $options[] = JHtml::_('select.option', '', 'Select a series'); - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->id, $item->series_request_id_name); - } - } + // Get the database object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name'),array('id','series_name'))); + $query->from($db->quoteName('#__sermondistributor_series', 'a')); + $query->where($db->quoteName('a.published') . ' = 1'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_SERMONDISTRIBUTOR_SELECT_A_SERIES')); + } + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->series_name); + } + } + return $options; } } diff --git a/admin/models/fields/sermon.php b/admin/models/fields/sermon.php index 4f1b4336..fe18480d 100644 --- a/admin/models/fields/sermon.php +++ b/admin/models/fields/sermon.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/fields/sermonsfilterlinktype.php b/admin/models/fields/sermonsfilterlinktype.php new file mode 100644 index 00000000..f07e6bea --- /dev/null +++ b/admin/models/fields/sermonsfilterlinktype.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Sermonsfilterlinktype Form Field class for the Sermondistributor component + */ +class JFormFieldSermonsfilterlinktype extends JFormFieldList +{ + /** + * The sermonsfilterlinktype field type. + * + * @var string + */ + public $type = 'sermonsfilterlinktype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('link_type')); + $query->from($db->quoteName('#__sermondistributor_sermon')); + $query->order($db->quoteName('link_type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get sermonsmodel + $model = SermondistributorHelper::getModel('sermons'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_LINK_TYPE') . ' -'); + foreach ($results as $link_type) + { + // Translate the link_type selection + $text = $model->selectionTranslation($link_type,'link_type'); + // Now add the link_type and its text to the options array + $_filter[] = JHtml::_('select.option', $link_type, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/sermonsfiltersource.php b/admin/models/fields/sermonsfiltersource.php new file mode 100644 index 00000000..59308088 --- /dev/null +++ b/admin/models/fields/sermonsfiltersource.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Sermonsfiltersource Form Field class for the Sermondistributor component + */ +class JFormFieldSermonsfiltersource extends JFormFieldList +{ + /** + * The sermonsfiltersource field type. + * + * @var string + */ + public $type = 'sermonsfiltersource'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('source')); + $query->from($db->quoteName('#__sermondistributor_sermon')); + $query->order($db->quoteName('source') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get sermonsmodel + $model = SermondistributorHelper::getModel('sermons'); + $results = array_unique($results); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_SOURCE') . ' -'); + foreach ($results as $source) + { + // Translate the source selection + $text = $model->selectionTranslation($source,'source'); + // Now add the source and its text to the options array + $_filter[] = JHtml::_('select.option', $source, JText::_($text)); + } + return $_filter; + } + return false; + } +} diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index 93b74854..0af250fd 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/forms/external_source.js b/admin/models/forms/external_source.js index 13b7dd0f..b3472e59 100644 --- a/admin/models/forms/external_source.js +++ b/admin/models/forms/external_source.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values diff --git a/admin/models/forms/filter_external_sources.xml b/admin/models/forms/filter_external_sources.xml new file mode 100644 index 00000000..0f4589d3 --- /dev/null +++ b/admin/models/forms/filter_external_sources.xml @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_help_documents.xml b/admin/models/forms/filter_help_documents.xml new file mode 100644 index 00000000..15eb584c --- /dev/null +++ b/admin/models/forms/filter_help_documents.xml @@ -0,0 +1,103 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_local_listings.xml b/admin/models/forms/filter_local_listings.xml new file mode 100644 index 00000000..909914de --- /dev/null +++ b/admin/models/forms/filter_local_listings.xml @@ -0,0 +1,80 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_preachers.xml b/admin/models/forms/filter_preachers.xml new file mode 100644 index 00000000..c1c3542a --- /dev/null +++ b/admin/models/forms/filter_preachers.xml @@ -0,0 +1,69 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_series_list.xml b/admin/models/forms/filter_series_list.xml new file mode 100644 index 00000000..72c8ba6a --- /dev/null +++ b/admin/models/forms/filter_series_list.xml @@ -0,0 +1,67 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_sermons.xml b/admin/models/forms/filter_sermons.xml index 036f2455..c3b6be16 100644 --- a/admin/models/forms/filter_sermons.xml +++ b/admin/models/forms/filter_sermons.xml @@ -1,150 +1,120 @@ - -
+ + - - - - - - - - - - - - - + type="sermonsfilterlinktype" + name="link_type" + label="COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL" + multiple="false" + onchange="this.form.submit();" + /> - - - - - - + type="sermonsfiltersource" + name="source" + label="COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL" + multiple="false" + onchange="this.form.submit();" + /> - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - -
+ + \ No newline at end of file diff --git a/admin/models/forms/filter_statistics.xml b/admin/models/forms/filter_statistics.xml new file mode 100644 index 00000000..487471c7 --- /dev/null +++ b/admin/models/forms/filter_statistics.xml @@ -0,0 +1,96 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index a70e762b..fbff13ca 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values diff --git a/admin/models/forms/local_listing.js b/admin/models/forms/local_listing.js index 88b8bc27..d09fe971 100644 --- a/admin/models/forms/local_listing.js +++ b/admin/models/forms/local_listing.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/admin/models/forms/preacher.js b/admin/models/forms/preacher.js index cffc2d49..f71fa6cf 100644 --- a/admin/models/forms/preacher.js +++ b/admin/models/forms/preacher.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/admin/models/forms/series.js b/admin/models/forms/series.js index ec764928..ebdf15ee 100644 --- a/admin/models/forms/series.js +++ b/admin/models/forms/series.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/admin/models/forms/sermon.js b/admin/models/forms/sermon.js index cb30bc81..7b4d0904 100644 --- a/admin/models/forms/sermon.js +++ b/admin/models/forms/sermon.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values diff --git a/admin/models/forms/statistic.js b/admin/models/forms/statistic.js index 48bd541c..db9e2d9b 100644 --- a/admin/models/forms/statistic.js +++ b/admin/models/forms/statistic.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/admin/models/help_document.php b/admin/models/help_document.php index 91cdb989..42f9cd2e 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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; /** @@ -428,7 +428,7 @@ class SermondistributorModelHelp_document extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (SermondistributorHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && SermondistributorHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index ac69d0bd..84dab5b3 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -42,21 +42,27 @@ class SermondistributorModelHelp_documents extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.title','title', 'a.type','type', 'a.location','location', - 'g.', - 'h.' + 'a.admin_view','admin_view', + 'a.site_view','site_view', + 'a.title','title' ); } parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -66,39 +72,63 @@ class SermondistributorModelHelp_documents extends JModelList if ($layout = $app->input->get('layout')) { $this->context .= '.' . $layout; - } - $title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title'); - $this->setState('filter.title', $title); + } + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } $location = $this->getUserStateFromRequest($this->context . '.filter.location', 'filter_location'); - $this->setState('filter.location', $location); + if ($formSubmited) + { + $location = $app->input->post->get('location'); + $this->setState('filter.location', $location); + } $admin_view = $this->getUserStateFromRequest($this->context . '.filter.admin_view', 'filter_admin_view'); - $this->setState('filter.admin_view', $admin_view); + if ($formSubmited) + { + $admin_view = $app->input->post->get('admin_view'); + $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); + if ($formSubmited) + { + $site_view = $app->input->post->get('site_view'); + $this->setState('filter.site_view', $site_view); + } + + $title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title'); + if ($formSubmited) + { + $title = $app->input->post->get('title'); + $this->setState('filter.title', $title); + } // List state information. parent::populateState($ordering, $direction); @@ -264,29 +294,77 @@ class SermondistributorModelHelp_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 (SermondistributorHelper::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 (SermondistributorHelper::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 (SermondistributorHelper::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 (SermondistributorHelper::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)); @@ -306,7 +384,7 @@ class SermondistributorModelHelp_documents extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -324,7 +402,24 @@ class SermondistributorModelHelp_documents extends JModelList // From the sermondistributor_help_document table $query->from($db->quoteName('#__sermondistributor_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_sermondistributor')) { @@ -415,11 +510,11 @@ class SermondistributorModelHelp_documents extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.title'); $id .= ':' . $this->getState('filter.type'); $id .= ':' . $this->getState('filter.location'); $id .= ':' . $this->getState('filter.admin_view'); - $id .= ':' . $this->getState('filter.site_view'); + $id .= ':' . $this->getState('filter.site_view'); + $id .= ':' . $this->getState('filter.title'); return parent::getStoreId($id); } diff --git a/admin/models/import.php b/admin/models/import.php index aae03701..56f8678c 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -439,7 +439,15 @@ class SermondistributorModelImport 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/local_listing.php b/admin/models/local_listing.php index b881e01c..b158caa5 100644 --- a/admin/models/local_listing.php +++ b/admin/models/local_listing.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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/local_listings.php b/admin/models/local_listings.php index 9edb875c..b9fe578e 100644 --- a/admin/models/local_listings.php +++ b/admin/models/local_listings.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -42,21 +42,27 @@ class SermondistributorModelLocal_listings extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.name','name', 'a.build','build', + 'g.description','external_source', + 'a.name','name', 'a.size','size', - 'g.description', 'a.key','key' ); } 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,39 +72,63 @@ class SermondistributorModelLocal_listings 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); + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); $build = $this->getUserStateFromRequest($this->context . '.filter.build', 'filter_build'); - $this->setState('filter.build', $build); - - $size = $this->getUserStateFromRequest($this->context . '.filter.size', 'filter_size'); - $this->setState('filter.size', $size); + if ($formSubmited) + { + $build = $app->input->post->get('build'); + $this->setState('filter.build', $build); + } $external_source = $this->getUserStateFromRequest($this->context . '.filter.external_source', 'filter_external_source'); - $this->setState('filter.external_source', $external_source); + if ($formSubmited) + { + $external_source = $app->input->post->get('external_source'); + $this->setState('filter.external_source', $external_source); + } + + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } + + $size = $this->getUserStateFromRequest($this->context . '.filter.size', 'filter_size'); + if ($formSubmited) + { + $size = $app->input->post->get('size'); + $this->setState('filter.size', $size); + } $key = $this->getUserStateFromRequest($this->context . '.filter.key', 'filter_key'); - $this->setState('filter.key', $key); - - $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); + if ($formSubmited) + { + $key = $app->input->post->get('key'); + $this->setState('filter.key', $key); + } // List state information. parent::populateState($ordering, $direction); @@ -226,19 +256,43 @@ class SermondistributorModelLocal_listings extends JModelList } // Filter by Build. - if ($build = $this->getState('filter.build')) + $_build = $this->getState('filter.build'); + if (is_numeric($_build)) { - $query->where('a.build = ' . $db->quote($db->escape($build))); + if (is_float($_build)) + { + $query->where('a.build = ' . (float) $_build); + } + else + { + $query->where('a.build = ' . (int) $_build); + } } - // Filter by external_source. - if ($external_source = $this->getState('filter.external_source')) + elseif (SermondistributorHelper::checkString($_build)) { - $query->where('a.external_source = ' . $db->quote($db->escape($external_source))); + $query->where('a.build = ' . $db->quote($db->escape($_build))); + } + // Filter by External_source. + $_external_source = $this->getState('filter.external_source'); + if (is_numeric($_external_source)) + { + if (is_float($_external_source)) + { + $query->where('a.external_source = ' . (float) $_external_source); + } + else + { + $query->where('a.external_source = ' . (int) $_external_source); + } + } + elseif (SermondistributorHelper::checkString($_external_source)) + { + $query->where('a.external_source = ' . $db->quote($db->escape($_external_source))); } // 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)); @@ -258,7 +312,7 @@ class SermondistributorModelLocal_listings extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -276,7 +330,24 @@ class SermondistributorModelLocal_listings extends JModelList // From the sermondistributor_local_listing table $query->from($db->quoteName('#__sermondistributor_local_listing', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Order the results by ordering $query->order('a.ordering ASC'); @@ -371,10 +442,10 @@ class SermondistributorModelLocal_listings extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.name'); $id .= ':' . $this->getState('filter.build'); - $id .= ':' . $this->getState('filter.size'); $id .= ':' . $this->getState('filter.external_source'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.size'); $id .= ':' . $this->getState('filter.key'); return parent::getStoreId($id); diff --git a/admin/models/manual_updater.php b/admin/models/manual_updater.php index 621dcaa1..d5fcdcb4 100644 --- a/admin/models/manual_updater.php +++ b/admin/models/manual_updater.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/models/preacher.php b/admin/models/preacher.php index 61d82804..940f1170 100644 --- a/admin/models/preacher.php +++ b/admin/models/preacher.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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/preachers.php b/admin/models/preachers.php index f48dfda3..89082dde 100644 --- a/admin/models/preachers.php +++ b/admin/models/preachers.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -49,11 +49,17 @@ class SermondistributorModelPreachers 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,30 +69,42 @@ class SermondistributorModelPreachers 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); + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - $this->setState('filter.description', $description); - - $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); + if ($formSubmited) + { + $description = $app->input->post->get('description'); + $this->setState('filter.description', $description); + } // List state information. parent::populateState($ordering, $direction); @@ -192,7 +210,7 @@ class SermondistributorModelPreachers 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)); @@ -212,7 +230,7 @@ class SermondistributorModelPreachers extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -230,7 +248,24 @@ class SermondistributorModelPreachers extends JModelList // From the sermondistributor_preacher table $query->from($db->quoteName('#__sermondistributor_preacher', '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_sermondistributor')) { diff --git a/admin/models/series.php b/admin/models/series.php index 4bc9fb4e..4c4f3c78 100644 --- a/admin/models/series.php +++ b/admin/models/series.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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/series_list.php b/admin/models/series_list.php index c276b347..0a8fe5b0 100644 --- a/admin/models/series_list.php +++ b/admin/models/series_list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -48,11 +48,17 @@ class SermondistributorModelSeries_list extends JModelList parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -62,27 +68,35 @@ class SermondistributorModelSeries_list 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); + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + $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); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); @@ -188,7 +202,7 @@ class SermondistributorModelSeries_list 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)); @@ -208,7 +222,7 @@ class SermondistributorModelSeries_list extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -226,7 +240,24 @@ class SermondistributorModelSeries_list extends JModelList // From the sermondistributor_series table $query->from($db->quoteName('#__sermondistributor_series', '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_sermondistributor')) { diff --git a/admin/models/sermon.php b/admin/models/sermon.php index 1cfeefee..e1773306 100644 --- a/admin/models/sermon.php +++ b/admin/models/sermon.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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; /** @@ -548,7 +548,7 @@ class SermondistributorModelSermon extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (SermondistributorHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && SermondistributorHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/sermondistributor.php b/admin/models/sermondistributor.php index 35a11e43..c0f38239 100644 --- a/admin/models/sermondistributor.php +++ b/admin/models/sermondistributor.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,7 +38,7 @@ class SermondistributorModelSermondistributor extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.external_source.add', 'png.external_sources', 'png.manual_updater', 'png.local_listings', 'png.help_documents') + 'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid_qpo0O0oqp_com_sermondistributor_po0O0oq_sermon', 'png.series.add', 'png.series_list', 'png.statistics', 'png.external_source.add', 'png.external_sources', 'png.manual_updater', 'png.local_listings', 'png.help_documents') ); // view access array $viewAccess = array( @@ -103,8 +103,8 @@ class SermondistributorModelSermondistributor extends JModelList $viewName = $name; $alt = $name; $url = $url; - $image = $name.'.'.$type; - $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_'.SermondistributorHelper::safeString($name,'U'); + $image = $name . '.' . $type; + $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_' . SermondistributorHelper::safeString($name,'U'); } } // internal views @@ -126,17 +126,27 @@ class SermondistributorModelSermondistributor extends JModelList switch($action) { case 'add': - $url = 'index.php?option=com_sermondistributor&view='.$name.'&layout=edit'; - $image = $name.'_'.$action.'.'.$type; - $alt = $name.' '.$action; + $url = 'index.php?option=com_sermondistributor&view=' . $name . '&layout=edit'; + $image = $name . '_' . $action. '.' . $type; + $alt = $name . ' ' . $action; $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_'.SermondistributorHelper::safeString($name,'U').'_ADD'; $add = true; break; default: - $url = 'index.php?option=com_categories&view=categories&extension=com_sermondistributor.'.$name; - $image = $name.'_'.$action.'.'.$type; - $alt = $name.' '.$action; - $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_'.SermondistributorHelper::safeString($name,'U').'_'.SermondistributorHelper::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_sermondistributor.' . $name; + } + $url = 'index.php?option=com_categories&view=categories&extension=' . $extension; + $image = $name . '_' . $action . '.' . $type; + $alt = $viewName . ' ' . $action; + $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_' . SermondistributorHelper::safeString($name,'U') . '_' . SermondistributorHelper::safeString($action,'U'); break; } } @@ -144,9 +154,9 @@ class SermondistributorModelSermondistributor extends JModelList { $viewName = $name; $alt = $name; - $url = 'index.php?option=com_sermondistributor&view='.$name; - $image = $name.'.'.$type; - $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_'.SermondistributorHelper::safeString($name,'U'); + $url = 'index.php?option=com_sermondistributor&view=' . $name; + $image = $name . '.' . $type; + $name = 'COM_SERMONDISTRIBUTOR_DASHBOARD_' . SermondistributorHelper::safeString($name,'U'); $hover = false; } } @@ -154,8 +164,8 @@ class SermondistributorModelSermondistributor extends JModelList { $viewName = $view; $alt = $view; - $url = 'index.php?option=com_sermondistributor&view='.$view; - $image = $view.'.png'; + $url = 'index.php?option=com_sermondistributor&view=' . $view; + $image = $view . '.png'; $name = ucwords($view).'

'; $hover = false; } @@ -167,7 +177,7 @@ class SermondistributorModelSermondistributor extends JModelList $dashboard_list = false; $accessTo = ''; $accessAdd = ''; - // acces checking start + // access checking start $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? SermondistributorHelper::checkString($viewAccess[$viewName.'.create']):false; $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? SermondistributorHelper::checkString($viewAccess[$viewName.'.access']):false; // set main controllers @@ -182,7 +192,7 @@ class SermondistributorModelSermondistributor 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']; @@ -269,9 +279,9 @@ class SermondistributorModelSermondistributor extends JModelList $document = JFactory::getDocument(); $document->addScript(JURI::root() . "media/com_sermondistributor/js/timeago.js"); $document->addScriptDeclaration(' - var urlToGetAllOpenIssues = "https://api.github.com/repos/SermonDistributor/Joomla-3-Component/issues?state=open&page=1&per_page=5"; - var urlToGetAllClosedIssues = "https://api.github.com/repos/SermonDistributor/Joomla-3-Component/issues?state=closed&page=1&per_page=5"; - var urlToGetAllReleases = "https://api.github.com/repos/SermonDistributor/Joomla-3-Component/releases?page=1&per_page=5"; + var urlToGetAllOpenIssues = "https://api.github.com/repos/Llewellynvdm/Joomla-Sermon-Distributor/issues?state=open&page=1&per_page=5"; + var urlToGetAllClosedIssues = "https://api.github.com/repos/Llewellynvdm/Joomla-Sermon-Distributor/issues?state=closed&page=1&per_page=5"; + var urlToGetAllReleases = "https://api.github.com/repos/Llewellynvdm/Joomla-Sermon-Distributor/releases?page=1&per_page=5"; jQuery(document).ready(function () { jQuery.getJSON(urlToGetAllOpenIssues, function (openissues) { jQuery("#openissues").html(""); @@ -325,7 +335,7 @@ class SermondistributorModelSermondistributor extends JModelList // set active release var activeNotice = ""; if (i === 0) { - var activeNotice = " '.JText::_('COM_SERMONDISTRIBUTOR_LATEST_RELEASE').'

"; + var activeNotice = " '.JText::_('COM_SERMONDISTRIBUTOR_LATEST_RELEASE').'

"; } // set time ago var timeago = jQuery.timeago(new Date(tagrelease.published_at)); @@ -341,11 +351,11 @@ class SermondistributorModelSermondistributor extends JModelList }); });'); $create = '
'; - $moreopen = ''.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB').'... '; - $moreclosed = ''.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB').'... '; - $viewissues = ''.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_RELEASES_ON_GITHUB').'... '; + $moreopen = ''.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB').'... '; + $moreclosed = ''.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB').'... '; + $viewissues = ''.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_RELEASES_ON_GITHUB').'... '; return (object) array( 'openissues' => $create.'
'.JText::_('COM_SERMONDISTRIBUTOR_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING').'..
'.$moreopen, @@ -358,7 +368,7 @@ class SermondistributorModelSermondistributor extends JModelList { $document = JFactory::getDocument(); $document->addScriptDeclaration(' - var gewiki = "https://raw.githubusercontent.com/wiki/SermonDistributor/Joomla-3-Component/Home.md"; + var gewiki = "https://raw.githubusercontent.com/wiki/Llewellynvdm/Joomla-Sermon-Distributor/Home.md"; jQuery(document).ready(function () { jQuery.get(gewiki) .success(function(wiki) { diff --git a/admin/models/sermons.php b/admin/models/sermons.php index c96c8d08..c6f37972 100644 --- a/admin/models/sermons.php +++ b/admin/models/sermons.php @@ -1,103 +1,85 @@ - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - A sermon distributor that links to Dropbox. - -/----------------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\Utilities\ArrayHelper; - -/** - * Sermons Model - */ -class SermondistributorModelSermons extends JModelList -{ - public function __construct($config = array()) - { - if (empty($config['filter_fields'])) - { - $config['filter_fields'] = array( +/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + ____ ____ __ __ __ +/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ +\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ + \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ + /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ + \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ + \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ + +/------------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.0.x + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage sermons.php + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Utilities\ArrayHelper; + +/** + * Sermons Model + */ +class SermondistributorModelSermons extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( 'a.id','id', 'a.published','published', 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.access','access', - 'a.name','name', 'g.name','preacher', 'h.name','series', - 'a.short_description','short_description', 'c.title','category_title', 'c.id', 'category_id', - 'a.catid', 'catid', + 'a.catid','catid', 'a.link_type','link_type', - 'a.source','source' - ); + 'a.source','source', + 'a.name','name', + 'a.short_description','short_description' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * + * @return void + * + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; } - parent::__construct($config); - } - - /** - * Method to auto-populate the model state. - * - * @return void - */ - protected function populateState($ordering = null, $direction = null) - { - $app = JFactory::getApplication(); - - // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) - { - $this->context .= '.' . $layout; - } - $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); - - $series = $this->getUserStateFromRequest($this->context . '.filter.series', 'filter_series'); - $this->setState('filter.series', $series); - - $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); - $this->setState('filter.short_description', $short_description); - - $category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category'); - $this->setState('filter.category', $category); - - $catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); - $this->setState('filter.catid', $catid); - - $link_type = $this->getUserStateFromRequest($this->context . '.filter.link_type', 'filter_link_type'); - $this->setState('filter.link_type', $link_type); - - $source = $this->getUserStateFromRequest($this->context . '.filter.source', 'filter_source'); - $this->setState('filter.source', $source); - - $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); + $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); @@ -108,38 +90,85 @@ class SermondistributorModelSermons extends JModelList $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); $this->setState('filter.created', $created); - // Handle multiple fields -> original code commented above + $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); + + // Check if the form was submitted $formSubmited = $app->input->post->get('form_submited'); - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access'); - $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); + $preacher = $this->getUserStateFromRequest($this->context . '.filter.preacher', 'filter_preacher'); if ($formSubmited) { - $access = $app->input->post->get('access'); - $this->setState('filter.access', $access); - - $categoryId = $app->input->post->get('category_id'); - $this->setState('filter.category_id', $categoryId); - $preacher = $app->input->post->get('preacher'); $this->setState('filter.preacher', $preacher); } - // List state information. - parent::populateState($ordering, $direction); - } + $series = $this->getUserStateFromRequest($this->context . '.filter.series', 'filter_series'); + if ($formSubmited) + { + $series = $app->input->post->get('series'); + $this->setState('filter.series', $series); + } - /** - * Method to get an array of data items. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getItems() + $category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category'); + $this->setState('filter.category', $category); + + $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); + $this->setState('filter.category_id', $categoryId); + + $catid = $this->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); + if ($formSubmited) + { + $catid = $app->input->post->get('catid'); + $this->setState('filter.catid', $catid); + } + + $link_type = $this->getUserStateFromRequest($this->context . '.filter.link_type', 'filter_link_type'); + if ($formSubmited) + { + $link_type = $app->input->post->get('link_type'); + $this->setState('filter.link_type', $link_type); + } + + $source = $this->getUserStateFromRequest($this->context . '.filter.source', 'filter_source'); + if ($formSubmited) + { + $source = $app->input->post->get('source'); + $this->setState('filter.source', $source); + } + + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } + + $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); + if ($formSubmited) + { + $short_description = $app->input->post->get('short_description'); + $this->setState('filter.short_description', $short_description); + } + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() { // check in items $this->checkInNow(); - - // load parent items + + // load parent items $items = parent::getItems(); // Set values to display correctly. @@ -174,10 +203,10 @@ class SermondistributorModelSermons extends JModelList $item->source = $this->selectionTranslation($item->source, 'source'); } } - - - // return items - return $items; + + + // return items + return $items; } /** @@ -216,15 +245,15 @@ class SermondistributorModelSermons extends JModelList } } return $value; - } - - /** - * Method to build an SQL query to load the list data. - * - * @return string An SQL query - */ - protected function getListQuery() - { + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { // Get the user object. $user = JFactory::getUser(); // Create a new query object. @@ -262,19 +291,10 @@ class SermondistributorModelSermons extends JModelList $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Filter by access level. - $access = $this->getState('filter.access'); - - if (is_numeric($access)) + if ($access = $this->getState('filter.access')) { $query->where('a.access = ' . (int) $access); } - elseif (is_array($access)) - { - $access = ArrayHelper::toInteger($access); - $access = implode(',', $access); - $query->where('a.access IN (' . $access . ')'); - } - // Implement View Level Access if (!$user->authorise('core.options', 'com_sermondistributor')) { @@ -296,41 +316,119 @@ class SermondistributorModelSermons extends JModelList } } - // Filter by preacher. - $preacher = $this->getState('filter.preacher'); - - if (is_numeric($preacher)) + // Filter by Preacher. + $_preacher = $this->getState('filter.preacher'); + if (is_numeric($_preacher)) { - $query->where('a.preacher = ' . (int) $preacher); + if (is_float($_preacher)) + { + $query->where('a.preacher = ' . (float) $_preacher); + } + else + { + $query->where('a.preacher = ' . (int) $_preacher); + } } - elseif (is_array($preacher)) + elseif (SermondistributorHelper::checkString($_preacher)) { - $preacher = ArrayHelper::toInteger($preacher); - $preacher = implode(',', $preacher); - $query->where('a.preacher IN (' . $preacher . ')'); + $query->where('a.preacher = ' . $db->quote($db->escape($_preacher))); } - // Filter by series. - if ($series = $this->getState('filter.series')) + elseif (SermondistributorHelper::checkArray($_preacher)) { - $query->where('a.series = ' . $db->quote($db->escape($series))); + // Secure the array for the query + $_preacher = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (SermondistributorHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_preacher); + // Filter by the Preacher Array. + $query->where('a.preacher IN (' . implode(',', $_preacher) . ')'); + } + // Filter by Series. + $_series = $this->getState('filter.series'); + if (is_numeric($_series)) + { + if (is_float($_series)) + { + $query->where('a.series = ' . (float) $_series); + } + else + { + $query->where('a.series = ' . (int) $_series); + } + } + elseif (SermondistributorHelper::checkString($_series)) + { + $query->where('a.series = ' . $db->quote($db->escape($_series))); + } + elseif (SermondistributorHelper::checkArray($_series)) + { + // Secure the array for the query + $_series = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (SermondistributorHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_series); + // Filter by the Series Array. + $query->where('a.series IN (' . implode(',', $_series) . ')'); } // Filter by Link_type. - if ($link_type = $this->getState('filter.link_type')) + $_link_type = $this->getState('filter.link_type'); + if (is_numeric($_link_type)) { - $query->where('a.link_type = ' . $db->quote($db->escape($link_type))); + if (is_float($_link_type)) + { + $query->where('a.link_type = ' . (float) $_link_type); + } + else + { + $query->where('a.link_type = ' . (int) $_link_type); + } + } + elseif (SermondistributorHelper::checkString($_link_type)) + { + $query->where('a.link_type = ' . $db->quote($db->escape($_link_type))); } // Filter by Source. - $source = $this->getState('filter.source'); - - if (is_numeric($source)) + $_source = $this->getState('filter.source'); + if (is_numeric($_source)) { - $query->where('a.source = ' . (int) $source); + if (is_float($_source)) + { + $query->where('a.source = ' . (float) $_source); + } + else + { + $query->where('a.source = ' . (int) $_source); + } } - elseif (is_array($source)) + elseif (SermondistributorHelper::checkString($_source)) { - $source = ArrayHelper::toInteger($source); - $source = implode(',', $source); - $query->where('a.source IN (' . $source . ')'); + $query->where('a.source = ' . $db->quote($db->escape($_source))); } // Filter by a single or group of categories. @@ -357,13 +455,13 @@ class SermondistributorModelSermons 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)); } - return $query; + return $query; } /** @@ -377,7 +475,7 @@ class SermondistributorModelSermons extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -395,7 +493,24 @@ class SermondistributorModelSermons extends JModelList // From the sermondistributor_sermon table $query->from($db->quoteName('#__sermondistributor_sermon', '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_sermondistributor')) { @@ -469,16 +584,16 @@ class SermondistributorModelSermons extends JModelList return $headers; } return false; - } - - /** - * Method to get a store id based on model configuration state. - * - * @return string A store id. - * - */ - protected function getStoreId($id = '') - { + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { // Compile the store id. $id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.search'); @@ -486,17 +601,17 @@ class SermondistributorModelSermons extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.name'); $id .= ':' . $this->getState('filter.preacher'); $id .= ':' . $this->getState('filter.series'); - $id .= ':' . $this->getState('filter.short_description'); $id .= ':' . $this->getState('filter.category'); $id .= ':' . $this->getState('filter.category_id'); $id .= ':' . $this->getState('filter.catid'); $id .= ':' . $this->getState('filter.link_type'); $id .= ':' . $this->getState('filter.source'); - - return parent::getStoreId($id); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.short_description'); + + return parent::getStoreId($id); } /** @@ -536,12 +651,12 @@ class SermondistributorModelSermons extends JModelList // Conditions for which records should be updated. $conditions = array( - $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out') . '!=0', $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); // Check table - $query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions); + $query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions); $db->setQuery($query); @@ -550,5 +665,5 @@ class SermondistributorModelSermons extends JModelList } return false; - } -} + } +} diff --git a/admin/models/statistic.php b/admin/models/statistic.php index 6a17c49b..52714a35 100644 --- a/admin/models/statistic.php +++ b/admin/models/statistic.php @@ -17,16 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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/statistics.php b/admin/models/statistics.php index 4e023b2c..76229c3e 100644 --- a/admin/models/statistics.php +++ b/admin/models/statistics.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -42,21 +42,27 @@ class SermondistributorModelStatistics extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', + 'g.name','sermon', + 'h.name','preacher', + 'i.name','series', 'a.filename','filename', - 'g.name', - 'h.name', - 'i.name', 'a.counter','counter' ); } 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,39 +72,63 @@ class SermondistributorModelStatistics extends JModelList if ($layout = $app->input->get('layout')) { $this->context .= '.' . $layout; - } - $filename = $this->getUserStateFromRequest($this->context . '.filter.filename', 'filter_filename'); - $this->setState('filter.filename', $filename); + } + + $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); + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); $sermon = $this->getUserStateFromRequest($this->context . '.filter.sermon', 'filter_sermon'); - $this->setState('filter.sermon', $sermon); + if ($formSubmited) + { + $sermon = $app->input->post->get('sermon'); + $this->setState('filter.sermon', $sermon); + } $preacher = $this->getUserStateFromRequest($this->context . '.filter.preacher', 'filter_preacher'); - $this->setState('filter.preacher', $preacher); + if ($formSubmited) + { + $preacher = $app->input->post->get('preacher'); + $this->setState('filter.preacher', $preacher); + } $series = $this->getUserStateFromRequest($this->context . '.filter.series', 'filter_series'); - $this->setState('filter.series', $series); + if ($formSubmited) + { + $series = $app->input->post->get('series'); + $this->setState('filter.series', $series); + } + + $filename = $this->getUserStateFromRequest($this->context . '.filter.filename', 'filter_filename'); + if ($formSubmited) + { + $filename = $app->input->post->get('filename'); + $this->setState('filter.filename', $filename); + } $counter = $this->getUserStateFromRequest($this->context . '.filter.counter', 'filter_counter'); - $this->setState('filter.counter', $counter); - - $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); + if ($formSubmited) + { + $counter = $app->input->post->get('counter'); + $this->setState('filter.counter', $counter); + } // List state information. parent::populateState($ordering, $direction); @@ -213,25 +243,61 @@ class SermondistributorModelStatistics extends JModelList } } - // Filter by sermon. - if ($sermon = $this->getState('filter.sermon')) + // Filter by Sermon. + $_sermon = $this->getState('filter.sermon'); + if (is_numeric($_sermon)) { - $query->where('a.sermon = ' . $db->quote($db->escape($sermon))); + if (is_float($_sermon)) + { + $query->where('a.sermon = ' . (float) $_sermon); + } + else + { + $query->where('a.sermon = ' . (int) $_sermon); + } } - // Filter by preacher. - if ($preacher = $this->getState('filter.preacher')) + elseif (SermondistributorHelper::checkString($_sermon)) { - $query->where('a.preacher = ' . $db->quote($db->escape($preacher))); + $query->where('a.sermon = ' . $db->quote($db->escape($_sermon))); } - // Filter by series. - if ($series = $this->getState('filter.series')) + // Filter by Preacher. + $_preacher = $this->getState('filter.preacher'); + if (is_numeric($_preacher)) { - $query->where('a.series = ' . $db->quote($db->escape($series))); + if (is_float($_preacher)) + { + $query->where('a.preacher = ' . (float) $_preacher); + } + else + { + $query->where('a.preacher = ' . (int) $_preacher); + } + } + elseif (SermondistributorHelper::checkString($_preacher)) + { + $query->where('a.preacher = ' . $db->quote($db->escape($_preacher))); + } + // Filter by Series. + $_series = $this->getState('filter.series'); + if (is_numeric($_series)) + { + if (is_float($_series)) + { + $query->where('a.series = ' . (float) $_series); + } + else + { + $query->where('a.series = ' . (int) $_series); + } + } + elseif (SermondistributorHelper::checkString($_series)) + { + $query->where('a.series = ' . $db->quote($db->escape($_series))); } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'asc'); + $orderDirn = $this->state->get('list.direction', 'desc'); if ($orderCol != '') { $query->order($db->escape($orderCol . ' ' . $orderDirn)); @@ -251,7 +317,7 @@ class SermondistributorModelStatistics extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (SermondistributorHelper::checkArray($pks)) + if (($pks_size = SermondistributorHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -269,7 +335,24 @@ class SermondistributorModelStatistics extends JModelList // From the sermondistributor_statistic table $query->from($db->quoteName('#__sermondistributor_statistic', '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_sermondistributor')) { @@ -360,10 +443,10 @@ class SermondistributorModelStatistics extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.filename'); $id .= ':' . $this->getState('filter.sermon'); $id .= ':' . $this->getState('filter.preacher'); $id .= ':' . $this->getState('filter.series'); + $id .= ':' . $this->getState('filter.filename'); $id .= ':' . $this->getState('filter.counter'); return parent::getStoreId($id); diff --git a/admin/sermondistributor.php b/admin/sermondistributor.php index 85ef2396..5c24b748 100644 --- a/admin/sermondistributor.php +++ b/admin/sermondistributor.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/sql/updates/mysql/2.0.3.sql b/admin/sql/updates/mysql/2.0.3.sql new file mode 100644 index 00000000..bdc24dc4 --- /dev/null +++ b/admin/sql/updates/mysql/2.0.3.sql @@ -0,0 +1,3 @@ +ALTER TABLE `#__sermondistributor_sermon` ENGINE = InnoDB; + +ALTER TABLE `#__sermondistributor_sermon` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/admin/tables/external_source.php b/admin/tables/external_source.php index d7e33ba2..6af7d657 100644 --- a/admin/tables/external_source.php +++ b/admin/tables/external_source.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index e98b6b20..7ba05ba0 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/tables/local_listing.php b/admin/tables/local_listing.php index 23ede74f..d4d2cd2a 100644 --- a/admin/tables/local_listing.php +++ b/admin/tables/local_listing.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/tables/preacher.php b/admin/tables/preacher.php index 33a9ce6a..0b41c64d 100644 --- a/admin/tables/preacher.php +++ b/admin/tables/preacher.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/tables/series.php b/admin/tables/series.php index 2031f60a..e98f3be6 100644 --- a/admin/tables/series.php +++ b/admin/tables/series.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/tables/sermon.php b/admin/tables/sermon.php index 2ac854c6..c0340ef4 100644 --- a/admin/tables/sermon.php +++ b/admin/tables/sermon.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/tables/statistic.php b/admin/tables/statistic.php index c578c5e6..4d88f126 100644 --- a/admin/tables/statistic.php +++ b/admin/tables/statistic.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/external_source/submitbutton.js b/admin/views/external_source/submitbutton.js index 144f8230..fa600653 100644 --- a/admin/views/external_source/submitbutton.js +++ b/admin/views/external_source/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/admin/views/external_source/tmpl/edit.php b/admin/views/external_source/tmpl/edit.php index b7d790f6..50fba222 100644 --- a/admin/views/external_source/tmpl/edit.php +++ b/admin/views/external_source/tmpl/edit.php @@ -17,18 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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 ?> @@ -92,7 +92,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'external_sourceTab'; ?> - canDo->get('external_source.delete') || $this->canDo->get('external_source.edit.created_by') || $this->canDo->get('external_source.edit.state') || $this->canDo->get('external_source.edit.created')) : ?> + canDo->get('external_source.edit.created_by') || $this->canDo->get('external_source.edit.created') || $this->canDo->get('external_source.edit.state') || ($this->canDo->get('external_source.delete') && $this->canDo->get('external_source.edit.state'))) : ?>
diff --git a/admin/views/external_source/view.html.php b/admin/views/external_source/view.html.php index 27a814ef..23a6993b 100644 --- a/admin/views/external_source/view.html.php +++ b/admin/views/external_source/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -160,12 +160,12 @@ class SermondistributorViewExternal_source extends JViewLegacy if ($this->canDo->get('external_source.clear_local_listing')) { // add Clear Local Listing button. - JToolBarHelper::custom('external_source.clearLocalListing', 'delete', '', 'COM_SERMONDISTRIBUTOR_CLEAR_LOCAL_LISTING', false); + JToolBarHelper::custom('external_source.clearLocalListing', 'delete custom-button-clearlocallisting', '', 'COM_SERMONDISTRIBUTOR_CLEAR_LOCAL_LISTING', false); } if ($this->canDo->get('external_source.reset_update_status')) { // add Reset Update Status button. - JToolBarHelper::custom('external_source.resetUpdateStatus', 'undo-2', '', 'COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS', false); + JToolBarHelper::custom('external_source.resetUpdateStatus', 'undo-2 custom-button-resetupdatestatus', '', 'COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS', false); } JToolBarHelper::cancel('external_source.cancel', 'JTOOLBAR_CLOSE'); } diff --git a/admin/views/external_sources/tmpl/default.php b/admin/views/external_sources/tmpl/default.php index b106d46f..2b001b6a 100644 --- a/admin/views/external_sources/tmpl/default.php +++ b/admin/views/external_sources/tmpl/default.php @@ -17,82 +17,62 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file 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_sermondistributor&task=external_sources.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'external_sourceList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/external_sources/tmpl/default_batch_body.php b/admin/views/external_sources/tmpl/default_batch_body.php index fcf78ec3..f83eb6f0 100644 --- a/admin/views/external_sources/tmpl/default_batch_body.php +++ b/admin/views/external_sources/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/external_sources/tmpl/default_batch_footer.php b/admin/views/external_sources/tmpl/default_batch_footer.php index c3a155e8..e8744a86 100644 --- a/admin/views/external_sources/tmpl/default_batch_footer.php +++ b/admin/views/external_sources/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/external_sources/tmpl/default_body.php b/admin/views/external_sources/tmpl/default_body.php index 22a8b2a2..4ce39390 100644 --- a/admin/views/external_sources/tmpl/default_body.php +++ b/admin/views/external_sources/tmpl/default_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=external_sources&task=exter get('external_source.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/external_sources/tmpl/default_foot.php b/admin/views/external_sources/tmpl/default_foot.php index 5dbde56a..d757b2fb 100644 --- a/admin/views/external_sources/tmpl/default_foot.php +++ b/admin/views/external_sources/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/external_sources/tmpl/default_head.php b/admin/views/external_sources/tmpl/default_head.php index 094241b4..2f452440 100644 --- a/admin/views/external_sources/tmpl/default_head.php +++ b/admin/views/external_sources/tmpl/default_head.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -43,23 +43,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -67,6 +67,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_toolbar.php b/admin/views/external_sources/tmpl/default_toolbar.php index 5f220cf1..0098104e 100644 --- a/admin/views/external_sources/tmpl/default_toolbar.php +++ b/admin/views/external_sources/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/external_sources/view.html.php b/admin/views/external_sources/view.html.php index 758c9e92..f3fcffd5 100644 --- a/admin/views/external_sources/view.html.php +++ b/admin/views/external_sources/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -47,10 +47,14 @@ class SermondistributorViewExternal_sources extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 @@ -165,129 +169,76 @@ class SermondistributorViewExternal_sources extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_sermondistributor'); - } - - 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_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } - // Set Externalsources Selection - $this->externalsourcesOptions = $this->getTheExternalsourcesSelections(); - // We do some sanitation for Externalsources filter - if (SermondistributorHelper::checkArray($this->externalsourcesOptions) && - isset($this->externalsourcesOptions[0]->value) && - !SermondistributorHelper::checkString($this->externalsourcesOptions[0]->value)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - unset($this->externalsourcesOptions[0]); - } - // Only load Externalsources filter if it has values - if (SermondistributorHelper::checkArray($this->externalsourcesOptions)) - { - // Externalsources Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL').' -', - 'filter_externalsources', - JHtml::_('select.options', $this->externalsourcesOptions, 'value', 'text', $this->state->get('filter.externalsources')) + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Externalsources batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Externalsources Selection + $this->externalsourcesOptions = JFormHelper::loadFieldType('externalsourcesfilterexternalsources')->options; + // We do some sanitation for Externalsources filter + if (SermondistributorHelper::checkArray($this->externalsourcesOptions) && + isset($this->externalsourcesOptions[0]->value) && + !SermondistributorHelper::checkString($this->externalsourcesOptions[0]->value)) { - // Externalsources Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL').' -', - 'batch[externalsources]', - JHtml::_('select.options', $this->externalsourcesOptions, 'value', 'text') - ); + unset($this->externalsourcesOptions[0]); } - } - - // Set Update Method Selection - $this->update_methodOptions = $this->getTheUpdate_methodSelections(); - // We do some sanitation for Update Method filter - if (SermondistributorHelper::checkArray($this->update_methodOptions) && - isset($this->update_methodOptions[0]->value) && - !SermondistributorHelper::checkString($this->update_methodOptions[0]->value)) - { - unset($this->update_methodOptions[0]); - } - // Only load Update Method filter if it has values - if (SermondistributorHelper::checkArray($this->update_methodOptions)) - { - // Update Method Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL').' -', - 'filter_update_method', - JHtml::_('select.options', $this->update_methodOptions, 'value', 'text', $this->state->get('filter.update_method')) + // Externalsources Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL').' -', + 'batch[externalsources]', + JHtml::_('select.options', $this->externalsourcesOptions, 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Update Method batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Update Method Selection + $this->update_methodOptions = JFormHelper::loadFieldType('externalsourcesfilterupdatemethod')->options; + // We do some sanitation for Update Method filter + if (SermondistributorHelper::checkArray($this->update_methodOptions) && + isset($this->update_methodOptions[0]->value) && + !SermondistributorHelper::checkString($this->update_methodOptions[0]->value)) { - // Update Method Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL').' -', - 'batch[update_method]', - JHtml::_('select.options', $this->update_methodOptions, 'value', 'text') - ); + unset($this->update_methodOptions[0]); } - } - - // Set Build Selection - $this->buildOptions = $this->getTheBuildSelections(); - // We do some sanitation for Build filter - if (SermondistributorHelper::checkArray($this->buildOptions) && - isset($this->buildOptions[0]->value) && - !SermondistributorHelper::checkString($this->buildOptions[0]->value)) - { - unset($this->buildOptions[0]); - } - // Only load Build filter if it has values - if (SermondistributorHelper::checkArray($this->buildOptions)) - { - // Build Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL').' -', - 'filter_build', - JHtml::_('select.options', $this->buildOptions, 'value', 'text', $this->state->get('filter.build')) + // Update Method Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL').' -', + 'batch[update_method]', + JHtml::_('select.options', $this->update_methodOptions, 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Build batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Build Selection + $this->buildOptions = JFormHelper::loadFieldType('externalsourcesfilterbuild')->options; + // We do some sanitation for Build filter + if (SermondistributorHelper::checkArray($this->buildOptions) && + isset($this->buildOptions[0]->value) && + !SermondistributorHelper::checkString($this->buildOptions[0]->value)) { - // Build Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL').' -', - 'batch[build]', - JHtml::_('select.options', $this->buildOptions, 'value', 'text') - ); + unset($this->buildOptions[0]); } + // Build Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL').' -', + 'batch[build]', + JHtml::_('select.options', $this->buildOptions, 'value', 'text') + ); } } @@ -332,7 +283,7 @@ class SermondistributorViewExternal_sources extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.description' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DESCRIPTION_LABEL'), 'a.externalsources' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL'), @@ -340,113 +291,5 @@ class SermondistributorViewExternal_sources extends JViewLegacy 'a.build' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheExternalsourcesSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('externalsources')); - $query->from($db->quoteName('#__sermondistributor_external_source')); - $query->order($db->quoteName('externalsources') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $externalsources) - { - // Translate the externalsources selection - $text = $model->selectionTranslation($externalsources,'externalsources'); - // Now add the externalsources and its text to the options array - $_filter[] = JHtml::_('select.option', $externalsources, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheUpdate_methodSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('update_method')); - $query->from($db->quoteName('#__sermondistributor_external_source')); - $query->order($db->quoteName('update_method') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $update_method) - { - // Translate the update_method selection - $text = $model->selectionTranslation($update_method,'update_method'); - // Now add the update_method and its text to the options array - $_filter[] = JHtml::_('select.option', $update_method, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheBuildSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('build')); - $query->from($db->quoteName('#__sermondistributor_external_source')); - $query->order($db->quoteName('build') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $build) - { - // Translate the build selection - $text = $model->selectionTranslation($build,'build'); - // Now add the build and its text to the options array - $_filter[] = JHtml::_('select.option', $build, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/help_document/submitbutton.js b/admin/views/help_document/submitbutton.js index 657dc7c3..b8d5bb2a 100644 --- a/admin/views/help_document/submitbutton.js +++ b/admin/views/help_document/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index a940b24f..2b02c355 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -17,18 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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 ?> @@ -82,7 +82,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'))) : ?>
diff --git a/admin/views/help_document/view.html.php b/admin/views/help_document/view.html.php index 408285b2..f683f18d 100644 --- a/admin/views/help_document/view.html.php +++ b/admin/views/help_document/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php index 571f4602..77f9f436 100644 --- a/admin/views/help_documents/tmpl/default.php +++ b/admin/views/help_documents/tmpl/default.php @@ -17,82 +17,62 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file 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_sermondistributor&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_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_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 7ea245c0..55f93607 100644 --- a/admin/views/help_documents/tmpl/default_batch_body.php +++ b/admin/views/help_documents/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/help_documents/tmpl/default_batch_footer.php b/admin/views/help_documents/tmpl/default_batch_footer.php index 6fb49777..bf9be34c 100644 --- a/admin/views/help_documents/tmpl/default_batch_footer.php +++ b/admin/views/help_documents/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/help_documents/tmpl/default_body.php b/admin/views/help_documents/tmpl/default_body.php index ab4cac3a..3cef34b6 100644 --- a/admin/views/help_documents/tmpl/default_body.php +++ b/admin/views/help_documents/tmpl/default_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=help_documents&task=help_do 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 b0b52336..2139da45 100644 --- a/admin/views/help_documents/tmpl/default_foot.php +++ b/admin/views/help_documents/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/help_documents/tmpl/default_head.php b/admin/views/help_documents/tmpl/default_head.php index b0f80121..16351fb1 100644 --- a/admin/views/help_documents/tmpl/default_head.php +++ b/admin/views/help_documents/tmpl/default_head.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -43,26 +43,26 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -70,6 +70,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/help_documents/tmpl/default_toolbar.php b/admin/views/help_documents/tmpl/default_toolbar.php index 690d7300..66379159 100644 --- a/admin/views/help_documents/tmpl/default_toolbar.php +++ b/admin/views/help_documents/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 79d1a56f..ea1b0d1e 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -47,10 +47,14 @@ class SermondistributorViewHelp_documents extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 @@ -165,159 +169,106 @@ class SermondistributorViewHelp_documents extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_sermondistributor'); - } - - 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_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - // We do some sanitation for Type filter - if (SermondistributorHelper::checkArray($this->typeOptions) && - isset($this->typeOptions[0]->value) && - !SermondistributorHelper::checkString($this->typeOptions[0]->value)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - unset($this->typeOptions[0]); - } - // Only load Type filter if it has values - if (SermondistributorHelper::checkArray($this->typeOptions)) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Type Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -', - 'batch[type]', - JHtml::_('select.options', $this->typeOptions, 'value', 'text') - ); - } } - // Set Location Selection - $this->locationOptions = $this->getTheLocationSelections(); - // We do some sanitation for Location filter - if (SermondistributorHelper::checkArray($this->locationOptions) && - isset($this->locationOptions[0]->value) && - !SermondistributorHelper::checkString($this->locationOptions[0]->value)) + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) { - unset($this->locationOptions[0]); - } - // Only load Location filter if it has values - if (SermondistributorHelper::checkArray($this->locationOptions)) - { - // Location Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -', - 'filter_location', - JHtml::_('select.options', $this->locationOptions, 'value', 'text', $this->state->get('filter.location')) + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Type batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Type Selection + $this->typeOptions = JFormHelper::loadFieldType('helpdocumentsfiltertype')->options; + // We do some sanitation for Type filter + if (SermondistributorHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !SermondistributorHelper::checkString($this->typeOptions[0]->value)) { - // Location Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -', - 'batch[location]', - JHtml::_('select.options', $this->locationOptions, 'value', 'text') - ); + unset($this->typeOptions[0]); } - } - - // Set Admin View Selection - $this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options; - // We do some sanitation for Admin View filter - if (SermondistributorHelper::checkArray($this->admin_viewOptions) && - isset($this->admin_viewOptions[0]->value) && - !SermondistributorHelper::checkString($this->admin_viewOptions[0]->value)) - { - unset($this->admin_viewOptions[0]); - } - // Only load Admin View filter if it has values - if (SermondistributorHelper::checkArray($this->admin_viewOptions)) - { - // Admin View Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', - 'filter_admin_view', - JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text', $this->state->get('filter.admin_view')) + // Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -', + 'batch[type]', + JHtml::_('select.options', $this->typeOptions, 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Location batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Location Selection + $this->locationOptions = JFormHelper::loadFieldType('helpdocumentsfilterlocation')->options; + // We do some sanitation for Location filter + if (SermondistributorHelper::checkArray($this->locationOptions) && + isset($this->locationOptions[0]->value) && + !SermondistributorHelper::checkString($this->locationOptions[0]->value)) { - // Admin View Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -', - 'batch[admin_view]', - JHtml::_('select.options', $this->admin_viewOptions, 'value', 'text') - ); + unset($this->locationOptions[0]); } - } - - // Set Site View Selection - $this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options; - // We do some sanitation for Site View filter - if (SermondistributorHelper::checkArray($this->site_viewOptions) && - isset($this->site_viewOptions[0]->value) && - !SermondistributorHelper::checkString($this->site_viewOptions[0]->value)) - { - unset($this->site_viewOptions[0]); - } - // Only load Site View filter if it has values - if (SermondistributorHelper::checkArray($this->site_viewOptions)) - { - // Site View Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', - 'filter_site_view', - JHtml::_('select.options', $this->site_viewOptions, 'value', 'text', $this->state->get('filter.site_view')) + // Location Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -', + 'batch[location]', + JHtml::_('select.options', $this->locationOptions, 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Admin View batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Admin View Selection + $this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options; + // We do some sanitation for Admin View filter + if (SermondistributorHelper::checkArray($this->admin_viewOptions) && + isset($this->admin_viewOptions[0]->value) && + !SermondistributorHelper::checkString($this->admin_viewOptions[0]->value)) { - // Site View Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', - 'batch[site_view]', - JHtml::_('select.options', $this->site_viewOptions, 'value', 'text') - ); + unset($this->admin_viewOptions[0]); } + // Admin View Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_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) + { + // Set Site View Selection + $this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options; + // We do some sanitation for Site View filter + if (SermondistributorHelper::checkArray($this->site_viewOptions) && + isset($this->site_viewOptions[0]->value) && + !SermondistributorHelper::checkString($this->site_viewOptions[0]->value)) + { + unset($this->site_viewOptions[0]); + } + // Site View Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -', + 'batch[site_view]', + JHtml::_('select.options', $this->site_viewOptions, 'value', 'text') + ); } } @@ -362,7 +313,7 @@ class SermondistributorViewHelp_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_SERMONDISTRIBUTOR_HELP_DOCUMENT_TITLE_LABEL'), 'a.type' => JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL'), @@ -371,77 +322,5 @@ class SermondistributorViewHelp_documents extends JViewLegacy 'h.' => JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheTypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('type')); - $query->from($db->quoteName('#__sermondistributor_help_document')); - $query->order($db->quoteName('type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $type) - { - // Translate the type selection - $text = $model->selectionTranslation($type,'type'); - // Now add the type and its text to the options array - $_filter[] = JHtml::_('select.option', $type, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheLocationSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('location')); - $query->from($db->quoteName('#__sermondistributor_help_document')); - $query->order($db->quoteName('location') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $location) - { - // Translate the location selection - $text = $model->selectionTranslation($location,'location'); - // Now add the location and its text to the options array - $_filter[] = JHtml::_('select.option', $location, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index 41e6ecaf..30afa2b9 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/default.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index d8e901da..bee10443 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/local_listing/submitbutton.js b/admin/views/local_listing/submitbutton.js index c0b17d96..cc8fa0d9 100644 --- a/admin/views/local_listing/submitbutton.js +++ b/admin/views/local_listing/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/admin/views/local_listing/tmpl/edit.php b/admin/views/local_listing/tmpl/edit.php index 8981483d..2c9e3e12 100644 --- a/admin/views/local_listing/tmpl/edit.php +++ b/admin/views/local_listing/tmpl/edit.php @@ -17,18 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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 ?> @@ -82,7 +82,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'local_listingTab'; ?> - canDo->get('local_listing.delete') || $this->canDo->get('local_listing.edit.created_by') || $this->canDo->get('local_listing.edit.state') || $this->canDo->get('local_listing.edit.created')) : ?> + canDo->get('local_listing.edit.created_by') || $this->canDo->get('local_listing.edit.created') || $this->canDo->get('local_listing.edit.state') || ($this->canDo->get('local_listing.delete') && $this->canDo->get('local_listing.edit.state'))) : ?>
diff --git a/admin/views/local_listing/view.html.php b/admin/views/local_listing/view.html.php index bfdf2d84..666ea0e9 100644 --- a/admin/views/local_listing/view.html.php +++ b/admin/views/local_listing/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/local_listings/tmpl/default.php b/admin/views/local_listings/tmpl/default.php index 711c6537..0b025f64 100644 --- a/admin/views/local_listings/tmpl/default.php +++ b/admin/views/local_listings/tmpl/default.php @@ -17,82 +17,62 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file 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_sermondistributor&task=local_listings.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'local_listingList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/local_listings/tmpl/default_batch_body.php b/admin/views/local_listings/tmpl/default_batch_body.php index ef4db497..32493151 100644 --- a/admin/views/local_listings/tmpl/default_batch_body.php +++ b/admin/views/local_listings/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/local_listings/tmpl/default_batch_footer.php b/admin/views/local_listings/tmpl/default_batch_footer.php index 78820996..b5a4c9a0 100644 --- a/admin/views/local_listings/tmpl/default_batch_footer.php +++ b/admin/views/local_listings/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/local_listings/tmpl/default_body.php b/admin/views/local_listings/tmpl/default_body.php index 323622e1..5dc06f05 100644 --- a/admin/views/local_listings/tmpl/default_body.php +++ b/admin/views/local_listings/tmpl/default_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l get('local_listing.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/local_listings/tmpl/default_foot.php b/admin/views/local_listings/tmpl/default_foot.php index 5dbde56a..d757b2fb 100644 --- a/admin/views/local_listings/tmpl/default_foot.php +++ b/admin/views/local_listings/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/local_listings/tmpl/default_head.php b/admin/views/local_listings/tmpl/default_head.php index 44e4b240..5cf1dbe4 100644 --- a/admin/views/local_listings/tmpl/default_head.php +++ b/admin/views/local_listings/tmpl/default_head.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -43,23 +43,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -67,6 +67,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_toolbar.php b/admin/views/local_listings/tmpl/default_toolbar.php index 400c396a..69bfeadb 100644 --- a/admin/views/local_listings/tmpl/default_toolbar.php +++ b/admin/views/local_listings/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/local_listings/view.html.php b/admin/views/local_listings/view.html.php index 6e403e29..3824fc3e 100644 --- a/admin/views/local_listings/view.html.php +++ b/admin/views/local_listings/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -47,10 +47,14 @@ class SermondistributorViewLocal_listings extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 @@ -165,99 +169,56 @@ class SermondistributorViewLocal_listings extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_sermondistributor'); - } - - 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_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } - // Set Build Selection - $this->buildOptions = $this->getTheBuildSelections(); - // We do some sanitation for Build filter - if (SermondistributorHelper::checkArray($this->buildOptions) && - isset($this->buildOptions[0]->value) && - !SermondistributorHelper::checkString($this->buildOptions[0]->value)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - unset($this->buildOptions[0]); - } - // Only load Build filter if it has values - if (SermondistributorHelper::checkArray($this->buildOptions)) - { - // Build Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL').' -', - 'filter_build', - JHtml::_('select.options', $this->buildOptions, 'value', 'text', $this->state->get('filter.build')) + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Build batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Build Selection + $this->buildOptions = JFormHelper::loadFieldType('locallistingsfilterbuild')->options; + // We do some sanitation for Build filter + if (SermondistributorHelper::checkArray($this->buildOptions) && + isset($this->buildOptions[0]->value) && + !SermondistributorHelper::checkString($this->buildOptions[0]->value)) { - // Build Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL').' -', - 'batch[build]', - JHtml::_('select.options', $this->buildOptions, 'value', 'text') - ); + unset($this->buildOptions[0]); } - } - - // Set External Source Description Selection - $this->external_sourceDescriptionOptions = JFormHelper::loadFieldType('Externalsource')->options; - // We do some sanitation for External Source Description filter - if (SermondistributorHelper::checkArray($this->external_sourceDescriptionOptions) && - isset($this->external_sourceDescriptionOptions[0]->value) && - !SermondistributorHelper::checkString($this->external_sourceDescriptionOptions[0]->value)) - { - unset($this->external_sourceDescriptionOptions[0]); - } - // Only load External Source Description filter if it has values - if (SermondistributorHelper::checkArray($this->external_sourceDescriptionOptions)) - { - // External Source Description Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL').' -', - 'filter_external_source', - JHtml::_('select.options', $this->external_sourceDescriptionOptions, 'value', 'text', $this->state->get('filter.external_source')) + // Build Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL').' -', + 'batch[build]', + JHtml::_('select.options', $this->buildOptions, 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load External Source Description batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set External Source Description Selection + $this->external_sourceDescriptionOptions = JFormHelper::loadFieldType('Externalsource')->options; + // We do some sanitation for External Source Description filter + if (SermondistributorHelper::checkArray($this->external_sourceDescriptionOptions) && + isset($this->external_sourceDescriptionOptions[0]->value) && + !SermondistributorHelper::checkString($this->external_sourceDescriptionOptions[0]->value)) { - // External Source Description Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL').' -', - 'batch[external_source]', - JHtml::_('select.options', $this->external_sourceDescriptionOptions, 'value', 'text') - ); + unset($this->external_sourceDescriptionOptions[0]); } + // External Source Description Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL').' -', + 'batch[external_source]', + JHtml::_('select.options', $this->external_sourceDescriptionOptions, 'value', 'text') + ); } } @@ -302,7 +263,7 @@ class SermondistributorViewLocal_listings 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_SERMONDISTRIBUTOR_LOCAL_LISTING_NAME_LABEL'), 'a.build' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL'), @@ -311,41 +272,5 @@ class SermondistributorViewLocal_listings extends JViewLegacy 'a.key' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_KEY_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheBuildSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('build')); - $query->from($db->quoteName('#__sermondistributor_local_listing')); - $query->order($db->quoteName('build') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $build) - { - // Translate the build selection - $text = $model->selectionTranslation($build,'build'); - // Now add the build and its text to the options array - $_filter[] = JHtml::_('select.option', $build, JText::_($text)); - } - return $_filter; - } - return false; } } diff --git a/admin/views/manual_updater/tmpl/default.php b/admin/views/manual_updater/tmpl/default.php index 5384a893..df96cecb 100644 --- a/admin/views/manual_updater/tmpl/default.php +++ b/admin/views/manual_updater/tmpl/default.php @@ -17,22 +17,22 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); // get the needed module for translation $model = SermondistributorHelper::getModel('external_sources'); - -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -JHtml::_('formbehavior.chosen', 'select'); -JHtml::_('behavior.keepalive'); ?> canDo->get('manual_updater.access')): ?> -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/preachers/tmpl/default_batch_body.php b/admin/views/preachers/tmpl/default_batch_body.php index bdac6e21..c34537a2 100644 --- a/admin/views/preachers/tmpl/default_batch_body.php +++ b/admin/views/preachers/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/preachers/tmpl/default_batch_footer.php b/admin/views/preachers/tmpl/default_batch_footer.php index b52b0262..05656356 100644 --- a/admin/views/preachers/tmpl/default_batch_footer.php +++ b/admin/views/preachers/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/preachers/tmpl/default_body.php b/admin/views/preachers/tmpl/default_body.php index 1e727faf..b8a17f35 100644 --- a/admin/views/preachers/tmpl/default_body.php +++ b/admin/views/preachers/tmpl/default_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=preachers&task=preacher.edi get('preacher.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/preachers/tmpl/default_foot.php b/admin/views/preachers/tmpl/default_foot.php index 4e774d9b..9d71001f 100644 --- a/admin/views/preachers/tmpl/default_foot.php +++ b/admin/views/preachers/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/preachers/tmpl/default_head.php b/admin/views/preachers/tmpl/default_head.php index 25ed42f4..ec89849c 100644 --- a/admin/views/preachers/tmpl/default_head.php +++ b/admin/views/preachers/tmpl/default_head.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -43,14 +43,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -58,6 +58,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/preachers/tmpl/default_toolbar.php b/admin/views/preachers/tmpl/default_toolbar.php index 599e7240..09384f9d 100644 --- a/admin/views/preachers/tmpl/default_toolbar.php +++ b/admin/views/preachers/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/preachers/view.html.php b/admin/views/preachers/view.html.php index 931bda4a..74265f7c 100644 --- a/admin/views/preachers/view.html.php +++ b/admin/views/preachers/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -47,10 +47,14 @@ class SermondistributorViewPreachers extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 @@ -165,39 +169,26 @@ class SermondistributorViewPreachers extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_sermondistributor'); - } - - 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_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); + } + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); } } @@ -242,7 +233,7 @@ class SermondistributorViewPreachers 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_SERMONDISTRIBUTOR_PREACHER_NAME_LABEL'), 'a.description' => JText::_('COM_SERMONDISTRIBUTOR_PREACHER_DESCRIPTION_LABEL'), diff --git a/admin/views/series/submitbutton.js b/admin/views/series/submitbutton.js index ecd1454d..1e0ba94a 100644 --- a/admin/views/series/submitbutton.js +++ b/admin/views/series/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/admin/views/series/tmpl/edit.php b/admin/views/series/tmpl/edit.php index 317d4207..c0c7a0bd 100644 --- a/admin/views/series/tmpl/edit.php +++ b/admin/views/series/tmpl/edit.php @@ -17,18 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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 ?> @@ -94,7 +94,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'seriesTab'; ?> - canDo->get('series.delete') || $this->canDo->get('series.edit.created_by') || $this->canDo->get('series.edit.state') || $this->canDo->get('series.edit.created')) : ?> + canDo->get('series.edit.created_by') || $this->canDo->get('series.edit.created') || $this->canDo->get('series.edit.state') || ($this->canDo->get('series.delete') && $this->canDo->get('series.edit.state'))) : ?>
diff --git a/admin/views/series/view.html.php b/admin/views/series/view.html.php index 0d6eeb66..e5866a43 100644 --- a/admin/views/series/view.html.php +++ b/admin/views/series/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/series_list/tmpl/default.php b/admin/views/series_list/tmpl/default.php index f391ca96..4687e48e 100644 --- a/admin/views/series_list/tmpl/default.php +++ b/admin/views/series_list/tmpl/default.php @@ -17,82 +17,62 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file 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_sermondistributor&task=series_list.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'seriesList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/series_list/tmpl/default_batch_body.php b/admin/views/series_list/tmpl/default_batch_body.php index 6735d7c7..64814a4f 100644 --- a/admin/views/series_list/tmpl/default_batch_body.php +++ b/admin/views/series_list/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/series_list/tmpl/default_batch_footer.php b/admin/views/series_list/tmpl/default_batch_footer.php index e81b9c59..ccf5ebce 100644 --- a/admin/views/series_list/tmpl/default_batch_footer.php +++ b/admin/views/series_list/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/series_list/tmpl/default_body.php b/admin/views/series_list/tmpl/default_body.php index c402c5eb..0a9ad66b 100644 --- a/admin/views/series_list/tmpl/default_body.php +++ b/admin/views/series_list/tmpl/default_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=series_list&task=series.edi get('series.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/series_list/tmpl/default_foot.php b/admin/views/series_list/tmpl/default_foot.php index 4e774d9b..9d71001f 100644 --- a/admin/views/series_list/tmpl/default_foot.php +++ b/admin/views/series_list/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/series_list/tmpl/default_head.php b/admin/views/series_list/tmpl/default_head.php index 0b1e417f..7c8956f5 100644 --- a/admin/views/series_list/tmpl/default_head.php +++ b/admin/views/series_list/tmpl/default_head.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -43,14 +43,14 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -58,6 +58,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/series_list/tmpl/default_toolbar.php b/admin/views/series_list/tmpl/default_toolbar.php index 4276f4b3..86fdf29d 100644 --- a/admin/views/series_list/tmpl/default_toolbar.php +++ b/admin/views/series_list/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/series_list/view.html.php b/admin/views/series_list/view.html.php index 1e058a94..1b5e7d25 100644 --- a/admin/views/series_list/view.html.php +++ b/admin/views/series_list/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -47,10 +47,14 @@ class SermondistributorViewSeries_list extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 @@ -165,39 +169,26 @@ class SermondistributorViewSeries_list extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_sermondistributor'); - } - - 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_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); + } + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); } } @@ -242,7 +233,7 @@ class SermondistributorViewSeries_list 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_SERMONDISTRIBUTOR_SERIES_NAME_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') diff --git a/admin/views/sermon/submitbutton.js b/admin/views/sermon/submitbutton.js index f8ab8047..f8e8050d 100644 --- a/admin/views/sermon/submitbutton.js +++ b/admin/views/sermon/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/admin/views/sermon/tmpl/edit.php b/admin/views/sermon/tmpl/edit.php index c791cf82..e0bd0207 100644 --- a/admin/views/sermon/tmpl/edit.php +++ b/admin/views/sermon/tmpl/edit.php @@ -17,18 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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 ?> @@ -104,7 +104,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'sermonTab'; ?> - canDo->get('sermon.delete') || $this->canDo->get('sermon.edit.created_by') || $this->canDo->get('sermon.edit.state') || $this->canDo->get('sermon.edit.created')) : ?> + canDo->get('sermon.edit.created_by') || $this->canDo->get('sermon.edit.created') || $this->canDo->get('sermon.edit.state') || ($this->canDo->get('sermon.delete') && $this->canDo->get('sermon.edit.state'))) : ?>
diff --git a/admin/views/sermon/view.html.php b/admin/views/sermon/view.html.php index f3267dbe..b25bf65f 100644 --- a/admin/views/sermon/view.html.php +++ b/admin/views/sermon/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default.php b/admin/views/sermondistributor/tmpl/default.php index bd363f17..b5192aa6 100644 --- a/admin/views/sermondistributor/tmpl/default.php +++ b/admin/views/sermondistributor/tmpl/default.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_closed_issues_the_closed_issues_on_github.php b/admin/views/sermondistributor/tmpl/default_closed_issues_the_closed_issues_on_github.php index 973b63eb..4d06aa6e 100644 --- a/admin/views/sermondistributor/tmpl/default_closed_issues_the_closed_issues_on_github.php +++ b/admin/views/sermondistributor/tmpl/default_closed_issues_the_closed_issues_on_github.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_main.php b/admin/views/sermondistributor/tmpl/default_main.php index 20bcc50c..24142a27 100644 --- a/admin/views/sermondistributor/tmpl/default_main.php +++ b/admin/views/sermondistributor/tmpl/default_main.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_open_issues_the_open_issues_on_github.php b/admin/views/sermondistributor/tmpl/default_open_issues_the_open_issues_on_github.php index c7fe455e..6b9a3e3c 100644 --- a/admin/views/sermondistributor/tmpl/default_open_issues_the_open_issues_on_github.php +++ b/admin/views/sermondistributor/tmpl/default_open_issues_the_open_issues_on_github.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_readme_information.php b/admin/views/sermondistributor/tmpl/default_readme_information.php index 91cfe494..cb0739e1 100644 --- a/admin/views/sermondistributor/tmpl/default_readme_information.php +++ b/admin/views/sermondistributor/tmpl/default_readme_information.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_releases_information.php b/admin/views/sermondistributor/tmpl/default_releases_information.php index 47b31813..5ad894c4 100644 --- a/admin/views/sermondistributor/tmpl/default_releases_information.php +++ b/admin/views/sermondistributor/tmpl/default_releases_information.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_vast_development_method_notice_board.php b/admin/views/sermondistributor/tmpl/default_vast_development_method_notice_board.php index c550cc88..3f3ae19e 100644 --- a/admin/views/sermondistributor/tmpl/default_vast_development_method_notice_board.php +++ b/admin/views/sermondistributor/tmpl/default_vast_development_method_notice_board.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/tmpl/default_vdm.php b/admin/views/sermondistributor/tmpl/default_vdm.php index a88af3e7..33ef14ba 100644 --- a/admin/views/sermondistributor/tmpl/default_vdm.php +++ b/admin/views/sermondistributor/tmpl/default_vdm.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermondistributor/view.html.php b/admin/views/sermondistributor/view.html.php index cadd0c1e..f4797f90 100644 --- a/admin/views/sermondistributor/view.html.php +++ b/admin/views/sermondistributor/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermons/tmpl/default.php b/admin/views/sermons/tmpl/default.php index a35e6eb0..3ed9ef17 100644 --- a/admin/views/sermons/tmpl/default.php +++ b/admin/views/sermons/tmpl/default.php @@ -1,4 +1,4 @@ - + @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - A sermon distributor that links to Dropbox. + A sermon distributor that links to Dropbox. /----------------------------------------------------------------------------------------------------------------------------------*/ // 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::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY'))); -JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_ACCESS'))); -JHtml::_('formbehavior.chosen', '.multiplePreachers', null, array('placeholder_text_multiple' => JText::_('Select preachers'))); -JHtml::_('formbehavior.chosen', '.multipleSource', null, array('placeholder_text_multiple' => JText::_('Select source'))); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multiplePreachers', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_PREACHER') . ' -')); +JHtml::_('formbehavior.chosen', '.multipleSeries', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_SERIES') . ' -')); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_sermondistributor&task=sermons.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'sermonList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- - $this)); - ?> -items)): ?> -
- -
- - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SERMONDISTRIBUTOR_SERMONS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - -
- - - + +sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_SERMONS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + diff --git a/admin/views/sermons/tmpl/default_batch_body.php b/admin/views/sermons/tmpl/default_batch_body.php index a05427a4..4963c29a 100644 --- a/admin/views/sermons/tmpl/default_batch_body.php +++ b/admin/views/sermons/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermons/tmpl/default_batch_footer.php b/admin/views/sermons/tmpl/default_batch_footer.php index 24fba38e..5d4c0bab 100644 --- a/admin/views/sermons/tmpl/default_batch_footer.php +++ b/admin/views/sermons/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermons/tmpl/default_body.php b/admin/views/sermons/tmpl/default_body.php index 3c189854..cc1094ee 100644 --- a/admin/views/sermons/tmpl/default_body.php +++ b/admin/views/sermons/tmpl/default_body.php @@ -1,33 +1,33 @@ - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - A sermon distributor that links to Dropbox. - -/----------------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; - -?> +/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + ____ ____ __ __ __ +/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ +\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ + \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ + /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ + \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ + \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ + +/------------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.0.x + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage default_body.php + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; + +?> items as $i => $item): ?> user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; get('sermon.edit.state')): ?> saveOrder) - { - $iconClass = ''; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } @@ -140,4 +137,4 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; id; ?> - + \ No newline at end of file diff --git a/admin/views/sermons/tmpl/default_foot.php b/admin/views/sermons/tmpl/default_foot.php index 65430747..efcf618a 100644 --- a/admin/views/sermons/tmpl/default_foot.php +++ b/admin/views/sermons/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermons/tmpl/default_head.php b/admin/views/sermons/tmpl/default_head.php index a5bc9d9e..ef33519b 100644 --- a/admin/views/sermons/tmpl/default_head.php +++ b/admin/views/sermons/tmpl/default_head.php @@ -1,31 +1,31 @@ - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - A sermon distributor that links to Dropbox. - -/----------------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -?> +/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + ____ ____ __ __ __ +/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ +\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ + \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ + /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ + \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ + \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ + +/------------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.0.x + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage default_head.php + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> canEdit&& $this->canState): ?> @@ -75,4 +75,4 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - + \ No newline at end of file diff --git a/admin/views/sermons/tmpl/default_toolbar.php b/admin/views/sermons/tmpl/default_toolbar.php index 73dcfaab..783c6a7e 100644 --- a/admin/views/sermons/tmpl/default_toolbar.php +++ b/admin/views/sermons/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/sermons/view.html.php b/admin/views/sermons/view.html.php index 373ab004..2b4183d8 100644 --- a/admin/views/sermons/view.html.php +++ b/admin/views/sermons/view.html.php @@ -1,187 +1,187 @@ - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - A sermon distributor that links to Dropbox. - -/----------------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -/** - * Sermondistributor View class for the Sermons - */ -class SermondistributorViewSermons extends JViewLegacy -{ - /** - * Sermons view display method - * @return void - */ - function display($tpl = null) - { - if ($this->getLayout() !== 'modal') - { - // Include helper submenu - SermondistributorHelper::addSubmenu('sermons'); - } - - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); +/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + ____ ____ __ __ __ +/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ +\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ + \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ + /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ + \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ + \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ + +/------------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.0.x + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage view.html.php + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/----------------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Sermondistributor View class for the Sermons + */ +class SermondistributorViewSermons extends JViewLegacy +{ + /** + * Sermons view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + SermondistributorHelper::addSubmenu('sermons'); + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 == 'a.ordering'; - // set the return here value - $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); - // get global action permissions + $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 $this->canDo = SermondistributorHelper::getActions('sermon'); $this->canEdit = $this->canDo->get('sermon.edit'); $this->canState = $this->canDo->get('sermon.edit.state'); $this->canCreate = $this->canDo->get('sermon.create'); $this->canDelete = $this->canDo->get('sermon.delete'); - $this->canBatch = $this->canDo->get('core.batch'); - $this->filterForm = $this->get('FilterForm'); - $this->activeFilters = $this->get('ActiveFilters'); - - // We don't need toolbar in the modal window. - if ($this->getLayout() !== 'modal') - { - $this->addToolbar(); - $this->sidebar = JHtmlSidebar::render(); - // load the batch html - if ($this->canCreate && $this->canEdit && $this->canState) - { - $this->batchDisplay = JHtmlBatch_::render(); - } - } - - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - throw new Exception(implode("\n", $errors), 500); - } - - // Display the template - parent::display($tpl); - - // Set the document - $this->setDocument(); - } - - /** - * Setting the toolbar - */ - protected function addToolBar() - { - JToolBarHelper::title(JText::_('COM_SERMONDISTRIBUTOR_SERMONS'), 'book'); - JHtmlSidebar::setAction('index.php?option=com_sermondistributor&view=sermons'); - JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); - - if ($this->canCreate) - { - JToolBarHelper::addNew('sermon.add'); - } - - // Only load if there are items - if (SermondistributorHelper::checkArray($this->items)) - { - if ($this->canEdit) - { - JToolBarHelper::editList('sermon.edit'); - } - - if ($this->canState) - { - JToolBarHelper::publishList('sermons.publish'); - JToolBarHelper::unpublishList('sermons.unpublish'); - JToolBarHelper::archiveList('sermons.archive'); - - if ($this->canDo->get('core.admin')) - { - JToolBarHelper::checkin('sermons.checkin'); - } - } - - // Add a batch button - if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) - { - // Get the toolbar object instance - $bar = JToolBar::getInstance('toolbar'); - // set the batch button name - $title = JText::_('JTOOLBAR_BATCH'); - // Instantiate a new JLayoutFile instance and render the batch button - $layout = new JLayoutFile('joomla.toolbar.batch'); - // add the button to the page - $dhtml = $layout->render(array('title' => $title)); - $bar->appendButton('Custom', $dhtml, 'batch'); - } - - if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) - { - JToolbarHelper::deleteList('', 'sermons.delete', 'JTOOLBAR_EMPTY_TRASH'); - } - elseif ($this->canState && $this->canDelete) - { - JToolbarHelper::trash('sermons.trash'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_SERMONDISTRIBUTOR_SERMONS'), 'book'); + JHtmlSidebar::setAction('index.php?option=com_sermondistributor&view=sermons'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('sermon.add'); + } + + // Only load if there are items + if (SermondistributorHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('sermon.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('sermons.publish'); + JToolBarHelper::unpublishList('sermons.unpublish'); + JToolBarHelper::archiveList('sermons.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('sermons.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'sermons.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('sermons.trash'); } if ($this->canDo->get('core.export') && $this->canDo->get('sermon.export')) { JToolBarHelper::custom('sermons.exportData', 'download', '', 'COM_SERMONDISTRIBUTOR_EXPORT_DATA', true); - } + } } if ($this->canDo->get('core.import') && $this->canDo->get('sermon.import')) { JToolBarHelper::custom('sermons.importData', 'upload', '', 'COM_SERMONDISTRIBUTOR_IMPORT_DATA', false); + } + + // set help url for this view if found + $help_url = SermondistributorHelper::getHelpUrl('sermons'); + if (SermondistributorHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_sermondistributor'); } - // set help url for this view if found - $help_url = SermondistributorHelper::getHelpUrl('sermons'); - if (SermondistributorHelper::checkString($help_url)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); - } - - // add the options comp button - if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) - { - JToolBarHelper::preferences('com_sermondistributor'); - } - - if ($this->canState) - { - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_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( @@ -201,141 +201,129 @@ class SermondistributorViewSermons extends JViewLegacy ); } - // Set Preacher Name Selection - $this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->options; - // We do some sanitation for Preacher Name filter - if (SermondistributorHelper::checkArray($this->preacherNameOptions) && - isset($this->preacherNameOptions[0]->value) && - !SermondistributorHelper::checkString($this->preacherNameOptions[0]->value)) + // Only load Preacher Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) { - unset($this->preacherNameOptions[0]); - } - // Only load Preacher Name filter if it has values - if (SermondistributorHelper::checkArray($this->preacherNameOptions)) - { - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Set Preacher Name Selection + $this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->options; + // We do some sanitation for Preacher Name filter + if (SermondistributorHelper::checkArray($this->preacherNameOptions) && + isset($this->preacherNameOptions[0]->value) && + !SermondistributorHelper::checkString($this->preacherNameOptions[0]->value)) { - // Preacher Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL').' -', - 'batch[preacher]', - JHtml::_('select.options', $this->preacherNameOptions, 'value', 'text') - ); + unset($this->preacherNameOptions[0]); } + // Preacher Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL').' -', + 'batch[preacher]', + JHtml::_('select.options', $this->preacherNameOptions, 'value', 'text') + ); } - // Set Series Name Selection - $this->seriesNameOptions = JFormHelper::loadFieldType('Series')->options; - // We do some sanitation for Series Name filter - if (SermondistributorHelper::checkArray($this->seriesNameOptions) && - isset($this->seriesNameOptions[0]->value) && - !SermondistributorHelper::checkString($this->seriesNameOptions[0]->value)) + // Only load Series Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) { - unset($this->seriesNameOptions[0]); - } - // Only load Series Name filter if it has values - if (SermondistributorHelper::checkArray($this->seriesNameOptions)) - { - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Set Series Name Selection + $this->seriesNameOptions = JFormHelper::loadFieldType('Series')->options; + // We do some sanitation for Series Name filter + if (SermondistributorHelper::checkArray($this->seriesNameOptions) && + isset($this->seriesNameOptions[0]->value) && + !SermondistributorHelper::checkString($this->seriesNameOptions[0]->value)) { - // Series Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL').' -', - 'batch[series]', - JHtml::_('select.options', $this->seriesNameOptions, 'value', 'text') - ); + unset($this->seriesNameOptions[0]); } + // Series Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL').' -', + 'batch[series]', + JHtml::_('select.options', $this->seriesNameOptions, 'value', 'text') + ); } - // Set Link Type Selection - $this->link_typeOptions = $this->getTheLink_typeSelections(); - // We do some sanitation for Link Type filter - if (SermondistributorHelper::checkArray($this->link_typeOptions) && - isset($this->link_typeOptions[0]->value) && - !SermondistributorHelper::checkString($this->link_typeOptions[0]->value)) + // Only load Link Type batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) { - unset($this->link_typeOptions[0]); - } - // Only load Link Type filter if it has values - if (SermondistributorHelper::checkArray($this->link_typeOptions)) - { - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Set Link Type Selection + $this->link_typeOptions = JFormHelper::loadFieldType('sermonsfilterlinktype')->options; + // We do some sanitation for Link Type filter + if (SermondistributorHelper::checkArray($this->link_typeOptions) && + isset($this->link_typeOptions[0]->value) && + !SermondistributorHelper::checkString($this->link_typeOptions[0]->value)) { - // Link Type Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL').' -', - 'batch[link_type]', - JHtml::_('select.options', $this->link_typeOptions, 'value', 'text') - ); + unset($this->link_typeOptions[0]); } + // Link Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL').' -', + 'batch[link_type]', + JHtml::_('select.options', $this->link_typeOptions, 'value', 'text') + ); } - // Set Source Selection - $this->sourceOptions = $this->getTheSourceSelections(); - // We do some sanitation for Source filter - if (SermondistributorHelper::checkArray($this->sourceOptions) && - isset($this->sourceOptions[0]->value) && - !SermondistributorHelper::checkString($this->sourceOptions[0]->value)) + // Only load Source batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) { - unset($this->sourceOptions[0]); - } - // Only load Source filter if it has values - if (SermondistributorHelper::checkArray($this->sourceOptions)) - { - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Set Source Selection + $this->sourceOptions = JFormHelper::loadFieldType('sermonsfiltersource')->options; + // We do some sanitation for Source filter + if (SermondistributorHelper::checkArray($this->sourceOptions) && + isset($this->sourceOptions[0]->value) && + !SermondistributorHelper::checkString($this->sourceOptions[0]->value)) { - // Source Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL').' -', - 'batch[source]', - JHtml::_('select.options', $this->sourceOptions, 'value', 'text') - ); + unset($this->sourceOptions[0]); } - } - } - - /** - * Method to set up the document properties - * - * @return void - */ - protected function setDocument() - { - if (!isset($this->document)) - { - $this->document = JFactory::getDocument(); - } - $this->document->setTitle(JText::_('COM_SERMONDISTRIBUTOR_SERMONS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/sermons.css", (SermondistributorHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - } - - /** - * Escapes a value for output in a view script. - * - * @param mixed $var The output to escape. - * - * @return mixed The escaped value. - */ - public function escape($var) - { - if(strlen($var) > 50) - { - // use the helper htmlEscape method instead and shorten the string - return SermondistributorHelper::htmlEscape($var, $this->_charset, true); - } - // use the helper htmlEscape method instead. - return SermondistributorHelper::htmlEscape($var, $this->_charset); - } - - /** - * Returns an array of fields the table can be sorted by - * - * @return array Array containing the field name to sort by as the key and display text as value - */ - protected function getSortFields() - { + // Source Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL').' -', + 'batch[source]', + JHtml::_('select.options', $this->sourceOptions, 'value', 'text') + ); + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_SERMONDISTRIBUTOR_SERMONS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/sermons.css", (SermondistributorHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return SermondistributorHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return SermondistributorHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'), 'g.name' => JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'), @@ -345,78 +333,6 @@ class SermondistributorViewSermons extends JViewLegacy 'a.link_type' => JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'), 'a.source' => JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') - ); - } - - protected function getTheLink_typeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('link_type')); - $query->from($db->quoteName('#__sermondistributor_sermon')); - $query->order($db->quoteName('link_type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $link_type) - { - // Translate the link_type selection - $text = $model->selectionTranslation($link_type,'link_type'); - // Now add the link_type and its text to the options array - $_filter[] = JHtml::_('select.option', $link_type, JText::_($text)); - } - return $_filter; - } - return false; - } - - protected function getTheSourceSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('source')); - $query->from($db->quoteName('#__sermondistributor_sermon')); - $query->order($db->quoteName('source') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $source) - { - // Translate the source selection - $text = $model->selectionTranslation($source,'source'); - // Now add the source and its text to the options array - $_filter[] = JHtml::_('select.option', $source, JText::_($text)); - } - return $_filter; - } - return false; - } -} + ); + } +} diff --git a/admin/views/statistic/submitbutton.js b/admin/views/statistic/submitbutton.js index c5a3e1d9..d0bae4c2 100644 --- a/admin/views/statistic/submitbutton.js +++ b/admin/views/statistic/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/admin/views/statistic/tmpl/edit.php b/admin/views/statistic/tmpl/edit.php index 9960cc32..ada08f98 100644 --- a/admin/views/statistic/tmpl/edit.php +++ b/admin/views/statistic/tmpl/edit.php @@ -17,18 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // 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 = 'statisticTab'; ?> - canDo->get('statistic.delete') || $this->canDo->get('statistic.edit.created_by') || $this->canDo->get('statistic.edit.state') || $this->canDo->get('statistic.edit.created')) : ?> + canDo->get('statistic.edit.created_by') || $this->canDo->get('statistic.edit.created') || $this->canDo->get('statistic.edit.state') || ($this->canDo->get('statistic.delete') && $this->canDo->get('statistic.edit.state'))) : ?>
diff --git a/admin/views/statistic/view.html.php b/admin/views/statistic/view.html.php index d43dfd4e..e3680d07 100644 --- a/admin/views/statistic/view.html.php +++ b/admin/views/statistic/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/statistics/tmpl/default.php b/admin/views/statistics/tmpl/default.php index a9b5c079..ed13d342 100644 --- a/admin/views/statistics/tmpl/default.php +++ b/admin/views/statistics/tmpl/default.php @@ -17,82 +17,62 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file 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_sermondistributor&task=statistics.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'statisticList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/statistics/tmpl/default_batch_body.php b/admin/views/statistics/tmpl/default_batch_body.php index 621b5e68..ecd403de 100644 --- a/admin/views/statistics/tmpl/default_batch_body.php +++ b/admin/views/statistics/tmpl/default_batch_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/statistics/tmpl/default_batch_footer.php b/admin/views/statistics/tmpl/default_batch_footer.php index 77e26d73..4b20b8a8 100644 --- a/admin/views/statistics/tmpl/default_batch_footer.php +++ b/admin/views/statistics/tmpl/default_batch_footer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/statistics/tmpl/default_body.php b/admin/views/statistics/tmpl/default_body.php index ae02fe28..7d365174 100644 --- a/admin/views/statistics/tmpl/default_body.php +++ b/admin/views/statistics/tmpl/default_body.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -38,11 +38,8 @@ $edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.e get('statistic.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/statistics/tmpl/default_foot.php b/admin/views/statistics/tmpl/default_foot.php index 5dbde56a..d757b2fb 100644 --- a/admin/views/statistics/tmpl/default_foot.php +++ b/admin/views/statistics/tmpl/default_foot.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/statistics/tmpl/default_head.php b/admin/views/statistics/tmpl/default_head.php index 3943a37d..fe31bed0 100644 --- a/admin/views/statistics/tmpl/default_head.php +++ b/admin/views/statistics/tmpl/default_head.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -29,7 +29,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -43,23 +43,23 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -67,6 +67,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/statistics/tmpl/default_toolbar.php b/admin/views/statistics/tmpl/default_toolbar.php index 0e0b3e9c..61d9c065 100644 --- a/admin/views/statistics/tmpl/default_toolbar.php +++ b/admin/views/statistics/tmpl/default_toolbar.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/admin/views/statistics/view.html.php b/admin/views/statistics/view.html.php index cf2099bf..d86008a1 100644 --- a/admin/views/statistics/view.html.php +++ b/admin/views/statistics/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -47,10 +47,14 @@ class SermondistributorViewStatistics extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // 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 @@ -165,129 +169,86 @@ class SermondistributorViewStatistics extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_sermondistributor'); - } - - 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_SERMONDISTRIBUTOR_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_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } - // Set Sermon Name Selection - $this->sermonNameOptions = JFormHelper::loadFieldType('Sermon')->options; - // We do some sanitation for Sermon Name filter - if (SermondistributorHelper::checkArray($this->sermonNameOptions) && - isset($this->sermonNameOptions[0]->value) && - !SermondistributorHelper::checkString($this->sermonNameOptions[0]->value)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - unset($this->sermonNameOptions[0]); - } - // Only load Sermon Name filter if it has values - if (SermondistributorHelper::checkArray($this->sermonNameOptions)) - { - // Sermon Name Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -', - 'filter_sermon', - JHtml::_('select.options', $this->sermonNameOptions, 'value', 'text', $this->state->get('filter.sermon')) + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Sermon Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -', - 'batch[sermon]', - JHtml::_('select.options', $this->sermonNameOptions, 'value', 'text') - ); - } } - // Set Preacher Name Selection - $this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->options; - // We do some sanitation for Preacher Name filter - if (SermondistributorHelper::checkArray($this->preacherNameOptions) && - isset($this->preacherNameOptions[0]->value) && - !SermondistributorHelper::checkString($this->preacherNameOptions[0]->value)) + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) { - unset($this->preacherNameOptions[0]); - } - // Only load Preacher Name filter if it has values - if (SermondistributorHelper::checkArray($this->preacherNameOptions)) - { - // Preacher Name Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -', - 'filter_preacher', - JHtml::_('select.options', $this->preacherNameOptions, 'value', 'text', $this->state->get('filter.preacher')) + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Sermon Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Sermon Name Selection + $this->sermonNameOptions = JFormHelper::loadFieldType('Sermon')->options; + // We do some sanitation for Sermon Name filter + if (SermondistributorHelper::checkArray($this->sermonNameOptions) && + isset($this->sermonNameOptions[0]->value) && + !SermondistributorHelper::checkString($this->sermonNameOptions[0]->value)) { - // Preacher Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -', - 'batch[preacher]', - JHtml::_('select.options', $this->preacherNameOptions, 'value', 'text') - ); + unset($this->sermonNameOptions[0]); } - } - - // Set Series Name Selection - $this->seriesNameOptions = JFormHelper::loadFieldType('Series')->options; - // We do some sanitation for Series Name filter - if (SermondistributorHelper::checkArray($this->seriesNameOptions) && - isset($this->seriesNameOptions[0]->value) && - !SermondistributorHelper::checkString($this->seriesNameOptions[0]->value)) - { - unset($this->seriesNameOptions[0]); - } - // Only load Series Name filter if it has values - if (SermondistributorHelper::checkArray($this->seriesNameOptions)) - { - // Series Name Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -', - 'filter_series', - JHtml::_('select.options', $this->seriesNameOptions, 'value', 'text', $this->state->get('filter.series')) + // Sermon Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -', + 'batch[sermon]', + JHtml::_('select.options', $this->sermonNameOptions, 'value', 'text') ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load Preacher Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Preacher Name Selection + $this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->options; + // We do some sanitation for Preacher Name filter + if (SermondistributorHelper::checkArray($this->preacherNameOptions) && + isset($this->preacherNameOptions[0]->value) && + !SermondistributorHelper::checkString($this->preacherNameOptions[0]->value)) { - // Series Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -', - 'batch[series]', - JHtml::_('select.options', $this->seriesNameOptions, 'value', 'text') - ); + unset($this->preacherNameOptions[0]); } + // Preacher Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -', + 'batch[preacher]', + JHtml::_('select.options', $this->preacherNameOptions, 'value', 'text') + ); + } + + // Only load Series Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Series Name Selection + $this->seriesNameOptions = JFormHelper::loadFieldType('Series')->options; + // We do some sanitation for Series Name filter + if (SermondistributorHelper::checkArray($this->seriesNameOptions) && + isset($this->seriesNameOptions[0]->value) && + !SermondistributorHelper::checkString($this->seriesNameOptions[0]->value)) + { + unset($this->seriesNameOptions[0]); + } + // Series Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -', + 'batch[series]', + JHtml::_('select.options', $this->seriesNameOptions, 'value', 'text') + ); } } @@ -332,7 +293,7 @@ class SermondistributorViewStatistics extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.filename' => JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'), 'g.name' => JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'), diff --git a/script.php b/script.php index 7434b62c..9c7eda28 100644 --- a/script.php +++ b/script.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -1800,7 +1800,7 @@ class com_sermondistributorInstallerScript echo ' -

Upgrade to Version 2.0.3 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.0.4 Was Successful! Let us know if anything is not working as expected.

'; // Set db if not set already. if (!isset($db)) diff --git a/sermondistributor.xml b/sermondistributor.xml index ea7d2163..61a64a94 100644 --- a/sermondistributor.xml +++ b/sermondistributor.xml @@ -1,15 +1,15 @@ COM_SERMONDISTRIBUTOR - 30th May, 2020 + 30th November, 2020 Llewellyn van der Merwe joomla@vdm.io https://www.vdm.io/ Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.0.3 + 2.0.4 Sermon Distributor (v.2.0.3) +

Sermon Distributor (v.2.0.4)

Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.

Created by Llewellyn van der Merwe
Development started 22nd October, 2015

diff --git a/sermondistributor_update_server.xml b/sermondistributor_update_server.xml index a00e259e..03ad7164 100644 --- a/sermondistributor_update_server.xml +++ b/sermondistributor_update_server.xml @@ -50,4 +50,21 @@ https://www.vdm.io/ + + Sermon Distributor + A sermon distributor that links to Dropbox. + com_sermondistributor + component + 2.0.4 + https://www.vdm.io/ + + http://domain.com/demo.zip + + + stable + + Llewellyn van der Merwe + https://www.vdm.io/ + + \ No newline at end of file diff --git a/site/assets/css/api.css b/site/assets/css/api.css index 9b2ac84c..4d0bb55e 100644 --- a/site/assets/css/api.css +++ b/site/assets/css/api.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/categories.css b/site/assets/css/categories.css index 69ee2bfc..557a45a6 100644 --- a/site/assets/css/categories.css +++ b/site/assets/css/categories.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/category.css b/site/assets/css/category.css index c5224ac4..2f7d15c0 100644 --- a/site/assets/css/category.css +++ b/site/assets/css/category.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/preacher.css b/site/assets/css/preacher.css index e2969a0d..c25302b3 100644 --- a/site/assets/css/preacher.css +++ b/site/assets/css/preacher.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/preachers.css b/site/assets/css/preachers.css index 0a2b6850..58f0916a 100644 --- a/site/assets/css/preachers.css +++ b/site/assets/css/preachers.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/series.css b/site/assets/css/series.css index ad9bdc2c..251160e1 100644 --- a/site/assets/css/series.css +++ b/site/assets/css/series.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/serieslist.css b/site/assets/css/serieslist.css index 1e1dcefb..2ceb3eac 100644 --- a/site/assets/css/serieslist.css +++ b/site/assets/css/serieslist.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/sermon.css b/site/assets/css/sermon.css index 7cd91fe6..5b712d5e 100644 --- a/site/assets/css/sermon.css +++ b/site/assets/css/sermon.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/css/site.css b/site/assets/css/site.css index a04a4427..066beec3 100644 --- a/site/assets/css/site.css +++ b/site/assets/css/site.css @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* CSS Document */ diff --git a/site/assets/js/site.js b/site/assets/js/site.js index df7c43a0..4e3cb39d 100644 --- a/site/assets/js/site.js +++ b/site/assets/js/site.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ /* JS Document */ diff --git a/site/controller.php b/site/controller.php index ac225786..fb36baa5 100644 --- a/site/controller.php +++ b/site/controller.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/controllers/ajax.json.php b/site/controllers/ajax.json.php index 9bca9877..a9e9843e 100644 --- a/site/controllers/ajax.json.php +++ b/site/controllers/ajax.json.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/controllers/api.php b/site/controllers/api.php index 426a017e..52b07db0 100644 --- a/site/controllers/api.php +++ b/site/controllers/api.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/controllers/download.php b/site/controllers/download.php index fe8cb4b3..2ca967cc 100644 --- a/site/controllers/download.php +++ b/site/controllers/download.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/controllers/help.php b/site/controllers/help.php index 91364623..c17cfeb3 100644 --- a/site/controllers/help.php +++ b/site/controllers/help.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/helpers/category.php b/site/helpers/category.php index 04eb35c1..42ced7fd 100644 --- a/site/helpers/category.php +++ b/site/helpers/category.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/helpers/categorysermon.php b/site/helpers/categorysermon.php index 771d2484..2485aa84 100644 --- a/site/helpers/categorysermon.php +++ b/site/helpers/categorysermon.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/helpers/dropboxupdater.php b/site/helpers/dropboxupdater.php index f8352238..55b57cd5 100644 --- a/site/helpers/dropboxupdater.php +++ b/site/helpers/dropboxupdater.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php index ff5da52f..ffa6b0b8 100644 --- a/site/helpers/headercheck.php +++ b/site/helpers/headercheck.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/helpers/route.php b/site/helpers/route.php index 49915967..632b9eb7 100644 --- a/site/helpers/route.php +++ b/site/helpers/route.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/helpers/sermondistributor.php b/site/helpers/sermondistributor.php index 1cc81411..06db063b 100644 --- a/site/helpers/sermondistributor.php +++ b/site/helpers/sermondistributor.php @@ -17,15 +17,16 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; @@ -2018,9 +2019,9 @@ abstract class SermondistributorHelper /** * Change to nice fancy date */ - public static function fancyDate($date) + public static function fancyDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2030,9 +2031,9 @@ abstract class SermondistributorHelper /** * get date based in period past */ - public static function fancyDynamicDate($date) + public static function fancyDynamicDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2056,9 +2057,9 @@ abstract class SermondistributorHelper /** * Change to nice fancy day time and date */ - public static function fancyDayTimeDate($time) + public static function fancyDayTimeDate($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -2068,9 +2069,9 @@ abstract class SermondistributorHelper /** * Change to nice fancy time and date */ - public static function fancyDateTime($time) + public static function fancyDateTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -2080,9 +2081,9 @@ abstract class SermondistributorHelper /** * Change to nice hour:minutes time */ - public static function fancyTime($time) + public static function fancyTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -2092,9 +2093,9 @@ abstract class SermondistributorHelper /** * set the date day as Sunday through Saturday */ - public static function setDayName($date) + public static function setDayName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2104,9 +2105,9 @@ abstract class SermondistributorHelper /** * set the date month as January through December */ - public static function setMonthName($date) + public static function setMonthName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2116,9 +2117,9 @@ abstract class SermondistributorHelper /** * set the date day as 1st */ - public static function setDay($date) + public static function setDay($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2128,9 +2129,9 @@ abstract class SermondistributorHelper /** * set the date month as 5 */ - public static function setMonth($date) + public static function setMonth($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2140,9 +2141,9 @@ abstract class SermondistributorHelper /** * set the date year as 2004 (for charts) */ - public static function setYear($date) + public static function setYear($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2152,9 +2153,9 @@ abstract class SermondistributorHelper /** * set the date as 2004/05 (for charts) */ - public static function setYearMonth($date, $spacer = '/') + public static function setYearMonth($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -2164,15 +2165,27 @@ abstract class SermondistributorHelper /** * set the date as 2004/05/03 (for charts) */ - public static function setYearMonthDay($date, $spacer = '/') + public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } return date('Y' . $spacer . 'm' . $spacer . 'd', $date); } + /** + * set the date as 03/05/2004 + */ + public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true) + { + if ($check_stamp && !self::isValidTimeStamp($date)) + { + $date = strtotime($date); + } + return date('d' . $spacer . 'm' . $spacer . 'Y', $date); + } + /** * Check if string is a valid time stamp */ @@ -2183,6 +2196,16 @@ abstract class SermondistributorHelper && ($timestamp >= ~PHP_INT_MAX); } + /** + * Check if string is a valid date + * https://www.php.net/manual/en/function.checkdate.php#113205 + */ + public static function isValidateDate($date, $format = 'Y-m-d H:i:s') + { + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + /** * Workers to load tasks diff --git a/site/layouts/addtodropboxbutton.php b/site/layouts/addtodropboxbutton.php index bdd3550e..703658dd 100644 --- a/site/layouts/addtodropboxbutton.php +++ b/site/layouts/addtodropboxbutton.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/addtodropboxicon.php b/site/layouts/addtodropboxicon.php index 9983fec4..2b15cad0 100644 --- a/site/layouts/addtodropboxicon.php +++ b/site/layouts/addtodropboxicon.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/categorieslistitem.php b/site/layouts/categorieslistitem.php index 3280f8f1..e3399228 100644 --- a/site/layouts/categorieslistitem.php +++ b/site/layouts/categorieslistitem.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/categoriespanel.php b/site/layouts/categoriespanel.php index e5a69770..a7d1340d 100644 --- a/site/layouts/categoriespanel.php +++ b/site/layouts/categoriespanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/categoriesrow.php b/site/layouts/categoriesrow.php index 61d7e44f..58750d07 100644 --- a/site/layouts/categoriesrow.php +++ b/site/layouts/categoriesrow.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/downloadsermonbutton.php b/site/layouts/downloadsermonbutton.php index ebb20adf..63e81f92 100644 --- a/site/layouts/downloadsermonbutton.php +++ b/site/layouts/downloadsermonbutton.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/htmlfive.php b/site/layouts/htmlfive.php index 05e04299..2ab673bf 100644 --- a/site/layouts/htmlfive.php +++ b/site/layouts/htmlfive.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/isnew.php b/site/layouts/isnew.php index 695d61bd..27bc00c6 100644 --- a/site/layouts/isnew.php +++ b/site/layouts/isnew.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/jplayerbluemonday.php b/site/layouts/jplayerbluemonday.php index 320b3593..8c7f1f78 100644 --- a/site/layouts/jplayerbluemonday.php +++ b/site/layouts/jplayerbluemonday.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/jplayerbluemondaylist.php b/site/layouts/jplayerbluemondaylist.php index f5fdd238..2940703f 100644 --- a/site/layouts/jplayerbluemondaylist.php +++ b/site/layouts/jplayerbluemondaylist.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/mediaplayer.php b/site/layouts/mediaplayer.php index 02043e60..b7011642 100644 --- a/site/layouts/mediaplayer.php +++ b/site/layouts/mediaplayer.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/opensermonbutton.php b/site/layouts/opensermonbutton.php index 2384c95c..1233a0f1 100644 --- a/site/layouts/opensermonbutton.php +++ b/site/layouts/opensermonbutton.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/preacherslistitem.php b/site/layouts/preacherslistitem.php index d63e3685..928c2c33 100644 --- a/site/layouts/preacherslistitem.php +++ b/site/layouts/preacherslistitem.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/preacherspanel.php b/site/layouts/preacherspanel.php index c81dca37..6626fd90 100644 --- a/site/layouts/preacherspanel.php +++ b/site/layouts/preacherspanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/preachersrow.php b/site/layouts/preachersrow.php index 9928ef67..8a4aff64 100644 --- a/site/layouts/preachersrow.php +++ b/site/layouts/preachersrow.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/serieslistitem.php b/site/layouts/serieslistitem.php index b7fbe026..bab5a800 100644 --- a/site/layouts/serieslistitem.php +++ b/site/layouts/serieslistitem.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/seriespanel.php b/site/layouts/seriespanel.php index 833cb4a2..0f8fc12c 100644 --- a/site/layouts/seriespanel.php +++ b/site/layouts/seriespanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/seriesrow.php b/site/layouts/seriesrow.php index d83e6504..287fcb1c 100644 --- a/site/layouts/seriesrow.php +++ b/site/layouts/seriesrow.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/sermonslistitem.php b/site/layouts/sermonslistitem.php index e8e917bf..396dbc45 100644 --- a/site/layouts/sermonslistitem.php +++ b/site/layouts/sermonslistitem.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/sermonspanel.php b/site/layouts/sermonspanel.php index 8136b0e6..c8f789b2 100644 --- a/site/layouts/sermonspanel.php +++ b/site/layouts/sermonspanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/sermonsrow.php b/site/layouts/sermonsrow.php index fa4ea6a3..eae81e75 100644 --- a/site/layouts/sermonsrow.php +++ b/site/layouts/sermonsrow.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/layouts/soundmanagerthreesixty.php b/site/layouts/soundmanagerthreesixty.php index 622aba7d..62464398 100644 --- a/site/layouts/soundmanagerthreesixty.php +++ b/site/layouts/soundmanagerthreesixty.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/ajax.php b/site/models/ajax.php index 4f87a609..e046bff6 100644 --- a/site/models/ajax.php +++ b/site/models/ajax.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/api.php b/site/models/api.php index d1364673..962483d6 100644 --- a/site/models/api.php +++ b/site/models/api.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/categories.php b/site/models/categories.php index 774ae5af..7527af70 100644 --- a/site/models/categories.php +++ b/site/models/categories.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/category.php b/site/models/category.php index 71f0fb03..aa2d191b 100644 --- a/site/models/category.php +++ b/site/models/category.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/preacher.php b/site/models/preacher.php index ac88af07..438de89e 100644 --- a/site/models/preacher.php +++ b/site/models/preacher.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/preachers.php b/site/models/preachers.php index 9ac6fa16..461d6c2a 100644 --- a/site/models/preachers.php +++ b/site/models/preachers.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/series.php b/site/models/series.php index 132138ad..85ade26d 100644 --- a/site/models/series.php +++ b/site/models/series.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/serieslist.php b/site/models/serieslist.php index f89c9b91..6d508fa3 100644 --- a/site/models/serieslist.php +++ b/site/models/serieslist.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/models/sermon.php b/site/models/sermon.php index a7f00e14..89cab3d8 100644 --- a/site/models/sermon.php +++ b/site/models/sermon.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file @@ -203,7 +203,7 @@ class SermondistributorModelSermon extends JModelItem if ($e->getCode() == 404) { // Need to go thru the error handler to allow Redirect to work. - JError::raiseWaring(404, $e->getMessage()); + JError::raiseWarning(404, $e->getMessage()); } else { diff --git a/site/router.php b/site/router.php index 4512568f..7769a865 100644 --- a/site/router.php +++ b/site/router.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/sermondistributor.php b/site/sermondistributor.php index 95e52903..c40bf64a 100644 --- a/site/sermondistributor.php +++ b/site/sermondistributor.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/api/submitbutton.js b/site/views/api/submitbutton.js index e4625486..51fa3eb3 100644 --- a/site/views/api/submitbutton.js +++ b/site/views/api/submitbutton.js @@ -16,9 +16,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ Joomla.submitbutton = function(task) diff --git a/site/views/api/tmpl/default.php b/site/views/api/tmpl/default.php index 401c985d..b651c8b5 100644 --- a/site/views/api/tmpl/default.php +++ b/site/views/api/tmpl/default.php @@ -17,14 +17,15 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + ?>
diff --git a/site/views/api/view.html.php b/site/views/api/view.html.php index 1da4194d..ef38bcc5 100644 --- a/site/views/api/view.html.php +++ b/site/views/api/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/categories/tmpl/default.php b/site/views/categories/tmpl/default.php index 0e1f1570..4f46c001 100644 --- a/site/views/categories/tmpl/default.php +++ b/site/views/categories/tmpl/default.php @@ -17,17 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); + + // Set the heading of the page $heading = ($this->params->get('page_heading')) ? $this->params->get('page_heading'):(isset($this->menu->title)) ? $this->menu->title:''; - ?>
params->get('show_page_heading')): ?> diff --git a/site/views/categories/tmpl/default_categories-grid.php b/site/views/categories/tmpl/default_categories-grid.php index 9849dffe..b4dd81f6 100644 --- a/site/views/categories/tmpl/default_categories-grid.php +++ b/site/views/categories/tmpl/default_categories-grid.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/categories/tmpl/default_categories-list.php b/site/views/categories/tmpl/default_categories-list.php index 34f26f5d..1674dc56 100644 --- a/site/views/categories/tmpl/default_categories-list.php +++ b/site/views/categories/tmpl/default_categories-list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/categories/tmpl/default_categories-table.php b/site/views/categories/tmpl/default_categories-table.php index 41901a25..25c6a373 100644 --- a/site/views/categories/tmpl/default_categories-table.php +++ b/site/views/categories/tmpl/default_categories-table.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/categories/view.html.php b/site/views/categories/view.html.php index c6d17391..6c4d2a9b 100644 --- a/site/views/categories/view.html.php +++ b/site/views/categories/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/tmpl/default.php b/site/views/category/tmpl/default.php index 6293946a..52dfafc8 100644 --- a/site/views/category/tmpl/default.php +++ b/site/views/category/tmpl/default.php @@ -17,14 +17,15 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + ?> category): ?> diff --git a/site/views/category/tmpl/default.xml b/site/views/category/tmpl/default.xml index 3d4cf875..87abfd1c 100644 --- a/site/views/category/tmpl/default.xml +++ b/site/views/category/tmpl/default.xml @@ -16,7 +16,7 @@ type="category" name="id" label="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_REQUEST_ID_LABEL" - extension="com_sermondistributor.sermons" + extension="com_sermondistributor.sermon" required="false" default="" description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_REQUEST_ID_DESCRIPTION" diff --git a/site/views/category/tmpl/default_categorybox.php b/site/views/category/tmpl/default_categorybox.php index 67cfa861..f8c097c3 100644 --- a/site/views/category/tmpl/default_categorybox.php +++ b/site/views/category/tmpl/default_categorybox.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/tmpl/default_categorypanel.php b/site/views/category/tmpl/default_categorypanel.php index 4bacaa62..af2eddf0 100644 --- a/site/views/category/tmpl/default_categorypanel.php +++ b/site/views/category/tmpl/default_categorypanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/tmpl/default_categorysmall.php b/site/views/category/tmpl/default_categorysmall.php index 864ed6f2..fc746157 100644 --- a/site/views/category/tmpl/default_categorysmall.php +++ b/site/views/category/tmpl/default_categorysmall.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/tmpl/default_sermons-grid.php b/site/views/category/tmpl/default_sermons-grid.php index 5cef22f2..759417e9 100644 --- a/site/views/category/tmpl/default_sermons-grid.php +++ b/site/views/category/tmpl/default_sermons-grid.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/tmpl/default_sermons-list.php b/site/views/category/tmpl/default_sermons-list.php index 31c8e369..72839c2a 100644 --- a/site/views/category/tmpl/default_sermons-list.php +++ b/site/views/category/tmpl/default_sermons-list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/tmpl/default_sermons-table.php b/site/views/category/tmpl/default_sermons-table.php index 6bb77aeb..1ce77e83 100644 --- a/site/views/category/tmpl/default_sermons-table.php +++ b/site/views/category/tmpl/default_sermons-table.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/category/view.html.php b/site/views/category/view.html.php index 87205840..b91b9111 100644 --- a/site/views/category/view.html.php +++ b/site/views/category/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/tmpl/default.php b/site/views/preacher/tmpl/default.php index dcb19947..1fbcf7c2 100644 --- a/site/views/preacher/tmpl/default.php +++ b/site/views/preacher/tmpl/default.php @@ -17,14 +17,15 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + ?> preacher): ?> diff --git a/site/views/preacher/tmpl/default_preacherbox.php b/site/views/preacher/tmpl/default_preacherbox.php index f7187496..fdbc1d34 100644 --- a/site/views/preacher/tmpl/default_preacherbox.php +++ b/site/views/preacher/tmpl/default_preacherbox.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/tmpl/default_preacherpanel.php b/site/views/preacher/tmpl/default_preacherpanel.php index 01a12777..cc50edba 100644 --- a/site/views/preacher/tmpl/default_preacherpanel.php +++ b/site/views/preacher/tmpl/default_preacherpanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/tmpl/default_preachersmall.php b/site/views/preacher/tmpl/default_preachersmall.php index 0a8d1c8d..2aae2e82 100644 --- a/site/views/preacher/tmpl/default_preachersmall.php +++ b/site/views/preacher/tmpl/default_preachersmall.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/tmpl/default_sermons-grid.php b/site/views/preacher/tmpl/default_sermons-grid.php index 69f995c6..a654d677 100644 --- a/site/views/preacher/tmpl/default_sermons-grid.php +++ b/site/views/preacher/tmpl/default_sermons-grid.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/tmpl/default_sermons-list.php b/site/views/preacher/tmpl/default_sermons-list.php index fe957f42..a3ff6faa 100644 --- a/site/views/preacher/tmpl/default_sermons-list.php +++ b/site/views/preacher/tmpl/default_sermons-list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/tmpl/default_sermons-table.php b/site/views/preacher/tmpl/default_sermons-table.php index 9cdb4cf8..1ec9902a 100644 --- a/site/views/preacher/tmpl/default_sermons-table.php +++ b/site/views/preacher/tmpl/default_sermons-table.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preacher/view.html.php b/site/views/preacher/view.html.php index 6c638943..505ca268 100644 --- a/site/views/preacher/view.html.php +++ b/site/views/preacher/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preachers/tmpl/default.php b/site/views/preachers/tmpl/default.php index bf984701..e79f97ed 100644 --- a/site/views/preachers/tmpl/default.php +++ b/site/views/preachers/tmpl/default.php @@ -17,17 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); + + // Set the heading of the page $heading = ($this->params->get('page_heading')) ? $this->params->get('page_heading'):(isset($this->menu->title)) ? $this->menu->title:''; - ?> params->get('show_page_heading')): ?> diff --git a/site/views/preachers/tmpl/default_preachers-grid.php b/site/views/preachers/tmpl/default_preachers-grid.php index 00558508..f37bfab5 100644 --- a/site/views/preachers/tmpl/default_preachers-grid.php +++ b/site/views/preachers/tmpl/default_preachers-grid.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preachers/tmpl/default_preachers-list.php b/site/views/preachers/tmpl/default_preachers-list.php index 80d9b44f..df02f3ee 100644 --- a/site/views/preachers/tmpl/default_preachers-list.php +++ b/site/views/preachers/tmpl/default_preachers-list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preachers/tmpl/default_preachers-table.php b/site/views/preachers/tmpl/default_preachers-table.php index 06f4aca8..1529560b 100644 --- a/site/views/preachers/tmpl/default_preachers-table.php +++ b/site/views/preachers/tmpl/default_preachers-table.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/preachers/view.html.php b/site/views/preachers/view.html.php index 4820b9da..0a8eb6d1 100644 --- a/site/views/preachers/view.html.php +++ b/site/views/preachers/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/tmpl/default.php b/site/views/series/tmpl/default.php index c6f2b048..ba449709 100644 --- a/site/views/series/tmpl/default.php +++ b/site/views/series/tmpl/default.php @@ -17,14 +17,15 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + ?> series): ?> diff --git a/site/views/series/tmpl/default_seriesbox.php b/site/views/series/tmpl/default_seriesbox.php index aabc2dc0..899cd363 100644 --- a/site/views/series/tmpl/default_seriesbox.php +++ b/site/views/series/tmpl/default_seriesbox.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/tmpl/default_seriespanel.php b/site/views/series/tmpl/default_seriespanel.php index 4ec189bc..68d95cb4 100644 --- a/site/views/series/tmpl/default_seriespanel.php +++ b/site/views/series/tmpl/default_seriespanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/tmpl/default_seriessmall.php b/site/views/series/tmpl/default_seriessmall.php index fd3409ff..2ee985fe 100644 --- a/site/views/series/tmpl/default_seriessmall.php +++ b/site/views/series/tmpl/default_seriessmall.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/tmpl/default_sermons-grid.php b/site/views/series/tmpl/default_sermons-grid.php index 2da8c618..71003496 100644 --- a/site/views/series/tmpl/default_sermons-grid.php +++ b/site/views/series/tmpl/default_sermons-grid.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/tmpl/default_sermons-list.php b/site/views/series/tmpl/default_sermons-list.php index 016712f8..0289d851 100644 --- a/site/views/series/tmpl/default_sermons-list.php +++ b/site/views/series/tmpl/default_sermons-list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/tmpl/default_sermons-table.php b/site/views/series/tmpl/default_sermons-table.php index d7778d51..4cee8835 100644 --- a/site/views/series/tmpl/default_sermons-table.php +++ b/site/views/series/tmpl/default_sermons-table.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/series/view.html.php b/site/views/series/view.html.php index 5d15a5c7..1b483cf6 100644 --- a/site/views/series/view.html.php +++ b/site/views/series/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/serieslist/tmpl/default.php b/site/views/serieslist/tmpl/default.php index 8a9245e0..f9005968 100644 --- a/site/views/serieslist/tmpl/default.php +++ b/site/views/serieslist/tmpl/default.php @@ -17,17 +17,18 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file -defined('_JEXEC') or die('Restricted access'); +defined('_JEXEC') or die('Restricted access'); + + // Set the heading of the page $heading = ($this->params->get('page_heading')) ? $this->params->get('page_heading'):(isset($this->menu->title)) ? $this->menu->title:''; - ?> params->get('show_page_heading')): ?> diff --git a/site/views/serieslist/tmpl/default_series-grid.php b/site/views/serieslist/tmpl/default_series-grid.php index bdb3008a..55521f25 100644 --- a/site/views/serieslist/tmpl/default_series-grid.php +++ b/site/views/serieslist/tmpl/default_series-grid.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/serieslist/tmpl/default_series-list.php b/site/views/serieslist/tmpl/default_series-list.php index a2b695b2..82eb67f7 100644 --- a/site/views/serieslist/tmpl/default_series-list.php +++ b/site/views/serieslist/tmpl/default_series-list.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/serieslist/tmpl/default_series-table.php b/site/views/serieslist/tmpl/default_series-table.php index 09664e05..c41ad695 100644 --- a/site/views/serieslist/tmpl/default_series-table.php +++ b/site/views/serieslist/tmpl/default_series-table.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/serieslist/view.html.php b/site/views/serieslist/view.html.php index b1ee5ce2..0a7043e6 100644 --- a/site/views/serieslist/view.html.php +++ b/site/views/serieslist/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/sermon/tmpl/default.php b/site/views/sermon/tmpl/default.php index 9b05b806..2a5b9d86 100644 --- a/site/views/sermon/tmpl/default.php +++ b/site/views/sermon/tmpl/default.php @@ -17,14 +17,15 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); + ?> item): ?> diff --git a/site/views/sermon/tmpl/default_sermonbig.php b/site/views/sermon/tmpl/default_sermonbig.php index 1967df8e..0f42874c 100644 --- a/site/views/sermon/tmpl/default_sermonbig.php +++ b/site/views/sermon/tmpl/default_sermonbig.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/sermon/tmpl/default_sermonbox.php b/site/views/sermon/tmpl/default_sermonbox.php index 24faf3ec..3eaf3b0c 100644 --- a/site/views/sermon/tmpl/default_sermonbox.php +++ b/site/views/sermon/tmpl/default_sermonbox.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/sermon/tmpl/default_sermonpanel.php b/site/views/sermon/tmpl/default_sermonpanel.php index 0bf1bfdb..78e9f928 100644 --- a/site/views/sermon/tmpl/default_sermonpanel.php +++ b/site/views/sermon/tmpl/default_sermonpanel.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file diff --git a/site/views/sermon/view.html.php b/site/views/sermon/view.html.php index 9481567b..191d059a 100644 --- a/site/views/sermon/view.html.php +++ b/site/views/sermon/view.html.php @@ -17,9 +17,9 @@ @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - + A sermon distributor that links to Dropbox. - + /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file