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 @@
-
-
+
+
\ 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'))) : ?>
|