Compare commits

..

No commits in common. "master" and "v2.0.3" have entirely different histories.

411 changed files with 41905 additions and 47867 deletions

View File

@ -1,69 +0,0 @@
{
"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"
}
]
}

View File

@ -1,20 +0,0 @@
# 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,17 +1,16 @@
# Sermon Distributor (3.0.x)
# Sermon Distributor (2.0.x)
![Sermon Distributor image](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor")
![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/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://git.vdm.dev/christian/Joomla-Sermon-Distributor/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://github.com/SermonDistributor/Joomla-3-Component/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
@ -24,38 +23,45 @@ 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*: 11th February, 2024
+ *Version*: 3.0.x
+ *Last Build*: 30th May, 2020
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass:
**243 Hours** or **30 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
**193 Hours** or **24 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **87039**
+ *File count*: **595**
+ *Folder count*: **113**
+ *Line count*: **69273**
+ *File count*: **443**
+ *Folder count*: **93**
**160 Hours** or **20 Eight Hour Days** (the actual time the author spent)
**128 Hours** or **16 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @61hours** = codingtime / 4;
> **planning @35hours** = codingtime / 7;
> **mapping @24hours** = codingtime / 10;
> **office @40hours** = codingtime / 6;)
> **debugging @48hours** = codingtime / 4;
> **planning @28hours** = codingtime / 7;
> **mapping @19hours** = codingtime / 10;
> **office @32hours** = codingtime / 6;)
**403 Hours** or **50 Eight Hour Days**
**321 Hours** or **40 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: **10 weeks** or **2.1 months**
Project duration: **8 weeks** or **1.7 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
> 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

View File

@ -1,17 +1,16 @@
# Sermon Distributor (3.0.x)
# Sermon Distributor (2.0.x)
![Sermon Distributor image](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor")
![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/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://git.vdm.dev/christian/Joomla-Sermon-Distributor/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://github.com/SermonDistributor/Joomla-3-Component/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
@ -24,38 +23,45 @@ 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*: 11th February, 2024
+ *Version*: 3.0.x
+ *Last Build*: 30th May, 2020
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass:
**243 Hours** or **30 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
**193 Hours** or **24 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **87039**
+ *File count*: **595**
+ *Folder count*: **113**
+ *Line count*: **69273**
+ *File count*: **443**
+ *Folder count*: **93**
**160 Hours** or **20 Eight Hour Days** (the actual time the author spent)
**128 Hours** or **16 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @61hours** = codingtime / 4;
> **planning @35hours** = codingtime / 7;
> **mapping @24hours** = codingtime / 10;
> **office @40hours** = codingtime / 6;)
> **debugging @48hours** = codingtime / 4;
> **planning @28hours** = codingtime / 7;
> **mapping @19hours** = codingtime / 10;
> **office @32hours** = codingtime / 6;)
**403 Hours** or **50 Eight Hour Days**
**321 Hours** or **40 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: **10 weeks** or **2.1 months**
Project duration: **8 weeks** or **1.7 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
> 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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

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

View File

@ -60,8 +60,8 @@
last="50000"
step="10"
/>
<!-- Spacer_hr_4 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_4" hr="true" class="spacer_hr_4" />
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<field name="autorTitle"
type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"
@ -301,18 +301,6 @@
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"
@ -405,7 +393,7 @@
<option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER</option>
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC</option>
COM_SERMONDISTRIBUTOR_CONFIG_HTML_FIVE_BASIC</option>
</field>
</fieldset>
<fieldset
@ -929,8 +917,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_1 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_1" hr="true" class="spacer_hr_1" />
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1364,8 +1352,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_2 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_2" hr="true" class="spacer_hr_2" />
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Category_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1799,8 +1787,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_3 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_3" hr="true" class="spacer_hr_3" />
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Series_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php
@ -25,17 +25,12 @@
// 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 BaseController
class SermondistributorController extends JControllerLegacy
{
/**
* Constructor.
@ -46,7 +41,7 @@ class SermondistributorController extends BaseController
*
* @since 3.0
*/
public function __construct($config = [])
public function __construct($config = array())
{
// set the default view
$config['default_view'] = 'sermondistributor';
@ -68,32 +63,32 @@ class SermondistributorController extends BaseController
$id = $this->input->getInt('id');
// Check for edit form.
if(UtilitiesArrayHelper::check($data))
if(SermondistributorHelper::checkArray($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(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setError(JText::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);
// set redirect
if ($refid > 0 && StringHelper::check($ref))
if ($refid > 0 && SermondistributorHelper::checkString($ref))
{
// redirect to item of ref
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
}
elseif (StringHelper::check($ref))
elseif (SermondistributorHelper::checkString($ref))
{
// redirect to ref
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.(string)$ref, false));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.(string)$ref, false));
}
else
{
// normal redirect back to the list view
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.$data['views'], false));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.$data['views'], false));
}
return false;
@ -106,7 +101,7 @@ class SermondistributorController extends BaseController
protected function getViewRelation($view)
{
// check the we have a value
if (StringHelper::check($view))
if (SermondistributorHelper::checkString($view))
{
// the view relationships
$views = array(

View File

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

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.php
@ -25,19 +25,12 @@
// 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 Admin Controller
* External_sources Controller
*/
class SermondistributorControllerExternal_sources extends AdminController
class SermondistributorControllerExternal_sources extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
@ -66,30 +59,30 @@ class SermondistributorControllerExternal_sources extends AdminController
public function exportData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getUser();
$user = JFactory::getUser();
if ($user->authorise('external_source.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = Factory::getApplication()->input;
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
$pks = ArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('External_sources');
// get the data to export
$data = $model->getExportData($pks);
if (UtilitiesArrayHelper::check($data))
if (SermondistributorHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = Factory::getDate();
$date = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return;
}
@ -97,32 +90,32 @@ class SermondistributorControllerExternal_sources extends AdminController
public function importData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getUser();
$user = JFactory::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 (ObjectHelper::check($headers))
if (SermondistributorHelper::checkObject($headers))
{
// Load headers to session.
$session = Factory::getSession();
$session = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php
@ -25,16 +25,12 @@
// 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 Base Controller
* Sermondistributor Help Controller
*/
class SermondistributorControllerHelp extends BaseController
class SermondistributorControllerHelp extends JControllerLegacy
{
public function __construct($config)
{
@ -45,12 +41,12 @@ class SermondistributorControllerHelp extends BaseController
public function help()
{
$user = Factory::getUser();
$jinput = Factory::getApplication()->input;
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
// Check Token!
$token = Session::getFormToken();
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
if($user->id != 0 && $token == $call_token)
{
$task = $this->getTask();
switch($task){
@ -87,7 +83,7 @@ class SermondistributorControllerHelp extends BaseController
protected function getHelpDocumentText($id)
{
$db = Factory::getDbo();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__sermondistributor_help_document AS a');
@ -97,21 +93,21 @@ class SermondistributorControllerHelp extends BaseController
$db->execute();
if($db->getNumRows())
{
$text = [];
$text = array();
$document = $db->loadObject();
// fix image issue
$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";
$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";
// 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="'.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[] = '<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[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -25,19 +25,12 @@
// 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 Admin Controller
* Help_documents Controller
*/
class SermondistributorControllerHelp_documents extends AdminController
class SermondistributorControllerHelp_documents extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
@ -66,30 +59,30 @@ class SermondistributorControllerHelp_documents extends AdminController
public function exportData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getUser();
$user = JFactory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = Factory::getApplication()->input;
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
$pks = ArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Help_documents');
// get the data to export
$data = $model->getExportData($pks);
if (UtilitiesArrayHelper::check($data))
if (SermondistributorHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = Factory::getDate();
$date = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
}
@ -97,32 +90,32 @@ class SermondistributorControllerHelp_documents extends AdminController
public function importData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getUser();
$user = JFactory::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 (ObjectHelper::check($headers))
if (SermondistributorHelper::checkObject($headers))
{
// Load headers to session.
$session = Factory::getSession();
$session = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
}
}

View File

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

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.php
@ -25,19 +25,12 @@
// 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 Admin Controller
* Local_listings Controller
*/
class SermondistributorControllerLocal_listings extends AdminController
class SermondistributorControllerLocal_listings extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
@ -66,30 +59,30 @@ class SermondistributorControllerLocal_listings extends AdminController
public function exportData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getUser();
$user = JFactory::getUser();
if ($user->authorise('local_listing.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = Factory::getApplication()->input;
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
$pks = ArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Local_listings');
// get the data to export
$data = $model->getExportData($pks);
if (UtilitiesArrayHelper::check($data))
if (SermondistributorHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = Factory::getDate();
$date = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return;
}
@ -97,32 +90,32 @@ class SermondistributorControllerLocal_listings extends AdminController
public function importData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getUser();
$user = JFactory::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 (ObjectHelper::check($headers))
if (SermondistributorHelper::checkObject($headers))
{
// Load headers to session.
$session = Factory::getSession();
$session = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return;
}
}

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.php
@ -25,31 +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;
/**
* Manual_updater Admin Controller
* Manual_updater Controller
*/
class SermondistributorControllerManual_updater extends AdminController
class SermondistributorControllerManual_updater extends JControllerAdmin
{
/**
* 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
*/
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = [])
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
@ -58,14 +46,14 @@ class SermondistributorControllerManual_updater extends AdminController
public function dashboard()
{
$this->setRedirect(Route::_('index.php?option=com_sermondistributor', false));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor', false));
return;
}
public function gotoExternalSources()
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false));
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false));
return;
}
}

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -25,19 +25,12 @@
// 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 Admin Controller
* Series_list Controller
*/
class SermondistributorControllerSeries_list extends AdminController
class SermondistributorControllerSeries_list extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
@ -66,30 +59,30 @@ class SermondistributorControllerSeries_list extends AdminController
public function exportData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getUser();
$user = JFactory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
$input = Factory::getApplication()->input;
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
$pks = ArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Series_list');
// get the data to export
$data = $model->getExportData($pks);
if (UtilitiesArrayHelper::check($data))
if (SermondistributorHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = Factory::getDate();
$date = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
}
@ -97,32 +90,32 @@ class SermondistributorControllerSeries_list extends AdminController
public function importData()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getUser();
$user = JFactory::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 (ObjectHelper::check($headers))
if (SermondistributorHelper::checkObject($headers))
{
// Load headers to session.
$session = Factory::getSession();
$session = JFactory::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 = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
}
}

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -25,17 +25,10 @@
// 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 Admin Controller
* Sermondistributor Controller
*/
class SermondistributorControllerSermondistributor extends AdminController
class SermondistributorControllerSermondistributor extends JControllerAdmin
{
}

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage headercheck.php
@ -25,36 +25,24 @@
// 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)
{
if (!$this->app)
{
$this->app = Factory::getApplication();
}
$app = JFactory::getApplication();
$getTemplateName = $app->getTemplate('template')->template;
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false)
{
return true;
}
}
if (!$this->document)
{
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
$document = JFactory::getDocument();
$head_data = $document->getHeadData();
foreach (array_keys($head_data['scripts']) as $script)
{
if (stristr($script, $script_name))
@ -71,24 +59,18 @@ class sermondistributorHeaderCheck
// UIkit check point
if (strpos($script_name,'uikit') !== false)
{
if (!$this->app)
{
$this->app = Factory::getApplication();
}
$app = JFactory::getApplication();
$getTemplateName = $app->getTemplate('template')->template;
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false)
{
return true;
}
}
if (!$this->document)
{
$this->document = Factory::getDocument();
}
$document = JFactory::getDocument();
$head_data = $document->getHeadData();
$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 3.0.x
@version 2.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 = [];
protected static $ListSelection = array();
/**
* 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 the users in this group to use batch copy/update method of batch external sources"
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_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 the users in this group to edit versions of version external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC="Allows 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 the users in this group to use batch copy/update method of batch help documents"
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_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 the users in this group to edit versions of version help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows 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 the users in this group to use batch copy/update method of batch local listings"
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_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 the users in this group to edit versions of version local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION_DESC="Allows 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 the users in this group to use batch copy/update method of batch preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE_DESC="Allows 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 the users in this group to edit versions of version preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION_DESC="Allows 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 the users in this group to use batch copy/update method of batch series list"
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_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 the users in this group to edit versions of version series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION_DESC="Allows 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 the users in this group to use batch copy/update method of batch sermons"
COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE_DESC="Allows 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 the users in this group to edit versions of version sermons"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION_DESC="Allows 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 the users in this group to use batch copy/update method of batch statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE_DESC="Allows 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 the users in this group to edit versions of version statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION_DESC="Allows 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 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php
@ -25,7 +25,6 @@
// 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;
@ -54,9 +53,9 @@ $counter = 0;
<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 Text::_('Copy'); ?></label>
<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 Text::_('Update'); ?></label>
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo JText::_('Update'); ?></label>
</div>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,8 +25,6 @@
// 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.
@ -35,7 +33,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(Text::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,8 +25,6 @@
// 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.
@ -35,7 +33,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(Text::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -25,28 +25,22 @@
// 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 = Factory::getUser();
$user = JFactory::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 = Factory::getApplication()->input;
$jinput = JFactory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (StringHelper::check($return))
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -66,40 +60,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 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>
<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>
</div><br /><br />
<?php endif; ?>
<?php if (ArrayHelper::check($items)): ?>
<?php if (SermondistributorHelper::checkArray($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 Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th>
<th data-hide="all">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th>
</tr>
</thead>
@ -107,7 +101,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 = Factory::getUser($item->checked_out);
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
@ -115,7 +109,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 Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $displayData->escape($item->name); ?>
@ -125,7 +119,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); ?>
@ -142,33 +136,33 @@ $can = SermondistributorHelper::getActions('sermon');
<?php endif; ?>
</td>
<td>
<?php echo Text::_($item->link_type); ?>
<?php echo JText::_($item->link_type); ?>
</td>
<td>
<?php echo Text::_($item->source); ?>
<?php echo JText::_($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 Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -188,7 +182,7 @@ $can = SermondistributorHelper::getActions('sermon');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,8 +25,6 @@
// 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.
@ -35,7 +33,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(Text::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -25,28 +25,22 @@
// 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 = Factory::getUser();
$user = JFactory::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 = Factory::getApplication()->input;
$jinput = JFactory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (StringHelper::check($return))
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -63,38 +57,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 Text::_('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 JText::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (ArrayHelper::check($items)): ?>
<?php if (SermondistributorHelper::checkArray($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 Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th>
<th data-hide="all">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th>
</tr>
</thead>
@ -102,7 +96,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 = Factory::getUser($item->checked_out);
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
@ -110,14 +104,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 Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php echo JHtml::_('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); ?>
@ -137,33 +131,33 @@ $can = SermondistributorHelper::getActions('sermon');
<?php endif; ?>
</td>
<td>
<?php echo Text::_($item->link_type); ?>
<?php echo JText::_($item->link_type); ?>
</td>
<td>
<?php echo Text::_($item->source); ?>
<?php echo JText::_($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 Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -183,7 +177,7 @@ $can = SermondistributorHelper::getActions('sermon');
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,8 +25,6 @@
// 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.
@ -35,7 +33,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(Text::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php
@ -25,28 +25,22 @@
// 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 = Factory::getUser();
$user = JFactory::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 = Factory::getApplication()->input;
$jinput = JFactory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (StringHelper::check($return))
if (SermondistributorHelper::checkString($return))
{
// set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -58,30 +52,30 @@ else
?>
<div class="form-vertical">
<?php if (ArrayHelper::check($items)): ?>
<?php if (SermondistributorHelper::checkArray($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 Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL'); ?>
</th>
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL'); ?>
</th>
<th width="10" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_STATUS'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_STATUS'); ?>
</th>
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_ID'); ?>
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_ID'); ?>
</th>
</tr>
</thead>
@ -89,7 +83,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 = Factory::getUser($item->checked_out);
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('statistic',$item,'statistics');
?>
<tr>
@ -97,7 +91,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 Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $item->filename; ?>
@ -107,14 +101,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); ?>
@ -123,28 +117,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 Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('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 Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
@ -164,7 +158,7 @@ else
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.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') ?: [];
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 3.0.x
@version 2.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -25,8 +25,6 @@
// 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.
@ -35,7 +33,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(Text::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

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

View File

@ -1,91 +0,0 @@
<?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