Compare commits

...

16 Commits

Author SHA1 Message Date
Robot 304c0cd388
Stable release of v3.0.3
Removed the not_required field from the sermon model. #36.
2024-02-11 19:24:51 +02:00
Robot 3bca4fe609
Stable release of v3.0.2
Add the HTML class to the site default layout.
2024-02-10 13:39:52 +02:00
Robot e63079caff
Stable release of v3.0.0
Moved all classes to 'use' classes away from JText format. Build with new JCB 3.1.31 beta.
2024-02-10 11:13:31 +02:00
Llewellyn van der Merwe b40bc5b293
Upgraded to JCB 3.1.24 2023-05-29 14:29:14 +02:00
Llewellyn van der Merwe 1869c940d3
Upgraded to JCB 3.1.0 2022-05-27 07:37:27 +02:00
Llewellyn van der Merwe 2aa520e444
update 2022-03-03 05:49:35 +02:00
Llewellyn van der Merwe 02a60ab714
Upgraded to JCB v2.12.10 2021-08-16 19:11:44 +02:00
Llewellyn van der Merwe b72b3d5048
Upgraded to JCB v2.12.6 2021-02-07 05:15:42 +02:00
Llewellyn van der Merwe 6ea9166076
Fix the site view category query of all categories. Adds another demo website to the readme. 2021-01-15 09:27:24 +02:00
Llewellyn van der Merwe 5c79ef23e0
Updated the update path of the update server zip download. 2021-01-15 08:44:49 +02:00
Llewellyn van der Merwe 1b5191d62c
Added the new trash helper layout. Improves the access filter array state control. Adds the empty hidden title field for the permissions fix in the views, that fixes the ajax call for permissions change/save in the back-end. Moves the filter empty option outside the result loop, so that an empty option will show even if there is not items found. Fixes the database adaptation of the assets table. Removes empty access control tabs. 2020-12-31 13:53:20 +02:00
Llewellyn van der Merwe 152026d4d1
Addes more support for array values in the filter area. 2020-12-31 13:43:18 +02:00
Llewellyn van der Merwe 10946ba899
Fixed the access filter in query. Fixed the array to int helper use. Added the correct language strings to category and access filters. 2020-12-03 02:15:39 +02:00
Llewellyn van der Merwe e726e758b4
Move all filters in the views to have the filters above the admin list view. (JCB improvement gh-378)
Add the new donation information to README.
Update the Repo URLs to point to Llewellyn's repo instead.
Improve the date methods in the Helper class. (JCB improvement)
Add a fix to the import export methods. (JCB improvement)
2020-11-30 19:17:42 +02:00
Emmanuel Danan 5d3cb3dde8 Fixed a bug. Forgot to disable the single access filter (it's now multiple) 2020-11-12 15:54:42 +01:00
Emmanuel Danan c153288f78 Modifying the sermons admin view to put the filters on top. 2020-11-12 14:51:05 +01:00
411 changed files with 47885 additions and 41923 deletions

69
.octojpack Normal file
View File

@ -0,0 +1,69 @@
{
"global": {
"packager": "Vast Development Method",
"packager_url": "https://dev.vdm.io/",
"url": "git.vdm.dev",
"api": "https://git.vdm.dev/api/v1"
},
"package": {
"name": "PKG_SERMONDISTRIBUTOR",
"code_name": "sermondistributor",
"package_name": "pkg_sermondistributor",
"min_joomla_version": "3.8",
"max_joomla_version": "3.10",
"copyright": "Copyright (C) 2015 Llewellyn van der Merwe. All rights reserved.",
"copyright_year": "2015",
"license": "GNU General Public License version 2; see LICENSE",
"license_file": "LICENSE",
"author": "Llewellyn van der Merwe",
"author_email": "joomla@vdm.io",
"author_url": "https://io.vdm.dev/",
"description": "The Sermon Distributor.",
"version_id": "com_sermondistributor",
"update_servers": "https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/sermondistributor_update_server.xml"
},
"repository": {
"owner": "christian",
"repo": "pkg-sermondistributor"
},
"files": [
{
"owner": "christian",
"repo": "Joomla-Sermon-Distributor",
"id": "com_sermondistributor",
"type": "component",
"mode": "master"
},
{
"owner": "christian",
"repo": "mod_dailylight",
"id": "mod_dailylight",
"type": "module",
"client": "site",
"mode": "master"
},
{
"owner": "christian",
"repo": "mod_dailyscripture",
"id": "mod_dailyscripture",
"type": "module",
"client": "site",
"mode": "master"
}
],
"languages": [
{
"tag": "en-GB",
"ini": "sys.ini",
"key": "PKG_SERMONDISTRIBUTOR",
"value": "Sermon Distributor Package"
},
{
"tag": "en-GB",
"ini": "ini",
"key": "PKG_SERMONDISTRIBUTOR",
"value": "Sermon Distributor Package"
}
]
}

20
CHANGELOG.md Normal file
View File

@ -0,0 +1,20 @@
# v3.0.3
- Removed the not_required field from the sermon model. #36
# v3.0.2
- Add the HTML class to the site default layout.
# v3.0.1
- Fix missing ComponentHelper class in localfiles field type.
# v3.0.0
- Moved all classes to 'use' classes away from JText format.
- Build with new JCB 3.1.31 beta
# v2.1.1
- Moved over to a Joomla Package

View File

@ -1,16 +1,17 @@
# Sermon Distributor (2.0.x)
# Sermon Distributor (3.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://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/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.
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip)
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/archive/master.zip)
**If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)**
### Example Website, That Has Over 6000 Audio Files
[LoudVoice.org](http://www.loudvoice.org)
[TrueChristian.Church](https://truechristian.church/)
### Some Video Demonstrations
@ -23,45 +24,38 @@ 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
+ *Version*: 2.0.x
+ *Last Build*: 11th February, 2024
+ *Version*: 3.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 -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))
**243 Hours** or **30 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (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**
+ *Folder count*: **93**
+ *Line count*: **87039**
+ *File count*: **595**
+ *Folder count*: **113**
**128 Hours** or **16 Eight Hour Days** (the actual time the author spent)
**160 Hours** or **20 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 @61hours** = codingtime / 4;
> **planning @35hours** = codingtime / 7;
> **mapping @24hours** = codingtime / 10;
> **office @40hours** = codingtime / 6;)
**321 Hours** or **40 Eight Hour Days**
**403 Hours** or **50 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: **10 weeks** or **2.1 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
Come on buy me a coffee :)
* PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm)
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -1,16 +1,17 @@
# Sermon Distributor (2.0.x)
# Sermon Distributor (3.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://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/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.
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip)
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/archive/master.zip)
**If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)**
### Example Website, That Has Over 6000 Audio Files
[LoudVoice.org](http://www.loudvoice.org)
[TrueChristian.Church](https://truechristian.church/)
### Some Video Demonstrations
@ -23,45 +24,38 @@ 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
+ *Version*: 2.0.x
+ *Last Build*: 11th February, 2024
+ *Version*: 3.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 -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))
**243 Hours** or **30 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (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**
+ *Folder count*: **93**
+ *Line count*: **87039**
+ *File count*: **595**
+ *Folder count*: **113**
**128 Hours** or **16 Eight Hour Days** (the actual time the author spent)
**160 Hours** or **20 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 @61hours** = codingtime / 4;
> **planning @35hours** = codingtime / 7;
> **mapping @24hours** = codingtime / 10;
> **office @40hours** = codingtime / 6;)
**321 Hours** or **40 Eight Hour Days**
**403 Hours** or **50 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: **10 weeks** or **2.1 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
Come on buy me a coffee :)
* PayPal: [paypal.me/payvdm](https://www.paypal.me/payvdm)
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css
@ -24,153 +24,153 @@
/* CSS Document */
.dashboard-container {
margin-left: 10px;
margin-top: 10px;
width: 100%;
margin-left: 10px;
margin-top: 10px;
width: 100%;
}
.dashboard-container [class*="span"] {
display: block;
float: none;
margin-left: 0;
width: auto;
display: block;
float: none;
margin-left: 0;
width: auto;
}
.dashboard-container:before, .dashboard-container:after {
content: "";
display: table;
content: "";
display: table;
}
.dashboard-container:after {
clear: both;
clear: both;
}
.dashboard-container [class*="span"] {
box-sizing: border-box;
display: block;
float: left;
min-height: 145px;
min-width: 96px;
width: 100%;
box-sizing: border-box;
display: block;
float: left;
min-height: 145px;
min-width: 96px;
width: 100%;
}
.dashboard-container [class*="span"]:first-child {
margin-left: 0;
margin-left: 0;
}
.dashboard-wraper {
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px;
float: left;
margin: 1%;
padding: 3px;
width: 17%;
min-height: 194px;
min-width: 96px;
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px;
float: left;
margin: 1%;
padding: 3px;
width: 17%;
min-height: 194px;
min-width: 96px;
}
.dashboard-content a {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
min-height: 89px;
padding: 10px;
text-align: center;
text-decoration: none;
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
min-height: 89px;
padding: 10px;
text-align: center;
text-decoration: none;
}
.dashboard-content a:hover {
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%);
text-decoration: none;
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%);
text-decoration: none;
}
.dashboard-title {
display: block;
padding-top: 5px;
display: block;
padding-top: 5px;
}
.dashboard-info {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
font-size: 12px;
padding: 10px;
text-align: center;
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
font-size: 12px;
padding: 10px;
text-align: center;
}
.dashboard-info span {
display: block;
text-align: center;
display: block;
text-align: center;
}
.dashboard-info img {
margin: 0 auto;
margin: 0 auto;
}
.dashboard-table {
border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px;
width: 100%;
border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px;
width: 100%;
}
.dashboard-info h5 {
font-size: 11px;
font-weight: bold;
font-size: 11px;
font-weight: bold;
}
.dashboard-block {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px;
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px;
}
.dashboard-block .dashboard-block-head {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px;
position: relative;
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px;
position: relative;
}
.dashboard-block .dashboard-block-head h5 {
font-size: 12px;
margin: 0;
padding-left: 10px;
padding-top: 11px;
text-transform: uppercase;
font-size: 12px;
margin: 0;
padding-left: 10px;
padding-top: 11px;
text-transform: uppercase;
}
.dashboard-block .dashboard-block-content {
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px;
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px;
}
.dashboard-block .dashboard-block-box {
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
}
.dashboard-block .dashboard-block-content .dashboard-block-box {
margin-top: 0 !important;
margin-top: 0 !important;
}
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}
.dashboard-block-table {
background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
width: 100%;
background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
width: 100%;
}
.dashboard-block-table th, .dashboard-block-table td {
border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px;
padding: 5px;
text-align: left;
vertical-align: middle;
border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px;
padding: 5px;
text-align: left;
vertical-align: middle;
}
.dashboard-badge {
background-color: hsl(0, 0%, 60%);
border-radius: 9px;
color: hsl(0, 0%, 100%);
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline;
white-space: nowrap;
background-color: hsl(0, 0%, 60%);
border-radius: 9px;
color: hsl(0, 0%, 100%);
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline;
white-space: nowrap;
}

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listing.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.js

View File

@ -60,8 +60,8 @@
last="50000"
step="10"
/>
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<!-- Spacer_hr_4 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_4" hr="true" class="spacer_hr_4" />
<field name="autorTitle"
type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"
@ -301,6 +301,18 @@
name="uikit_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_DESC">
<field name="add_jquery_framework"
type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD_DESC"
class="btn-group btn-group-yesno"
default="">
<!-- Option Set. -->
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_REMOVE</option>"
<option value="1">
COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD</option>"
</field>
<field name="uikit_version"
type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_LABEL"
@ -393,7 +405,7 @@
<option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER</option>
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_HTML_FIVE_BASIC</option>
COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC</option>
</field>
</fieldset>
<fieldset
@ -917,8 +929,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Spacer_hr_1 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_1" hr="true" class="spacer_hr_1" />
<!-- Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1352,8 +1364,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Spacer_hr_2 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_2" hr="true" class="spacer_hr_2" />
<!-- Category_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1787,8 +1799,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Spacer_hr_3 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_3" hr="true" class="spacer_hr_3" />
<!-- Series_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php
@ -25,12 +25,17 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
/**
* General Controller of Sermondistributor component
*/
class SermondistributorController extends JControllerLegacy
class SermondistributorController extends BaseController
{
/**
* Constructor.
@ -41,7 +46,7 @@ class SermondistributorController extends JControllerLegacy
*
* @since 3.0
*/
public function __construct($config = array())
public function __construct($config = [])
{
// set the default view
$config['default_view'] = 'sermondistributor';
@ -57,38 +62,38 @@ class SermondistributorController extends JControllerLegacy
function display($cachable = false, $urlparams = false)
{
// set default view if not set
$view = $this->input->getCmd('view', 'sermondistributor');
$data = $this->getViewRelation($view);
$layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id');
$view = $this->input->getCmd('view', 'sermondistributor');
$data = $this->getViewRelation($view);
$layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id');
// Check for edit form.
if(SermondistributorHelper::checkArray($data))
if(UtilitiesArrayHelper::check($data))
{
if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_sermondistributor.edit.'.$data['view'], $id))
{
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setMessage($this->getError(), 'error');
// check if item was opend from other then its own list view
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
// set redirect
if ($refid > 0 && SermondistributorHelper::checkString($ref))
if ($refid > 0 && StringHelper::check($ref))
{
// redirect to item of ref
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
}
elseif (SermondistributorHelper::checkString($ref))
elseif (StringHelper::check($ref))
{
// redirect to ref
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.(string)$ref, false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.(string)$ref, false));
}
else
{
// normal redirect back to the list view
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.$data['views'], false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.$data['views'], false));
}
return false;
@ -101,7 +106,7 @@ class SermondistributorController extends JControllerLegacy
protected function getViewRelation($view)
{
// check the we have a value
if (SermondistributorHelper::checkString($view))
if (StringHelper::check($view))
{
// the view relationships
$views = array(

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php
@ -25,20 +25,25 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
* Sermondistributor Ajax Controller
* Sermondistributor Ajax Base Controller
*/
class SermondistributorControllerAjax extends JControllerLegacy
class SermondistributorControllerAjax extends BaseController
{
public function __construct($config)
{
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
JResponse::setHeader("Access-Control-Allow-Origin", "*");
Factory::getDocument()->setMimeEncoding( 'application/json' );
// get the application
$app = Factory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
@ -50,30 +55,44 @@ class SermondistributorControllerAjax extends JControllerLegacy
public function ajax()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
// get the user for later use
$user = Factory::getUser();
// get the input values
$jinput = Factory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task
$task = $this->getTask();
switch($task)
{
case 'isNew':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->isNew($noticeValue);
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->isNew($noticeValue);
}
else
{
$result = false;
}
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -86,12 +105,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(\Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -101,17 +124,24 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'isRead':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->isRead($noticeValue);
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->isRead($noticeValue);
}
else
{
$result = false;
}
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -124,12 +154,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(\Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -139,18 +173,25 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getBuildTable':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idNameValue = $jinput->get('idName', NULL, 'WORD');
$ojectValue = $jinput->get('oject', NULL, 'STRING');
if($idNameValue && $user->id != 0 && $ojectValue)
{
$result = $this->getModel('ajax')->getBuildTable($idNameValue, $ojectValue);
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getBuildTable($idNameValue, $ojectValue);
}
else
{
$result = false;
}
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -163,12 +204,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(\Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -178,17 +223,24 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getSourceStatus':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getSourceStatus($idValue);
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getSourceStatus($idValue);
}
else
{
$result = false;
}
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -201,12 +253,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(\Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -216,17 +272,24 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getCronPath':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$getTypeValue = $jinput->get('getType', NULL, 'WORD');
if($getTypeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getCronPath($getTypeValue);
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getCronPath($getTypeValue);
}
else
{
$result = false;
}
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -239,12 +302,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(\Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -254,20 +321,27 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'updateLocalListingExternal':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT');
$sleutelValue = $jinput->get('sleutel', NULL, 'CMD');
if($idValue && $user->id != 0 && $targetValue && $typeValue && $sleutelValue)
{
$result = $this->getModel('ajax')->updateLocalListingExternal($idValue, $targetValue, $typeValue, $sleutelValue);
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->updateLocalListingExternal($idValue, $targetValue, $typeValue, $sleutelValue);
}
else
{
$result = false;
}
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -280,12 +354,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(\Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -296,10 +374,15 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
else
{
if($callback = $jinput->get('callback', null, 'CMD'))
// return to a callback function
if($callback)
{
echo $callback."(".json_encode(false).");";
}
elseif($returnRaw)
{
echo json_encode(false);
}
else
{
echo "(".json_encode(false).");";

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* External_source Controller
* External_source Form Controller
*/
class SermondistributorControllerExternal_source extends JControllerForm
class SermondistributorControllerExternal_source extends FormController
{
/**
* Current or most recently performed task.
@ -48,7 +55,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'External_sources'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
@ -57,26 +64,26 @@ class SermondistributorControllerExternal_source extends JControllerForm
public function clearLocalListing()
{
// Check for request forgeries.
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// get the data
$originalData = $this->input->post->get('jform', array(), 'array');
if (isset($originalData['id']) && $originalData['id'] > 0)
{
// get the needed
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
$app = Factory::getApplication();
$lang = Factory::getLanguage();
$model = $this->getModel();
$user = JFactory::getUser();
$user = Factory::getUser();
$context = "$this->option.edit.$this->context";
if (!$user->authorise('external_source.clear_local_listing', 'com_sermondistributor'))
{
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING'), 'error');
$app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING'), 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
@ -88,12 +95,12 @@ class SermondistributorControllerExternal_source extends JControllerForm
if (!$cleared)
{
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_NOT_CLEARED'), 'error');
$app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_NOT_CLEARED'), 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
@ -101,23 +108,23 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false;
}
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_CLEARED_SUCCESSFULLY'), 'success');
$app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_CLEARED_SUCCESSFULLY'), 'success');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return true;
}
$this->setError(JText::_('COM_SERMONDISTRIBUTOR_CLEARING_LOCAL_LISTING_CAN_NOT_BE_DONE'));
$this->setError(Text::_('COM_SERMONDISTRIBUTOR_CLEARING_LOCAL_LISTING_CAN_NOT_BE_DONE'));
$this->setMessage($this->getError(), 'error');
// Redirect back to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
@ -128,26 +135,26 @@ class SermondistributorControllerExternal_source extends JControllerForm
public function resetUpdateStatus()
{
// Check for request forgeries.
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// get the data
$originalData = $this->input->post->get('jform', array(), 'array');
if (isset($originalData['id']) && $originalData['id'] > 0)
{
// get the needed
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
$app = Factory::getApplication();
$lang = Factory::getLanguage();
$model = $this->getModel();
$user = JFactory::getUser();
$user = Factory::getUser();
$context = "$this->option.edit.$this->context";
if (!$user->authorise('external_source.reset_update_status', 'com_sermondistributor'))
{
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS'), 'error');
$app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS'), 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
@ -164,7 +171,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
@ -172,23 +179,23 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false;
}
// reset update status success
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL'), 'success');
$app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL'), 'success');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return true;
}
$this->setError(JText::_('COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE'));
$this->setError(Text::_('COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE'));
$this->setMessage($this->getError(), 'error');
// Redirect back to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
@ -196,7 +203,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false;
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -205,10 +212,10 @@ class SermondistributorControllerExternal_source extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('external_source.access', 'com_sermondistributor');
if (!$access)
@ -216,7 +223,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('external_source.create', $this->option);
}
@ -230,16 +237,16 @@ class SermondistributorControllerExternal_source extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $recordId) && $user->authorise('external_source.access', 'com_sermondistributor'));
$access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $recordId) && $user->authorise('external_source.access', 'com_sermondistributor'));
if (!$access)
{
return false;
@ -304,12 +311,12 @@ class SermondistributorControllerExternal_source extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -326,13 +333,13 @@ class SermondistributorControllerExternal_source extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('External_source', '', array());
$model = $this->getModel('External_source', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -357,13 +364,13 @@ class SermondistributorControllerExternal_source extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -374,7 +381,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -385,7 +392,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -411,7 +418,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -429,29 +436,29 @@ class SermondistributorControllerExternal_source extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -463,16 +470,15 @@ class SermondistributorControllerExternal_source extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* External_sources Controller
* External_sources Admin Controller
*/
class SermondistributorControllerExternal_sources extends JControllerAdmin
class SermondistributorControllerExternal_sources extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerExternal_sources extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('external_source.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('External_sources');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'External_sources_'.$date->format('jS_F_Y'),'External sources exported ('.$date->format('jS F, Y').')','external sources');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerExternal_sources extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('external_source.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('External_sources');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('external_source_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'external_sources');
$session->set('dataType_VDM_IMPORTINTO', 'external_source');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php
@ -25,12 +25,16 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
* Sermondistributor Help Controller
* Sermondistributor Help Base Controller
*/
class SermondistributorControllerHelp extends JControllerLegacy
class SermondistributorControllerHelp extends BaseController
{
public function __construct($config)
{
@ -41,12 +45,12 @@ class SermondistributorControllerHelp extends JControllerLegacy
public function help()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
$user = Factory::getUser();
$jinput = Factory::getApplication()->input;
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && $token == $call_token)
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
{
$task = $this->getTask();
switch($task){
@ -74,7 +78,7 @@ class SermondistributorControllerHelp extends JControllerLegacy
break;
}
}
else
else
{
// stop execution gracefully
jexit();
@ -83,8 +87,8 @@ class SermondistributorControllerHelp extends JControllerLegacy
protected function getHelpDocumentText($id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__sermondistributor_help_document AS a');
$query->where('a.id = '.(int) $id);
@ -93,21 +97,21 @@ class SermondistributorControllerHelp extends JControllerLegacy
$db->execute();
if($db->getNumRows())
{
$text = array();
$text = [];
$document = $db->loadObject();
// fix image issue
$images['src="images'] = 'src="'.JURI::root().'images';
$images["src='images"] = "src='".JURI::root()."images";
$images['src="/images'] = 'src="'.JURI::root().'images';
$images["src='/images"] = "src='".JURI::root()."images";
$images['src="images'] = 'src="'.Uri::root().'images';
$images["src='images"] = "src='".Uri::root()."images";
$images['src="/images'] = 'src="'.Uri::root().'images';
$images["src='/images"] = "src='".Uri::root()."images";
// set document template
$text[] = "<!doctype html>";
$text[] = '<html>';
$text[] = "<head>";
$text[] = '<meta charset="utf-8">';
$text[] = "<title>".$document->title."</title>";
$text[] = '<link type="text/css" href="'.JURI::root().'media/com_sermondistributor/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.JURI::root().'media/com_sermondistributor/uikit/js/uikit.min.js"></script>';
$text[] = '<link type="text/css" href="'.Uri::root().'media/com_sermondistributor/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Uri::root().'media/com_sermondistributor/uikit/js/uikit.min.js"></script>';
$text[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Help_document Controller
* Help_document Form Controller
*/
class SermondistributorControllerHelp_document extends JControllerForm
class SermondistributorControllerHelp_document extends FormController
{
/**
* Current or most recently performed task.
@ -48,13 +55,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'Help_documents'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -63,10 +70,10 @@ class SermondistributorControllerHelp_document extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
@ -74,7 +81,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('help_document.create', $this->option);
}
@ -88,16 +95,16 @@ class SermondistributorControllerHelp_document extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
return false;
@ -162,12 +169,12 @@ class SermondistributorControllerHelp_document extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -184,13 +191,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Help_document', '', array());
$model = $this->getModel('Help_document', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -215,13 +222,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -232,7 +239,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -243,7 +250,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -269,7 +276,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -287,29 +294,29 @@ class SermondistributorControllerHelp_document extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -321,16 +328,15 @@ class SermondistributorControllerHelp_document extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Help_documents Controller
* Help_documents Admin Controller
*/
class SermondistributorControllerHelp_documents extends JControllerAdmin
class SermondistributorControllerHelp_documents extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Help_documents');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('Help_documents');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'help_documents');
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php
@ -25,12 +25,17 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
* Sermondistributor Import Controller
* Sermondistributor Import Base Controller
*/
class SermondistributorControllerImport extends JControllerLegacy
class SermondistributorControllerImport extends BaseController
{
/**
* Import an spreadsheet.
@ -40,21 +45,21 @@ class SermondistributorControllerImport extends JControllerLegacy
public function import()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$model = $this->getModel('import');
if ($model->import())
{
$cache = JFactory::getCache('mod_menu');
$cache = Factory::getCache('mod_menu');
$cache->clean();
// TODO: Reset the users acl here as well to kill off any missing bits
}
$app = JFactory::getApplication();
$app = Factory::getApplication();
$redirect_url = $app->getUserState('com_sermondistributor.redirect_url');
if (empty($redirect_url))
{
$redirect_url = JRoute::_('index.php?option=com_sermondistributor&view=import', false);
$redirect_url = Route::_('index.php?option=com_sermondistributor&view=import', false);
}
else
{

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listing.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Local_listing Controller
* Local_listing Form Controller
*/
class SermondistributorControllerLocal_listing extends JControllerForm
class SermondistributorControllerLocal_listing extends FormController
{
/**
* Current or most recently performed task.
@ -48,13 +55,13 @@ class SermondistributorControllerLocal_listing extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'Local_listings'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -63,10 +70,10 @@ class SermondistributorControllerLocal_listing extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('local_listing.access', 'com_sermondistributor');
if (!$access)
@ -74,7 +81,7 @@ class SermondistributorControllerLocal_listing extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('local_listing.create', $this->option);
}
@ -88,16 +95,16 @@ class SermondistributorControllerLocal_listing extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $recordId) && $user->authorise('local_listing.access', 'com_sermondistributor'));
$access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $recordId) && $user->authorise('local_listing.access', 'com_sermondistributor'));
if (!$access)
{
return false;
@ -162,12 +169,12 @@ class SermondistributorControllerLocal_listing extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -184,13 +191,13 @@ class SermondistributorControllerLocal_listing extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Local_listing', '', array());
$model = $this->getModel('Local_listing', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -215,13 +222,13 @@ class SermondistributorControllerLocal_listing extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -232,7 +239,7 @@ class SermondistributorControllerLocal_listing extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -243,7 +250,7 @@ class SermondistributorControllerLocal_listing extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -269,7 +276,7 @@ class SermondistributorControllerLocal_listing extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -287,29 +294,29 @@ class SermondistributorControllerLocal_listing extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -321,16 +328,15 @@ class SermondistributorControllerLocal_listing extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Local_listings Controller
* Local_listings Admin Controller
*/
class SermondistributorControllerLocal_listings extends JControllerAdmin
class SermondistributorControllerLocal_listings extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerLocal_listings extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('local_listing.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Local_listings');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'Local_listings_'.$date->format('jS_F_Y'),'Local listings exported ('.$date->format('jS F, Y').')','local listings');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerLocal_listings extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('local_listing.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('Local_listings');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('local_listing_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'local_listings');
$session->set('dataType_VDM_IMPORTINTO', 'local_listing');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.php
@ -25,35 +25,47 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/**
* Manual_updater Controller
* Manual_updater Admin Controller
*/
class SermondistributorControllerManual_updater extends JControllerAdmin
class SermondistributorControllerManual_updater extends AdminController
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_MANUAL_UPDATER';
/**
* Proxy for getModel.
* @since 2.5
* @since 2.5
*/
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = array())
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = [])
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
public function dashboard()
public function dashboard()
{
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor', false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor', false));
return;
}
public function gotoExternalSources()
public function gotoExternalSources()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false));
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Preacher Controller
* Preacher Form Controller
*/
class SermondistributorControllerPreacher extends JControllerForm
class SermondistributorControllerPreacher extends FormController
{
/**
* Current or most recently performed task.
@ -48,13 +55,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'Preachers'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -63,10 +70,10 @@ class SermondistributorControllerPreacher extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
@ -74,7 +81,7 @@ class SermondistributorControllerPreacher extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('preacher.create', $this->option);
}
@ -88,16 +95,16 @@ class SermondistributorControllerPreacher extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
return false;
@ -162,12 +169,12 @@ class SermondistributorControllerPreacher extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -184,13 +191,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Preacher', '', array());
$model = $this->getModel('Preacher', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=preachers' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -215,13 +222,13 @@ class SermondistributorControllerPreacher extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -232,7 +239,7 @@ class SermondistributorControllerPreacher extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -243,7 +250,7 @@ class SermondistributorControllerPreacher extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -269,7 +276,7 @@ class SermondistributorControllerPreacher extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -287,29 +294,29 @@ class SermondistributorControllerPreacher extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -321,16 +328,15 @@ class SermondistributorControllerPreacher extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Preachers Controller
* Preachers Admin Controller
*/
class SermondistributorControllerPreachers extends JControllerAdmin
class SermondistributorControllerPreachers extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Preachers');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('Preachers');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('preacher_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'preachers');
$session->set('dataType_VDM_IMPORTINTO', 'preacher');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Series Controller
* Series Form Controller
*/
class SermondistributorControllerSeries extends JControllerForm
class SermondistributorControllerSeries extends FormController
{
/**
* Current or most recently performed task.
@ -48,13 +55,13 @@ class SermondistributorControllerSeries extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'Series_list'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -63,10 +70,10 @@ class SermondistributorControllerSeries extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('series.access', 'com_sermondistributor');
if (!$access)
@ -74,7 +81,7 @@ class SermondistributorControllerSeries extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('series.create', $this->option);
}
@ -88,16 +95,16 @@ class SermondistributorControllerSeries extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
return false;
@ -162,12 +169,12 @@ class SermondistributorControllerSeries extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -184,13 +191,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Series', '', array());
$model = $this->getModel('Series', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -215,13 +222,13 @@ class SermondistributorControllerSeries extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -232,7 +239,7 @@ class SermondistributorControllerSeries extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -243,7 +250,7 @@ class SermondistributorControllerSeries extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -269,7 +276,7 @@ class SermondistributorControllerSeries extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -287,29 +294,29 @@ class SermondistributorControllerSeries extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -321,16 +328,15 @@ class SermondistributorControllerSeries extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Series_list Controller
* Series_list Admin Controller
*/
class SermondistributorControllerSeries_list extends JControllerAdmin
class SermondistributorControllerSeries_list extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Series_list');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('Series_list');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('series_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'series_list');
$session->set('dataType_VDM_IMPORTINTO', 'series');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Sermon Controller
* Sermon Form Controller
*/
class SermondistributorControllerSermon extends JControllerForm
class SermondistributorControllerSermon extends FormController
{
/**
* Current or most recently performed task.
@ -48,13 +55,13 @@ class SermondistributorControllerSermon extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'Sermons'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -63,10 +70,10 @@ class SermondistributorControllerSermon extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
@ -74,7 +81,7 @@ class SermondistributorControllerSermon extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option);
}
@ -88,9 +95,9 @@ class SermondistributorControllerSermon extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{ // get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -161,12 +168,12 @@ class SermondistributorControllerSermon extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -183,13 +190,13 @@ class SermondistributorControllerSermon extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Sermon', '', array());
$model = $this->getModel('Sermon', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=sermons' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -214,13 +221,13 @@ class SermondistributorControllerSermon extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -231,7 +238,7 @@ class SermondistributorControllerSermon extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -242,7 +249,7 @@ class SermondistributorControllerSermon extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -268,7 +275,7 @@ class SermondistributorControllerSermon extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -286,29 +293,29 @@ class SermondistributorControllerSermon extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -320,16 +327,15 @@ class SermondistributorControllerSermon extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -25,10 +25,17 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/**
* Sermondistributor Controller
* Sermondistributor Admin Controller
*/
class SermondistributorControllerSermondistributor extends JControllerAdmin
class SermondistributorControllerSermondistributor extends AdminController
{
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Sermons Controller
* Sermons Admin Controller
*/
class SermondistributorControllerSermons extends JControllerAdmin
class SermondistributorControllerSermons extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Sermons');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('Sermons');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('sermon_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'sermons');
$session->set('dataType_VDM_IMPORTINTO', 'sermon');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Statistic Controller
* Statistic Form Controller
*/
class SermondistributorControllerStatistic extends JControllerForm
class SermondistributorControllerStatistic extends FormController
{
/**
* Current or most recently performed task.
@ -48,13 +55,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = 'Statistics'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -63,10 +70,10 @@ class SermondistributorControllerStatistic extends JControllerForm
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// Get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
@ -74,7 +81,7 @@ class SermondistributorControllerStatistic extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
// In the absence of better information, revert to the component permissions.
return $user->authorise('statistic.create', $this->option);
}
@ -88,16 +95,16 @@ class SermondistributorControllerStatistic extends JControllerForm
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
return false;
@ -162,12 +169,12 @@ class SermondistributorControllerStatistic extends JControllerForm
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -184,13 +191,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Statistic', '', array());
$model = $this->getModel('Statistic', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=statistics' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -215,13 +222,13 @@ class SermondistributorControllerStatistic extends JControllerForm
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -232,7 +239,7 @@ class SermondistributorControllerStatistic extends JControllerForm
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -243,7 +250,7 @@ class SermondistributorControllerStatistic extends JControllerForm
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -269,7 +276,7 @@ class SermondistributorControllerStatistic extends JControllerForm
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -287,29 +294,29 @@ class SermondistributorControllerStatistic extends JControllerForm
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -321,16 +328,15 @@ class SermondistributorControllerStatistic extends JControllerForm
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -25,12 +25,19 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Statistics Controller
* Statistics Admin Controller
*/
class SermondistributorControllerStatistics extends JControllerAdmin
class SermondistributorControllerStatistics extends AdminController
{
/**
* The prefix to use with controller messages.
@ -59,30 +66,30 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
$pks = ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Statistics');
// get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
if (UtilitiesArrayHelper::check($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
$date = Factory::getDate();
SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
}
@ -90,32 +97,32 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model
$model = $this->getModel('Statistics');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
if (ObjectHelper::check($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$session = Factory::getSession();
$headers = json_encode($headers);
$session->set('statistic_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'statistics');
$session->set('dataType_VDM_IMPORTINTO', 'statistic');
// Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage headercheck.php
@ -25,24 +25,36 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
class sermondistributorHeaderCheck
{
protected $document = null;
protected $app = null;
function js_loaded($script_name)
{
// UIkit check point
if (strpos($script_name,'uikit') !== false)
{
$app = JFactory::getApplication();
$getTemplateName = $app->getTemplate('template')->template;
if (!$this->app)
{
$this->app = Factory::getApplication();
}
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false)
{
return true;
}
}
$document = JFactory::getDocument();
$head_data = $document->getHeadData();
if (!$this->document)
{
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
foreach (array_keys($head_data['scripts']) as $script)
{
if (stristr($script, $script_name))
@ -59,18 +71,24 @@ class sermondistributorHeaderCheck
// UIkit check point
if (strpos($script_name,'uikit') !== false)
{
$app = JFactory::getApplication();
$getTemplateName = $app->getTemplate('template')->template;
if (!$this->app)
{
$this->app = Factory::getApplication();
}
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false)
{
return true;
}
}
$document = JFactory::getDocument();
$head_data = $document->getHeadData();
if (!$this->document)
{
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
foreach (array_keys($head_data['styleSheets']) as $script)
{
if (stristr($script, $script_name))

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batch_.php
@ -38,7 +38,7 @@ abstract class JHtmlBatch_
* @var array
* @since 3.0
*/
protected static $ListSelection = array();
protected static $ListSelection = [];
/**
* Render the batch selection options.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ COM_SERMONDISTRIBUTOR_EXPORT_DATA_DESC="Allows users in this group to export dat
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS="External Sources Access"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS_DESC="Allows the users in this group to access access external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE="External Sources Batch Use"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE="External Sources Create"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE_DESC="Allows the users in this group to create create external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DASHBOARD_ADD="External Sources Dashboard Add"
@ -35,7 +35,7 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OWN_DESC="Allows the users in this g
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_STATE="External Sources Edit State"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_STATE_DESC="Allows the users in this group to update the state of the external source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION="External Sources Edit Version"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT="External Sources Export"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT_DESC="Allows the users in this group to export export external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_IMPORT="External Sources Import"
@ -49,7 +49,7 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS_DESC="Al
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS="Help Documents Access"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
@ -63,7 +63,7 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_OWN_DESC="Allows the users in this gro
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_STATE="Help Documents Edit State"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the help document"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION="Help Documents Edit Version"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EXPORT="Help Documents Export"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EXPORT_DESC="Allows the users in this group to export export help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_IMPORT="Help Documents Import"
@ -75,7 +75,7 @@ COM_SERMONDISTRIBUTOR_IMPORT_DATA_DESC="Allows users in this group to import dat
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_ACCESS="Local Listings Access"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_ACCESS_DESC="Allows the users in this group to access access local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_USE="Local Listings Batch Use"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_CREATE="Local Listings Create"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_CREATE_DESC="Allows the users in this group to create create local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_DASHBOARD_LIST="Local Listings Dashboard List"
@ -105,7 +105,7 @@ COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_STATE_DESC="Allows the users in this g
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL="Local Listings Edit Url"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL_DESC="Allows the users in this group to edit url of local listing"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION="Local Listings Edit Version"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT="Local Listings Export"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT_DESC="Allows the users in this group to export export local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_IMPORT="Local Listings Import"
@ -147,7 +147,7 @@ COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_DESC="Allows the users in this group to a
COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_SITE="Preachers (Site) Access"
COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_SITE_DESC="Allows the users in this group to access site preachers."
COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE="Preachers Batch Use"
COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_CREATE="Preachers Create"
COM_SERMONDISTRIBUTOR_PREACHERS_CREATE_DESC="Allows the users in this group to create create preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_DASHBOARD_ADD="Preachers Dashboard Add"
@ -167,7 +167,7 @@ COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_OWN_DESC="Allows the users in this group to
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_STATE="Preachers Edit State"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the preacher"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION="Preachers Edit Version"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT="Preachers Export"
COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT_DESC="Allows the users in this group to export export preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_IMPORT="Preachers Import"
@ -183,7 +183,7 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_DESC="Allows the users in this group to
COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_SITE="Series List (Site) Access"
COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_SITE_DESC="Allows the users in this group to access site series list."
COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE="Series List Batch Use"
COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_CREATE="Series List Create"
COM_SERMONDISTRIBUTOR_SERIES_LIST_CREATE_DESC="Allows the users in this group to create create series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_DASHBOARD_ADD="Series List Dashboard Add"
@ -203,7 +203,7 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_OWN_DESC="Allows the users in this group
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_STATE="Series List Edit State"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_STATE_DESC="Allows the users in this group to update the state of the series"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION="Series List Edit Version"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION_DESC="Allows users in this group to edit versions of version series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EXPORT="Series List Export"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EXPORT_DESC="Allows the users in this group to export export series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_IMPORT="Series List Import"
@ -213,7 +213,7 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_SUBMENU_DESC="Allows the users in this group t
COM_SERMONDISTRIBUTOR_SERMONS_ACCESS="Sermons Access"
COM_SERMONDISTRIBUTOR_SERMONS_ACCESS_DESC="Allows the users in this group to access access sermons"
COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE="Sermons Batch Use"
COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch sermons"
COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch sermons"
COM_SERMONDISTRIBUTOR_SERMONS_CREATE="Sermons Create"
COM_SERMONDISTRIBUTOR_SERMONS_CREATE_DESC="Allows the users in this group to create create sermons"
COM_SERMONDISTRIBUTOR_SERMONS_DASHBOARD_ADD="Sermons Dashboard Add"
@ -233,7 +233,7 @@ COM_SERMONDISTRIBUTOR_SERMONS_EDIT_OWN_DESC="Allows the users in this group to e
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_STATE="Sermons Edit State"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the sermon"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION="Sermons Edit Version"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version sermons"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version sermons"
COM_SERMONDISTRIBUTOR_SERMONS_EXPORT="Sermons Export"
COM_SERMONDISTRIBUTOR_SERMONS_EXPORT_DESC="Allows the users in this group to export export sermons"
COM_SERMONDISTRIBUTOR_SERMONS_IMPORT="Sermons Import"
@ -245,7 +245,7 @@ COM_SERMONDISTRIBUTOR_SERMON_ACCESS_SITE_DESC="Allows the users in this group to
COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS="Statistics Access"
COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS_DESC="Allows the users in this group to access access statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE="Statistics Batch Use"
COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_CREATE="Statistics Create"
COM_SERMONDISTRIBUTOR_STATISTICS_CREATE_DESC="Allows the users in this group to create create statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_DASHBOARD_LIST="Statistics Dashboard List"
@ -263,7 +263,7 @@ COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_OWN_DESC="Allows the users in this group t
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_STATE="Statistics Edit State"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_STATE_DESC="Allows the users in this group to update the state of the statistic"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION="Statistics Edit Version"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT="Statistics Export"
COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT_DESC="Allows the users in this group to export export statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_IMPORT="Statistics Import"

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php
@ -25,6 +25,7 @@
// No direct access to this file
defined('JPATH_BASE') or die;
use Joomla\CMS\Language\Text;
JHtmlBehavior::core();
$divWrapper = range(1,120,2);
$counter = 0;
@ -32,8 +33,8 @@ $counter = 0;
<?php if ($displayData->ListSelection) : ?>
<div class="row-fluid">
<?php foreach ($displayData->ListSelection as $ListSelection) : ?>
<div class="control-group span6">
<div class="controls">
<div class="control-group span6">
<div class="controls">
<label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label>
<select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small">
<?php if (!$ListSelection['noDefault']) : ?>
@ -41,21 +42,21 @@ $counter = 0;
<?php endif; ?>
<?php echo $ListSelection['options']; ?>
</select>
</div>
</div>
</div>
<?php if (in_array($counter,$divWrapper)) : ?>
</div>
<div class="row-fluid">
<?php endif; ?>
<?php $counter++; ?>
<?php $counter++; ?>
<?php endforeach; ?>
</div>
<div class="control-group radio" id="batch-move-copy">
<div class="controls">
<label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c">
<input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo JText::_('Copy'); ?></label>
<label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m">
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo JText::_('Update'); ?></label>
</div>
<label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c">
<input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo Text::_('Copy'); ?></label>
<label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m">
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo Text::_('Update'); ?></label>
</div>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage build_option_fullwidth.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'note_auto_externalsource'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'externalsources'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'apicronjob_note'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'dropboxoptions'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'filetypes'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -39,13 +39,14 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publlshing.php
@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'content'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'site_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'article'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
@ -33,7 +35,7 @@ $fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -51,7 +51,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'size'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'url'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'external_source'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'build'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -39,13 +39,14 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publlshing.php
@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'icon'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'website'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
@ -33,7 +35,7 @@ $fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -39,6 +39,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created',
'created_by',
'modified',
@ -51,7 +52,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -25,22 +25,28 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vvvsermons;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// set a return value
$return = ($id) ? "index.php?option=com_sermondistributor&view=preacher&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (SermondistributorHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -60,40 +66,40 @@ $can = SermondistributorHelper::getActions('sermon');
<div class="form-vertical">
<?php if ($can->get('sermon.create')): ?>
<div class="btn-group">
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('preacher.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText::_('COM_SERMONDISTRIBUTOR_CLOSE_NEW'); ?></a>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('preacher.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo Text::_('COM_SERMONDISTRIBUTOR_CLOSE_NEW'); ?></a>
</div><br /><br />
<?php endif; ?>
<?php if (SermondistributorHelper::checkArray($items)): ?>
<?php if (ArrayHelper::check($items)): ?>
<table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons">
<thead>
<tr>
<th data-toggle="true">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th>
<th data-hide="all">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th>
</tr>
</thead>
@ -101,7 +107,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
@ -109,7 +115,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $displayData->escape($item->name); ?>
@ -119,7 +125,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php echo $displayData->escape($item->preacher_name); ?>
</td>
<td>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->series_name); ?></a>
<?php else: ?>
<?php echo $displayData->escape($item->series_name); ?>
@ -136,33 +142,33 @@ $can = SermondistributorHelper::getActions('sermon');
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->link_type); ?>
<?php echo Text::_($item->link_type); ?>
</td>
<td>
<?php echo JText::_($item->source); ?>
<?php echo Text::_($item->source); ?>
</td>
<?php if ($item->published == 1):?>
<?php if ($item->published == 1): ?>
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<?php elseif ($item->published == 0): ?>
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<?php elseif ($item->published == 2): ?>
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<?php elseif ($item->published == -2): ?>
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -182,7 +188,7 @@ $can = SermondistributorHelper::getActions('sermon');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'alias'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'icon'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'scripture'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
@ -33,7 +35,7 @@ $fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -39,6 +39,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created',
'created_by',
'modified',
@ -51,7 +52,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -25,22 +25,28 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vwcsermons;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// set a return value
$return = ($id) ? "index.php?option=com_sermondistributor&view=series&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (SermondistributorHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -57,38 +63,38 @@ $can = SermondistributorHelper::getActions('sermon');
?>
<div class="form-vertical">
<?php if ($can->get('sermon.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a><br /><br />
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (SermondistributorHelper::checkArray($items)): ?>
<?php if (ArrayHelper::check($items)): ?>
<table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons">
<thead>
<tr>
<th data-toggle="true">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th>
<th data-hide="all">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th>
</tr>
</thead>
@ -96,7 +102,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
@ -104,14 +110,14 @@ $can = SermondistributorHelper::getActions('sermon');
<?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $displayData->escape($item->name); ?>
<?php endif; ?>
</td>
<td>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a>
<?php else: ?>
<?php echo $displayData->escape($item->preacher_name); ?>
@ -131,33 +137,33 @@ $can = SermondistributorHelper::getActions('sermon');
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->link_type); ?>
<?php echo Text::_($item->link_type); ?>
</td>
<td>
<?php echo JText::_($item->source); ?>
<?php echo Text::_($item->source); ?>
</td>
<?php if ($item->published == 1):?>
<?php if ($item->published == 1): ?>
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<?php elseif ($item->published == 0): ?>
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<?php elseif ($item->published == 2): ?>
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<?php elseif ($item->published == -2): ?>
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -177,7 +183,7 @@ $can = SermondistributorHelper::getActions('sermon');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'preacher'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'icon'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'tags'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'auto_sermons'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage files_fullwidth.php
@ -51,7 +51,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'url'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
@ -33,7 +35,7 @@ $fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -39,6 +39,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created',
'created_by',
'modified',
@ -51,7 +52,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php
@ -25,22 +25,28 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vwbstastics;
$user = JFactory::getUser();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";
// set a return value
$return = ($id) ? "index.php?option=com_sermondistributor&view=sermon&layout=edit&id=" . $id : "";
// check for a return value
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (SermondistributorHelper::checkString($return))
if (StringHelper::check($return))
{
// set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -52,30 +58,30 @@ else
?>
<div class="form-vertical">
<?php if (SermondistributorHelper::checkArray($items)): ?>
<?php if (ArrayHelper::check($items)): ?>
<table class="footable table data statistics metro-blue" data-page-size="20" data-filter="#filter_statistics">
<thead>
<tr>
<th data-toggle="true">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_STATUS'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_ID'); ?>
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_ID'); ?>
</th>
</tr>
</thead>
@ -83,7 +89,7 @@ else
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('statistic',$item,'statistics');
?>
<tr>
@ -91,7 +97,7 @@ else
<?php if ($canDo->get('statistic.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $item->filename; ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $item->filename; ?>
@ -101,14 +107,14 @@ else
<?php echo $displayData->escape($item->sermon_name); ?>
</td>
<td>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a>
<?php else: ?>
<?php echo $displayData->escape($item->preacher_name); ?>
<?php endif; ?>
</td>
<td>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->series_name); ?></a>
<?php else: ?>
<?php echo $displayData->escape($item->series_name); ?>
@ -117,28 +123,28 @@ else
<td>
<?php echo $displayData->escape($item->counter); ?>
</td>
<?php if ($item->published == 1):?>
<?php if ($item->published == 1): ?>
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<?php elseif ($item->published == 0): ?>
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<?php elseif ($item->published == 2): ?>
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<?php elseif ($item->published == -2): ?>
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -158,7 +164,7 @@ else
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'sermon'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'series'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -42,7 +42,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'counter'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
@ -33,7 +35,7 @@ $fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -39,6 +39,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created',
'created_by',
'modified',
@ -51,7 +52,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -0,0 +1,91 @@
<?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage trashhelper.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 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('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
?>
<?php if ($displayData->state->get('filter.published') == -2 && ($displayData->canState && $displayData->canDelete)) : ?>
<script>
// change the class of the delete button
jQuery("#toolbar-delete button").toggleClass("btn-danger");
// function to empty the trash
function emptyTrash() {
if (document.adminForm.boxchecked.value == 0) {
// select all the items visable
document.adminForm.elements['checkall-toggle'].checked=1;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
// check to confirm the deletion
if(confirm('<?= Text::_("COM_SERMONDISTRIBUTOR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
} else {
document.adminForm.elements['checkall-toggle'].checked=0;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
}
} else {
// confirm deletion of those selected
if (confirm('<?= Text::_("COM_SERMONDISTRIBUTOR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
};
}
return false;
}
// function to exit the tash state
function exitTrash() {
document.adminForm.filter_published.selectedIndex = 0;
document.adminForm.submit();
return false;
}
</script>
<div class="alert alert-error">
<?php if (empty($displayData->items)): ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= Text::_("COM_SERMONDISTRIBUTOR_TRASH_AREA") ?>
</h4>
<p><?= Text::_("COM_SERMONDISTRIBUTOR_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<?php else: ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= Text::_("COM_SERMONDISTRIBUTOR_TRASHED_ITEMS") ?>
</h4>
<p><?= Text::_("COM_SERMONDISTRIBUTOR_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
<span class="icon-delete" aria-hidden="true"></span>
<?= Text::_("COM_SERMONDISTRIBUTOR_EMPTY_TRASH") ?>
</button>
<?php endif; ?>
<button onclick="exitTrash();" class="btn btn-small">
<span class="icon-back" aria-hidden="true"></span>
<?= Text::_("COM_SERMONDISTRIBUTOR_EXIT_TRASH") ?>
</button>
</div>
<?php endif; ?>

Some files were not shown because too many files have changed in this diff Show More