Changed to readme file, other changes are only random var changes (due to automation)

This commit is contained in:
Llewellyn van der Merwe 2015-12-01 02:19:11 +02:00
parent 602a57f894
commit 979a0f908b
258 changed files with 2151 additions and 2148 deletions

View File

@ -1,6 +1,7 @@
# Sermon Distributor (1.2.9)
![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor")
![Sermon Distributor image (https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor")] (https://github.com/SermonDistributor/Joomla-3-Component)
Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x] (http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link] (https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip)
@ -15,18 +16,18 @@ The best way to see all your options is to install this component on you Joomla
+ [Setup Dropbox] (https://youtu.be/btpKFDk0-dI)
+ [Component Build] (https://youtu.be/yMPp1Cp3W_0)
# Build Details
# Build Details :factory:
+ *Company*: [Vast Development Method] (https://www.vdm.io/)
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor] (https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 30th November, 2015
+ *Last Build*: 1st December, 2015
+ *Version*: 1.2.9
+ *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
## Build Time :hourglass:
**126 Hours** or **16 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder))
@ -34,9 +35,9 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
> (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*: **45149**
+ *File count*: **347**
+ *Folder count*: **79**
+ *Line count*: **45152** :round_pushpin:
+ *File count*: **347** :page_with_curl:
+ *Folder count*: **79** :open_file_folder:
**83 Hours** or **10 Eight Hour Days** (the actual time the author spent)

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -55,13 +55,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9311] Access check.
// [9313] Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9322] In the absense of better information, revert to the component permissions.
// [9324] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('help_document.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9465] get user object.
// [9467] get user object.
$user = JFactory::getUser();
// [9467] get record id.
// [9469] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9474] Access check.
// [9476] Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
if ($recordId)
{
// [9483] The record has been set. Check the record permissions.
// [9485] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor.help_document.' . $recordId))
{
// [9505] Now test the owner is the user.
// [9507] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9509] Need to do a lookup from the model.
// [9511] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
$ownerId = $record->created_by;
}
// [9517] If the owner matches 'me' then allow.
// [9519] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false;
}
}
// [9539] Since there is no permission, revert to the component permissions.
// [9541] Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option);
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -43,29 +43,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData()
{
// [7261] Check for request forgeries
// [7263] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7263] check if export is allowed for this user.
// [7265] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7267] Get the input
// [7269] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7270] Sanitize the input
// [7272] Sanitize the input
JArrayHelper::toInteger($pks);
// [7272] Get the model
// [7274] Get the model
$model = $this->getModel('Help_documents');
// [7274] get the data to export
// [7276] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7278] now set the data to the spreadsheet
// [7280] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
}
}
// [7283] Redirect to the list screen with error.
// [7285] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData()
{
// [7292] Check for request forgeries
// [7294] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7294] check if import is allowed for this user.
// [7296] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7298] Get the import model
// [7300] Get the import model
$model = $this->getModel('Help_documents');
// [7300] get the headers to import
// [7302] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7304] Load headers to session.
// [7306] Load headers to session.
$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');
// [7310] Redirect to import view.
// [7312] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7322] Redirect to the list screen with error.
// [7324] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -55,13 +55,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9311] Access check.
// [9313] Access check.
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9322] In the absense of better information, revert to the component permissions.
// [9324] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('preacher.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9465] get user object.
// [9467] get user object.
$user = JFactory::getUser();
// [9467] get record id.
// [9469] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9474] Access check.
// [9476] Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerPreacher extends JControllerForm
if ($recordId)
{
// [9483] The record has been set. Check the record permissions.
// [9485] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor.preacher.' . $recordId))
{
// [9505] Now test the owner is the user.
// [9507] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9509] Need to do a lookup from the model.
// [9511] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerPreacher extends JControllerForm
$ownerId = $record->created_by;
}
// [9517] If the owner matches 'me' then allow.
// [9519] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerPreacher extends JControllerForm
return false;
}
}
// [9539] Since there is no permission, revert to the component permissions.
// [9541] Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option);
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -43,29 +43,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData()
{
// [7261] Check for request forgeries
// [7263] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7263] check if export is allowed for this user.
// [7265] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7267] Get the input
// [7269] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7270] Sanitize the input
// [7272] Sanitize the input
JArrayHelper::toInteger($pks);
// [7272] Get the model
// [7274] Get the model
$model = $this->getModel('Preachers');
// [7274] get the data to export
// [7276] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7278] now set the data to the spreadsheet
// [7280] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers');
}
}
// [7283] Redirect to the list screen with error.
// [7285] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData()
{
// [7292] Check for request forgeries
// [7294] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7294] check if import is allowed for this user.
// [7296] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7298] Get the import model
// [7300] Get the import model
$model = $this->getModel('Preachers');
// [7300] get the headers to import
// [7302] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7304] Load headers to session.
// [7306] Load headers to session.
$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');
// [7310] Redirect to import view.
// [7312] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7322] Redirect to the list screen with error.
// [7324] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -55,13 +55,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9311] Access check.
// [9313] Access check.
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9322] In the absense of better information, revert to the component permissions.
// [9324] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('series.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9465] get user object.
// [9467] get user object.
$user = JFactory::getUser();
// [9467] get record id.
// [9469] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9474] Access check.
// [9476] Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerSeries extends JControllerForm
if ($recordId)
{
// [9483] The record has been set. Check the record permissions.
// [9485] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('series.edit.own', 'com_sermondistributor.series.' . $recordId))
{
// [9505] Now test the owner is the user.
// [9507] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9509] Need to do a lookup from the model.
// [9511] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerSeries extends JControllerForm
$ownerId = $record->created_by;
}
// [9517] If the owner matches 'me' then allow.
// [9519] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('series.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerSeries extends JControllerForm
return false;
}
}
// [9539] Since there is no permission, revert to the component permissions.
// [9541] Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option);
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -43,29 +43,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData()
{
// [7261] Check for request forgeries
// [7263] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7263] check if export is allowed for this user.
// [7265] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7267] Get the input
// [7269] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7270] Sanitize the input
// [7272] Sanitize the input
JArrayHelper::toInteger($pks);
// [7272] Get the model
// [7274] Get the model
$model = $this->getModel('Series_list');
// [7274] get the data to export
// [7276] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7278] now set the data to the spreadsheet
// [7280] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list');
}
}
// [7283] Redirect to the list screen with error.
// [7285] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData()
{
// [7292] Check for request forgeries
// [7294] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7294] check if import is allowed for this user.
// [7296] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7298] Get the import model
// [7300] Get the import model
$model = $this->getModel('Series_list');
// [7300] get the headers to import
// [7302] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7304] Load headers to session.
// [7306] Load headers to session.
$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');
// [7310] Redirect to import view.
// [7312] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7322] Redirect to the list screen with error.
// [7324] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -55,10 +55,10 @@ class SermondistributorControllerSermon extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9266] get the user object
// [9268] get the user object
$user = JFactory::getUser();
// [9271] Access check.
// [9273] Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
{
@ -69,13 +69,13 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [9282] If the category has been passed in the URL check it.
// [9284] If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
}
if ($allow === null)
{
// [9291] In the absense of better information, revert to the component permissions.
// [9293] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option);
}
else
@ -95,13 +95,13 @@ class SermondistributorControllerSermon extends JControllerForm
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{ // [9369] get user object.
{ // [9371] get user object.
$user = JFactory::getUser();
// [9371] get record id.
// [9373] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9378] Access check.
// [9380] Access check.
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
@ -110,17 +110,17 @@ class SermondistributorControllerSermon extends JControllerForm
if ($recordId)
{
// [9387] The record has been set. Check the record permissions.
// [9389] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor.sermon.' . $recordId))
{
// [9409] Fallback on edit.own. Now test the owner is the user.
// [9411] Fallback on edit.own. Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9413] Need to do a lookup from the model.
// [9415] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -130,7 +130,7 @@ class SermondistributorControllerSermon extends JControllerForm
$ownerId = $record->created_by;
}
// [9421] If the owner matches 'me' then do the test.
// [9423] If the owner matches 'me' then do the test.
if ($ownerId == $user->id)
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
@ -146,7 +146,7 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [9443] The category has been set. Check the category permissions.
// [9445] The category has been set. Check the category permissions.
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
if (!$catpermission && !is_null($catpermission))
{
@ -154,7 +154,7 @@ class SermondistributorControllerSermon extends JControllerForm
}
}
}
// [9453] Since there is no permission, revert to the component permissions.
// [9455] Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option);
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -43,29 +43,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData()
{
// [7261] Check for request forgeries
// [7263] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7263] check if export is allowed for this user.
// [7265] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7267] Get the input
// [7269] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7270] Sanitize the input
// [7272] Sanitize the input
JArrayHelper::toInteger($pks);
// [7272] Get the model
// [7274] Get the model
$model = $this->getModel('Sermons');
// [7274] get the data to export
// [7276] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7278] now set the data to the spreadsheet
// [7280] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons');
}
}
// [7283] Redirect to the list screen with error.
// [7285] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData()
{
// [7292] Check for request forgeries
// [7294] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7294] check if import is allowed for this user.
// [7296] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7298] Get the import model
// [7300] Get the import model
$model = $this->getModel('Sermons');
// [7300] get the headers to import
// [7302] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7304] Load headers to session.
// [7306] Load headers to session.
$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');
// [7310] Redirect to import view.
// [7312] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7322] Redirect to the list screen with error.
// [7324] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -55,13 +55,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9311] Access check.
// [9313] Access check.
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9322] In the absense of better information, revert to the component permissions.
// [9324] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('statistic.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9465] get user object.
// [9467] get user object.
$user = JFactory::getUser();
// [9467] get record id.
// [9469] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9474] Access check.
// [9476] Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerStatistic extends JControllerForm
if ($recordId)
{
// [9483] The record has been set. Check the record permissions.
// [9485] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor.statistic.' . $recordId))
{
// [9505] Now test the owner is the user.
// [9507] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9509] Need to do a lookup from the model.
// [9511] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerStatistic extends JControllerForm
$ownerId = $record->created_by;
}
// [9517] If the owner matches 'me' then allow.
// [9519] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerStatistic extends JControllerForm
return false;
}
}
// [9539] Since there is no permission, revert to the component permissions.
// [9541] Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option);
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -43,29 +43,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData()
{
// [7261] Check for request forgeries
// [7263] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7263] check if export is allowed for this user.
// [7265] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7267] Get the input
// [7269] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7270] Sanitize the input
// [7272] Sanitize the input
JArrayHelper::toInteger($pks);
// [7272] Get the model
// [7274] Get the model
$model = $this->getModel('Statistics');
// [7274] get the data to export
// [7276] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7278] now set the data to the spreadsheet
// [7280] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics');
}
}
// [7283] Redirect to the list screen with error.
// [7285] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData()
{
// [7292] Check for request forgeries
// [7294] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7294] check if import is allowed for this user.
// [7296] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7298] Get the import model
// [7300] Get the import model
$model = $this->getModel('Statistics');
// [7300] get the headers to import
// [7302] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7304] Load headers to session.
// [7306] Load headers to session.
$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');
// [7310] Redirect to import view.
// [7312] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7322] Redirect to the list screen with error.
// [7324] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->xhfsermons;
$items = $displayData->wcisermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->hspsermons;
$items = $displayData->kcesermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage files_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php
@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->bagstastics;
$items = $displayData->xtqstastics;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.php
@ -38,7 +38,7 @@ class SermondistributorModelAjax extends JModelList
}
// [8908] Used in sermon
// [8910] Used in sermon
/**
* Check and Set Dropbox local listing
**/

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage articles.php
@ -45,36 +45,36 @@ class JFormFieldArticles extends JFormFieldList
*/
protected function getInput()
{
// [7683] see if we should add buttons
// [7685] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7685] get html
// [7687] get html
$html = parent::getInput();
// [7687] if true set button
// [7689] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7691] only add if user allowed to create article
// [7693] only add if user allowed to create article
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [7709] get the input from url
// [7711] get the input from url
$jinput = JFactory::getApplication()->input;
// [7711] get the view name & id
// [7713] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7716] check if new item
// [7718] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7720] only load referal if not new item.
// [7722] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
// [7723] build the button
// [7725] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=article&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7727] return the button attached to input field
// [7729] return the button attached to input field
return $html . $button;
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dropboxfiles.php
@ -45,36 +45,36 @@ class JFormFieldDropboxfiles extends JFormFieldList
*/
protected function getInput()
{
// [7683] see if we should add buttons
// [7685] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7685] get html
// [7687] get html
$html = parent::getInput();
// [7687] if true set button
// [7689] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7691] only add if user allowed to create
// [7693] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [7709] get the input from url
// [7711] get the input from url
$jinput = JFactory::getApplication()->input;
// [7711] get the view name & id
// [7713] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7716] check if new item
// [7718] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7720] only load referal if not new item.
// [7722] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7723] build the button
// [7725] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7727] return the button attached to input field
// [7729] return the button attached to input field
return $html . $button;
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage localfiles.php
@ -45,36 +45,36 @@ class JFormFieldLocalfiles extends JFormFieldList
*/
protected function getInput()
{
// [7683] see if we should add buttons
// [7685] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7685] get html
// [7687] get html
$html = parent::getInput();
// [7687] if true set button
// [7689] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7691] only add if user allowed to create
// [7693] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [7709] get the input from url
// [7711] get the input from url
$jinput = JFactory::getApplication()->input;
// [7711] get the view name & id
// [7713] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7716] check if new item
// [7718] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7720] only load referal if not new item.
// [7722] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7723] build the button
// [7725] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7727] return the button attached to input field
// [7729] return the button attached to input field
return $html . $button;
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -45,36 +45,36 @@ class JFormFieldPreachers extends JFormFieldList
*/
protected function getInput()
{
// [7683] see if we should add buttons
// [7685] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7685] get html
// [7687] get html
$html = parent::getInput();
// [7687] if true set button
// [7689] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7691] only add if user allowed to create preacher
// [7693] only add if user allowed to create preacher
if ($user->authorise('preacher.create', 'com_sermondistributor'))
{
// [7709] get the input from url
// [7711] get the input from url
$jinput = JFactory::getApplication()->input;
// [7711] get the view name & id
// [7713] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7716] check if new item
// [7718] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7720] only load referal if not new item.
// [7722] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7723] build the button
// [7725] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=preacher&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7727] return the button attached to input field
// [7729] return the button attached to input field
return $html . $button;
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -45,36 +45,36 @@ class JFormFieldSeries extends JFormFieldList
*/
protected function getInput()
{
// [7683] see if we should add buttons
// [7685] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7685] get html
// [7687] get html
$html = parent::getInput();
// [7687] if true set button
// [7689] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7691] only add if user allowed to create series
// [7693] only add if user allowed to create series
if ($user->authorise('series.create', 'com_sermondistributor'))
{
// [7709] get the input from url
// [7711] get the input from url
$jinput = JFactory::getApplication()->input;
// [7711] get the view name & id
// [7713] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7716] check if new item
// [7718] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7720] only load referal if not new item.
// [7722] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7723] build the button
// [7725] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=series&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7727] return the button attached to input field
// [7729] return the button attached to input field
return $html . $button;
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -45,36 +45,36 @@ class JFormFieldSermon extends JFormFieldList
*/
protected function getInput()
{
// [7683] see if we should add buttons
// [7685] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7685] get html
// [7687] get html
$html = parent::getInput();
// [7687] if true set button
// [7689] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7691] only add if user allowed to create sermon
// [7693] only add if user allowed to create sermon
if ($user->authorise('sermon.create', 'com_sermondistributor'))
{
// [7709] get the input from url
// [7711] get the input from url
$jinput = JFactory::getApplication()->input;
// [7711] get the view name & id
// [7713] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7716] check if new item
// [7718] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7720] only load referal if not new item.
// [7722] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7723] build the button
// [7725] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=sermon&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7727] return the button attached to input field
// [7729] return the button attached to input field
return $html . $button;
}
}

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.js
@ -18,38 +18,38 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_jfXdjKEkcj_required = false;
jform_neiBLaklKG_required = false;
jform_SWAPKmPZHb_required = false;
jform_dOgbQmLwDI_required = false;
jform_qgvZjvNaOJ_required = false;
jform_HkhDrQjmhr_required = false;
jform_llHjuZwvZl_required = false;
jform_clywlAZYIP_required = false;
// Initial Script
jQuery(document).ready(function()
{
var location_HJpAkRW = jQuery("#jform_location input[type='radio']:checked").val();
HJpAkRW(location_HJpAkRW);
var location_UohYgsV = jQuery("#jform_location input[type='radio']:checked").val();
UohYgsV(location_UohYgsV);
var location_MTapnld = jQuery("#jform_location input[type='radio']:checked").val();
MTapnld(location_MTapnld);
var location_dmkgZVG = jQuery("#jform_location input[type='radio']:checked").val();
dmkgZVG(location_dmkgZVG);
var type_jfXdjKE = jQuery("#jform_type").val();
jfXdjKE(type_jfXdjKE);
var type_qgvZjvN = jQuery("#jform_type").val();
qgvZjvN(type_qgvZjvN);
var type_neiBLak = jQuery("#jform_type").val();
neiBLak(type_neiBLak);
var type_HkhDrQj = jQuery("#jform_type").val();
HkhDrQj(type_HkhDrQj);
var type_SWAPKmP = jQuery("#jform_type").val();
SWAPKmP(type_SWAPKmP);
var type_llHjuZw = jQuery("#jform_type").val();
llHjuZw(type_llHjuZw);
var target_dOgbQmL = jQuery("#jform_target input[type='radio']:checked").val();
dOgbQmL(target_dOgbQmL);
var target_clywlAZ = jQuery("#jform_target input[type='radio']:checked").val();
clywlAZ(target_clywlAZ);
});
// the HJpAkRW function
function HJpAkRW(location_HJpAkRW)
// the UohYgsV function
function UohYgsV(location_UohYgsV)
{
// [8000] set the function logic
if (location_HJpAkRW == 1)
// [8002] set the function logic
if (location_UohYgsV == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
}
@ -59,11 +59,11 @@ function HJpAkRW(location_HJpAkRW)
}
}
// the MTapnld function
function MTapnld(location_MTapnld)
// the dmkgZVG function
function dmkgZVG(location_dmkgZVG)
{
// [8000] set the function logic
if (location_MTapnld == 2)
// [8002] set the function logic
if (location_dmkgZVG == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
}
@ -73,198 +73,198 @@ function MTapnld(location_MTapnld)
}
}
// the jfXdjKE function
function jfXdjKE(type_jfXdjKE)
// the qgvZjvN function
function qgvZjvN(type_qgvZjvN)
{
if (isSet(type_jfXdjKE) && type_jfXdjKE.constructor !== Array)
if (isSet(type_qgvZjvN) && type_qgvZjvN.constructor !== Array)
{
var temp_jfXdjKE = type_jfXdjKE;
var type_jfXdjKE = [];
type_jfXdjKE.push(temp_jfXdjKE);
var temp_qgvZjvN = type_qgvZjvN;
var type_qgvZjvN = [];
type_qgvZjvN.push(temp_qgvZjvN);
}
else if (!isSet(type_jfXdjKE))
else if (!isSet(type_qgvZjvN))
{
var type_jfXdjKE = [];
var type_qgvZjvN = [];
}
var type = type_jfXdjKE.some(type_jfXdjKE_SomeFunc);
var type = type_qgvZjvN.some(type_qgvZjvN_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_jfXdjKEkcj_required)
if (jform_qgvZjvNaOJ_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_jfXdjKEkcj_required = false;
jform_qgvZjvNaOJ_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_jfXdjKEkcj_required)
if (!jform_qgvZjvNaOJ_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_jfXdjKEkcj_required = true;
jform_qgvZjvNaOJ_required = true;
}
}
}
// the jfXdjKE Some function
function type_jfXdjKE_SomeFunc(type_jfXdjKE)
// the qgvZjvN Some function
function type_qgvZjvN_SomeFunc(type_qgvZjvN)
{
// [7965] set the function logic
if (type_jfXdjKE == 3)
// [7967] set the function logic
if (type_qgvZjvN == 3)
{
return true;
}
return false;
}
// the neiBLak function
function neiBLak(type_neiBLak)
// the HkhDrQj function
function HkhDrQj(type_HkhDrQj)
{
if (isSet(type_neiBLak) && type_neiBLak.constructor !== Array)
if (isSet(type_HkhDrQj) && type_HkhDrQj.constructor !== Array)
{
var temp_neiBLak = type_neiBLak;
var type_neiBLak = [];
type_neiBLak.push(temp_neiBLak);
var temp_HkhDrQj = type_HkhDrQj;
var type_HkhDrQj = [];
type_HkhDrQj.push(temp_HkhDrQj);
}
else if (!isSet(type_neiBLak))
else if (!isSet(type_HkhDrQj))
{
var type_neiBLak = [];
var type_HkhDrQj = [];
}
var type = type_neiBLak.some(type_neiBLak_SomeFunc);
var type = type_HkhDrQj.some(type_HkhDrQj_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_neiBLaklKG_required)
if (jform_HkhDrQjmhr_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_neiBLaklKG_required = false;
jform_HkhDrQjmhr_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_neiBLaklKG_required)
if (!jform_HkhDrQjmhr_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_neiBLaklKG_required = true;
jform_HkhDrQjmhr_required = true;
}
}
}
// the neiBLak Some function
function type_neiBLak_SomeFunc(type_neiBLak)
// the HkhDrQj Some function
function type_HkhDrQj_SomeFunc(type_HkhDrQj)
{
// [7965] set the function logic
if (type_neiBLak == 1)
// [7967] set the function logic
if (type_HkhDrQj == 1)
{
return true;
}
return false;
}
// the SWAPKmP function
function SWAPKmP(type_SWAPKmP)
// the llHjuZw function
function llHjuZw(type_llHjuZw)
{
if (isSet(type_SWAPKmP) && type_SWAPKmP.constructor !== Array)
if (isSet(type_llHjuZw) && type_llHjuZw.constructor !== Array)
{
var temp_SWAPKmP = type_SWAPKmP;
var type_SWAPKmP = [];
type_SWAPKmP.push(temp_SWAPKmP);
var temp_llHjuZw = type_llHjuZw;
var type_llHjuZw = [];
type_llHjuZw.push(temp_llHjuZw);
}
else if (!isSet(type_SWAPKmP))
else if (!isSet(type_llHjuZw))
{
var type_SWAPKmP = [];
var type_llHjuZw = [];
}
var type = type_SWAPKmP.some(type_SWAPKmP_SomeFunc);
var type = type_llHjuZw.some(type_llHjuZw_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_SWAPKmPZHb_required)
if (jform_llHjuZwvZl_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_SWAPKmPZHb_required = false;
jform_llHjuZwvZl_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_SWAPKmPZHb_required)
if (!jform_llHjuZwvZl_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_SWAPKmPZHb_required = true;
jform_llHjuZwvZl_required = true;
}
}
}
// the SWAPKmP Some function
function type_SWAPKmP_SomeFunc(type_SWAPKmP)
// the llHjuZw Some function
function type_llHjuZw_SomeFunc(type_llHjuZw)
{
// [7965] set the function logic
if (type_SWAPKmP == 2)
// [7967] set the function logic
if (type_llHjuZw == 2)
{
return true;
}
return false;
}
// the dOgbQmL function
function dOgbQmL(target_dOgbQmL)
// the clywlAZ function
function clywlAZ(target_clywlAZ)
{
// [8000] set the function logic
if (target_dOgbQmL == 1)
// [8002] set the function logic
if (target_clywlAZ == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_dOgbQmLwDI_required)
if (jform_clywlAZYIP_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_dOgbQmLwDI_required = false;
jform_clywlAZYIP_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_dOgbQmLwDI_required)
if (!jform_clywlAZYIP_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_dOgbQmLwDI_required = true;
jform_clywlAZYIP_required = true;
}
}
}

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<!-- [11013] Default Fields. -->
<!-- [11014] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<!-- [11021] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11030] User Created Field. Type: User (joomla) -->
<!-- [11032] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_DESC"
/>
<!-- [11038] Published Field. Type: List (joomla) -->
<!-- [11040] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11055] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11057] User Modified Field. Type: User (joomla) -->
<!-- [11059] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<!-- [11069] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<!-- [11079] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11089] Version Field. Type: Text (joomla) -->
<!-- [11091] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<!-- [11105] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11114] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Title Field. Type: Text. (joomla) -->
<!-- [11124] Dynamic Fields. -->
<!-- [11360] Title Field. Type: Text. (joomla) -->
<field
type="text"
name="title"
@ -118,7 +118,7 @@
message="Error! Please add title here."
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TITLE_HINT"
/>
<!-- [11272] Type Field. Type: List. (joomla) -->
<!-- [11274] Type Field. Type: List. (joomla) -->
<field
type="list"
name="type"
@ -127,7 +127,7 @@
class="list_class"
multiple="false"
required="true">
<!-- [11344] Option Set. -->
<!-- [11346] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION</option>
<option value="1">
@ -137,7 +137,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL</option>
</field>
<!-- [11358] Groups Field. Type: Usergroup. (joomla) -->
<!-- [11360] Groups Field. Type: Usergroup. (joomla) -->
<field
type="usergroup"
name="groups"
@ -146,7 +146,7 @@
required="true"
multiple="true"
/>
<!-- [11272] Location Field. Type: Radio. (joomla) -->
<!-- [11274] Location Field. Type: Radio. (joomla) -->
<field
type="radio"
name="location"
@ -154,13 +154,13 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION"
class="btn-group"
required="true">
<!-- [11344] Option Set. -->
<!-- [11346] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN</option>
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option>
</field>
<!-- [11358] Admin_view Field. Type: Folderlist. (joomla) -->
<!-- [11360] Admin_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="admin_view"
@ -170,7 +170,7 @@
hide_none="true"
hide_default="true"
/>
<!-- [11358] Site_view Field. Type: Folderlist. (joomla) -->
<!-- [11360] Site_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="site_view"
@ -180,7 +180,7 @@
hide_none="true"
hide_default="true"
/>
<!-- [11272] Target Field. Type: Radio. (joomla) -->
<!-- [11274] Target Field. Type: Radio. (joomla) -->
<field
type="radio"
name="target"
@ -188,13 +188,13 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_DESCRIPTION"
class="btn-group"
required="true">
<!-- [11344] Option Set. -->
<!-- [11346] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME</option>
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL</option>
</field>
<!-- [11358] Content Field. Type: Editor. (joomla) -->
<!-- [11360] Content Field. Type: Editor. (joomla) -->
<field
type="editor"
name="content"
@ -205,7 +205,7 @@
filter="safehtml"
required="true"
/>
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<!-- [11360] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -214,7 +214,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT"
/>
<!-- [11479] Article Field. Type: Articles. (custom) -->
<!-- [11481] Article Field. Type: Articles. (custom) -->
<field
type="articles"
name="article"
@ -224,7 +224,7 @@
default="0"
required="true"
/>
<!-- [11358] Url Field. Type: Url. (joomla) -->
<!-- [11360] Url Field. Type: Url. (joomla) -->
<field
type="url"
name="url"
@ -239,7 +239,7 @@
message="Error! Please add url here."
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_HINT"
/>
<!-- [11358] Not_required Field. Type: Hidden. (joomla) -->
<!-- [11360] Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
@ -247,11 +247,11 @@
/>
</fieldset>
<!-- [11141] Metadata Fields. -->
<!-- [11143] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11145] Robots Field. Type: List (joomla) -->
<!-- [11147] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -262,13 +262,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11156] Author Field. Type: Text (joomla) -->
<!-- [11158] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<!-- [11164] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -276,15 +276,15 @@
</fieldset>
</fields>
<!-- [10045] Access Control Fields. -->
<!-- [10047] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10049] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<!-- [10055] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.js

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<!-- [11013] Default Fields. -->
<!-- [11014] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<!-- [11021] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11030] User Created Field. Type: User (joomla) -->
<!-- [11032] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_DESC"
/>
<!-- [11038] Published Field. Type: List (joomla) -->
<!-- [11040] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11055] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11057] User Modified Field. Type: User (joomla) -->
<!-- [11059] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<!-- [11069] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<!-- [11079] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11089] Version Field. Type: Text (joomla) -->
<!-- [11091] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<!-- [11105] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11114] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Name Field. Type: Text. (joomla) -->
<!-- [11124] Dynamic Fields. -->
<!-- [11360] Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
@ -118,7 +118,7 @@
message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_NAME_HINT"
/>
<!-- [11358] Description Field. Type: Editor. (joomla) -->
<!-- [11360] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -130,7 +130,7 @@
buttons="false"
filter="safehtml"
/>
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<!-- [11360] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -139,7 +139,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT"
/>
<!-- [11358] Email Field. Type: Text. (joomla) -->
<!-- [11360] Email Field. Type: Text. (joomla) -->
<field
type="text"
name="email"
@ -154,7 +154,7 @@
message="Error! Please add email address here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_EMAIL_HINT"
/>
<!-- [11358] Website Field. Type: Url. (joomla) -->
<!-- [11360] Website Field. Type: Url. (joomla) -->
<field
type="url"
name="website"
@ -168,7 +168,7 @@
message="Error! Please add website here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT"
/>
<!-- [11358] Icon Field. Type: Media. (joomla) -->
<!-- [11360] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -178,11 +178,11 @@
/>
</fieldset>
<!-- [11141] Metadata Fields. -->
<!-- [11143] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11145] Robots Field. Type: List (joomla) -->
<!-- [11147] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -193,13 +193,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11156] Author Field. Type: Text (joomla) -->
<!-- [11158] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<!-- [11164] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -207,15 +207,15 @@
</fieldset>
</fields>
<!-- [10045] Access Control Fields. -->
<!-- [10047] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10049] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<!-- [10055] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.js

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<!-- [11013] Default Fields. -->
<!-- [11014] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<!-- [11021] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11030] User Created Field. Type: User (joomla) -->
<!-- [11032] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_DESC"
/>
<!-- [11038] Published Field. Type: List (joomla) -->
<!-- [11040] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11055] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11057] User Modified Field. Type: User (joomla) -->
<!-- [11059] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<!-- [11069] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<!-- [11079] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11089] Version Field. Type: Text (joomla) -->
<!-- [11091] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<!-- [11105] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11114] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Name Field. Type: Text. (joomla) -->
<!-- [11124] Dynamic Fields. -->
<!-- [11360] Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
@ -118,7 +118,7 @@
message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_SERIES_NAME_HINT"
/>
<!-- [11358] Description Field. Type: Editor. (joomla) -->
<!-- [11360] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -130,7 +130,7 @@
buttons="false"
filter="safehtml"
/>
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<!-- [11360] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -139,7 +139,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT"
/>
<!-- [11358] Icon Field. Type: Media. (joomla) -->
<!-- [11360] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -147,7 +147,7 @@
description="COM_SERMONDISTRIBUTOR_SERIES_ICON_DESCRIPTION"
directory=""
/>
<!-- [11358] Scripture Field. Type: Text. (joomla) -->
<!-- [11360] Scripture Field. Type: Text. (joomla) -->
<field
type="text"
name="scripture"
@ -165,11 +165,11 @@
/>
</fieldset>
<!-- [11141] Metadata Fields. -->
<!-- [11143] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11145] Robots Field. Type: List (joomla) -->
<!-- [11147] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -180,13 +180,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11156] Author Field. Type: Text (joomla) -->
<!-- [11158] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<!-- [11164] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -194,15 +194,15 @@
</fieldset>
</fields>
<!-- [10045] Access Control Fields. -->
<!-- [10047] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10049] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<!-- [10055] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.js
@ -18,127 +18,127 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_xbZtXWzeFM_required = false;
jform_WZwWpgDJhv_required = false;
jform_hdyAkcsOFV_required = false;
jform_MkfKpczQEa_required = false;
jform_VHZADuEZeK_required = false;
jform_uZsflMfgTr_required = false;
jform_CqfSUiFuhT_required = false;
jform_uqyxvuOdbK_required = false;
jform_uqVcAgSnSM_required = false;
jform_HCeOmWWRle_required = false;
// Initial Script
jQuery(document).ready(function()
{
var source_xbZtXWz = jQuery("#jform_source").val();
xbZtXWz(source_xbZtXWz);
var source_uZsflMf = jQuery("#jform_source").val();
uZsflMf(source_uZsflMf);
var source_CDIVEjW = jQuery("#jform_source").val();
var build_CDIVEjW = jQuery("#jform_build input[type='radio']:checked").val();
CDIVEjW(source_CDIVEjW,build_CDIVEjW);
var source_BzXllfH = jQuery("#jform_source").val();
var build_BzXllfH = jQuery("#jform_build input[type='radio']:checked").val();
BzXllfH(source_BzXllfH,build_BzXllfH);
var source_WZwWpgD = jQuery("#jform_source").val();
var build_WZwWpgD = jQuery("#jform_build input[type='radio']:checked").val();
WZwWpgD(source_WZwWpgD,build_WZwWpgD);
var source_CqfSUiF = jQuery("#jform_source").val();
var build_CqfSUiF = jQuery("#jform_build input[type='radio']:checked").val();
CqfSUiF(source_CqfSUiF,build_CqfSUiF);
var build_hdyAkcs = jQuery("#jform_build input[type='radio']:checked").val();
var source_hdyAkcs = jQuery("#jform_source").val();
hdyAkcs(build_hdyAkcs,source_hdyAkcs);
var build_uqyxvuO = jQuery("#jform_build input[type='radio']:checked").val();
var source_uqyxvuO = jQuery("#jform_source").val();
uqyxvuO(build_uqyxvuO,source_uqyxvuO);
var source_MkfKpcz = jQuery("#jform_source").val();
MkfKpcz(source_MkfKpcz);
var source_uqVcAgS = jQuery("#jform_source").val();
uqVcAgS(source_uqVcAgS);
var source_VHZADuE = jQuery("#jform_source").val();
VHZADuE(source_VHZADuE);
var source_HCeOmWW = jQuery("#jform_source").val();
HCeOmWW(source_HCeOmWW);
var link_type_BlITSTV = jQuery("#jform_link_type input[type='radio']:checked").val();
BlITSTV(link_type_BlITSTV);
var link_type_MMtrqVI = jQuery("#jform_link_type input[type='radio']:checked").val();
MMtrqVI(link_type_MMtrqVI);
var link_type_fGuayEg = jQuery("#jform_link_type input[type='radio']:checked").val();
fGuayEg(link_type_fGuayEg);
var link_type_cZNPuaM = jQuery("#jform_link_type input[type='radio']:checked").val();
cZNPuaM(link_type_cZNPuaM);
});
// the xbZtXWz function
function xbZtXWz(source_xbZtXWz)
// the uZsflMf function
function uZsflMf(source_uZsflMf)
{
if (isSet(source_xbZtXWz) && source_xbZtXWz.constructor !== Array)
if (isSet(source_uZsflMf) && source_uZsflMf.constructor !== Array)
{
var temp_xbZtXWz = source_xbZtXWz;
var source_xbZtXWz = [];
source_xbZtXWz.push(temp_xbZtXWz);
var temp_uZsflMf = source_uZsflMf;
var source_uZsflMf = [];
source_uZsflMf.push(temp_uZsflMf);
}
else if (!isSet(source_xbZtXWz))
else if (!isSet(source_uZsflMf))
{
var source_xbZtXWz = [];
var source_uZsflMf = [];
}
var source = source_xbZtXWz.some(source_xbZtXWz_SomeFunc);
var source = source_uZsflMf.some(source_uZsflMf_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (source)
{
jQuery('#jform_build').closest('.control-group').show();
if (jform_xbZtXWzeFM_required)
if (jform_uZsflMfgTr_required)
{
updateFieldRequired('build',0);
jQuery('#jform_build').prop('required','required');
jQuery('#jform_build').attr('aria-required',true);
jQuery('#jform_build').addClass('required');
jform_xbZtXWzeFM_required = false;
jform_uZsflMfgTr_required = false;
}
}
else
{
jQuery('#jform_build').closest('.control-group').hide();
if (!jform_xbZtXWzeFM_required)
if (!jform_uZsflMfgTr_required)
{
updateFieldRequired('build',1);
jQuery('#jform_build').removeAttr('required');
jQuery('#jform_build').removeAttr('aria-required');
jQuery('#jform_build').removeClass('required');
jform_xbZtXWzeFM_required = true;
jform_uZsflMfgTr_required = true;
}
}
}
// the xbZtXWz Some function
function source_xbZtXWz_SomeFunc(source_xbZtXWz)
// the uZsflMf Some function
function source_uZsflMf_SomeFunc(source_uZsflMf)
{
// [7965] set the function logic
if (source_xbZtXWz == 2)
// [7967] set the function logic
if (source_uZsflMf == 2)
{
return true;
}
return false;
}
// the CDIVEjW function
function CDIVEjW(source_CDIVEjW,build_CDIVEjW)
// the BzXllfH function
function BzXllfH(source_BzXllfH,build_BzXllfH)
{
if (isSet(source_CDIVEjW) && source_CDIVEjW.constructor !== Array)
if (isSet(source_BzXllfH) && source_BzXllfH.constructor !== Array)
{
var temp_CDIVEjW = source_CDIVEjW;
var source_CDIVEjW = [];
source_CDIVEjW.push(temp_CDIVEjW);
var temp_BzXllfH = source_BzXllfH;
var source_BzXllfH = [];
source_BzXllfH.push(temp_BzXllfH);
}
else if (!isSet(source_CDIVEjW))
else if (!isSet(source_BzXllfH))
{
var source_CDIVEjW = [];
var source_BzXllfH = [];
}
var source = source_CDIVEjW.some(source_CDIVEjW_SomeFunc);
var source = source_BzXllfH.some(source_BzXllfH_SomeFunc);
if (isSet(build_CDIVEjW) && build_CDIVEjW.constructor !== Array)
if (isSet(build_BzXllfH) && build_BzXllfH.constructor !== Array)
{
var temp_CDIVEjW = build_CDIVEjW;
var build_CDIVEjW = [];
build_CDIVEjW.push(temp_CDIVEjW);
var temp_BzXllfH = build_BzXllfH;
var build_BzXllfH = [];
build_BzXllfH.push(temp_BzXllfH);
}
else if (!isSet(build_CDIVEjW))
else if (!isSet(build_BzXllfH))
{
var build_CDIVEjW = [];
var build_BzXllfH = [];
}
var build = build_CDIVEjW.some(build_CDIVEjW_SomeFunc);
var build = build_BzXllfH.some(build_BzXllfH_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (source && build)
{
jQuery('.note_auto_dropbox').closest('.control-group').show();
@ -149,67 +149,67 @@ function CDIVEjW(source_CDIVEjW,build_CDIVEjW)
}
}
// the CDIVEjW Some function
function source_CDIVEjW_SomeFunc(source_CDIVEjW)
// the BzXllfH Some function
function source_BzXllfH_SomeFunc(source_BzXllfH)
{
// [7965] set the function logic
if (source_CDIVEjW == 2)
// [7967] set the function logic
if (source_BzXllfH == 2)
{
return true;
}
return false;
}
// the CDIVEjW Some function
function build_CDIVEjW_SomeFunc(build_CDIVEjW)
// the BzXllfH Some function
function build_BzXllfH_SomeFunc(build_BzXllfH)
{
// [7965] set the function logic
if (build_CDIVEjW == 2)
// [7967] set the function logic
if (build_BzXllfH == 2)
{
return true;
}
return false;
}
// the WZwWpgD function
function WZwWpgD(source_WZwWpgD,build_WZwWpgD)
// the CqfSUiF function
function CqfSUiF(source_CqfSUiF,build_CqfSUiF)
{
if (isSet(source_WZwWpgD) && source_WZwWpgD.constructor !== Array)
if (isSet(source_CqfSUiF) && source_CqfSUiF.constructor !== Array)
{
var temp_WZwWpgD = source_WZwWpgD;
var source_WZwWpgD = [];
source_WZwWpgD.push(temp_WZwWpgD);
var temp_CqfSUiF = source_CqfSUiF;
var source_CqfSUiF = [];
source_CqfSUiF.push(temp_CqfSUiF);
}
else if (!isSet(source_WZwWpgD))
else if (!isSet(source_CqfSUiF))
{
var source_WZwWpgD = [];
var source_CqfSUiF = [];
}
var source = source_WZwWpgD.some(source_WZwWpgD_SomeFunc);
var source = source_CqfSUiF.some(source_CqfSUiF_SomeFunc);
if (isSet(build_WZwWpgD) && build_WZwWpgD.constructor !== Array)
if (isSet(build_CqfSUiF) && build_CqfSUiF.constructor !== Array)
{
var temp_WZwWpgD = build_WZwWpgD;
var build_WZwWpgD = [];
build_WZwWpgD.push(temp_WZwWpgD);
var temp_CqfSUiF = build_CqfSUiF;
var build_CqfSUiF = [];
build_CqfSUiF.push(temp_CqfSUiF);
}
else if (!isSet(build_WZwWpgD))
else if (!isSet(build_CqfSUiF))
{
var build_WZwWpgD = [];
var build_CqfSUiF = [];
}
var build = build_WZwWpgD.some(build_WZwWpgD_SomeFunc);
var build = build_CqfSUiF.some(build_CqfSUiF_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (source && build)
{
jQuery('#jform_manual_files').closest('.control-group').show();
if (jform_WZwWpgDJhv_required)
if (jform_CqfSUiFuhT_required)
{
updateFieldRequired('manual_files',0);
jQuery('#jform_manual_files').prop('required','required');
jQuery('#jform_manual_files').attr('aria-required',true);
jQuery('#jform_manual_files').addClass('required');
jform_WZwWpgDJhv_required = false;
jform_CqfSUiFuhT_required = false;
}
jQuery('.note_manual_dropbox').closest('.control-group').show();
@ -217,79 +217,79 @@ function WZwWpgD(source_WZwWpgD,build_WZwWpgD)
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
if (!jform_WZwWpgDJhv_required)
if (!jform_CqfSUiFuhT_required)
{
updateFieldRequired('manual_files',1);
jQuery('#jform_manual_files').removeAttr('required');
jQuery('#jform_manual_files').removeAttr('aria-required');
jQuery('#jform_manual_files').removeClass('required');
jform_WZwWpgDJhv_required = true;
jform_CqfSUiFuhT_required = true;
}
jQuery('.note_manual_dropbox').closest('.control-group').hide();
}
}
// the WZwWpgD Some function
function source_WZwWpgD_SomeFunc(source_WZwWpgD)
// the CqfSUiF Some function
function source_CqfSUiF_SomeFunc(source_CqfSUiF)
{
// [7965] set the function logic
if (source_WZwWpgD == 2)
// [7967] set the function logic
if (source_CqfSUiF == 2)
{
return true;
}
return false;
}
// the WZwWpgD Some function
function build_WZwWpgD_SomeFunc(build_WZwWpgD)
// the CqfSUiF Some function
function build_CqfSUiF_SomeFunc(build_CqfSUiF)
{
// [7965] set the function logic
if (build_WZwWpgD == 1)
// [7967] set the function logic
if (build_CqfSUiF == 1)
{
return true;
}
return false;
}
// the hdyAkcs function
function hdyAkcs(build_hdyAkcs,source_hdyAkcs)
// the uqyxvuO function
function uqyxvuO(build_uqyxvuO,source_uqyxvuO)
{
if (isSet(build_hdyAkcs) && build_hdyAkcs.constructor !== Array)
if (isSet(build_uqyxvuO) && build_uqyxvuO.constructor !== Array)
{
var temp_hdyAkcs = build_hdyAkcs;
var build_hdyAkcs = [];
build_hdyAkcs.push(temp_hdyAkcs);
var temp_uqyxvuO = build_uqyxvuO;
var build_uqyxvuO = [];
build_uqyxvuO.push(temp_uqyxvuO);
}
else if (!isSet(build_hdyAkcs))
else if (!isSet(build_uqyxvuO))
{
var build_hdyAkcs = [];
var build_uqyxvuO = [];
}
var build = build_hdyAkcs.some(build_hdyAkcs_SomeFunc);
var build = build_uqyxvuO.some(build_uqyxvuO_SomeFunc);
if (isSet(source_hdyAkcs) && source_hdyAkcs.constructor !== Array)
if (isSet(source_uqyxvuO) && source_uqyxvuO.constructor !== Array)
{
var temp_hdyAkcs = source_hdyAkcs;
var source_hdyAkcs = [];
source_hdyAkcs.push(temp_hdyAkcs);
var temp_uqyxvuO = source_uqyxvuO;
var source_uqyxvuO = [];
source_uqyxvuO.push(temp_uqyxvuO);
}
else if (!isSet(source_hdyAkcs))
else if (!isSet(source_uqyxvuO))
{
var source_hdyAkcs = [];
var source_uqyxvuO = [];
}
var source = source_hdyAkcs.some(source_hdyAkcs_SomeFunc);
var source = source_uqyxvuO.some(source_uqyxvuO_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (build && source)
{
jQuery('#jform_manual_files').closest('.control-group').show();
if (jform_hdyAkcsOFV_required)
if (jform_uqyxvuOdbK_required)
{
updateFieldRequired('manual_files',0);
jQuery('#jform_manual_files').prop('required','required');
jQuery('#jform_manual_files').attr('aria-required',true);
jQuery('#jform_manual_files').addClass('required');
jform_hdyAkcsOFV_required = false;
jform_uqyxvuOdbK_required = false;
}
jQuery('.note_manual_dropbox').closest('.control-group').show();
@ -297,155 +297,155 @@ function hdyAkcs(build_hdyAkcs,source_hdyAkcs)
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
if (!jform_hdyAkcsOFV_required)
if (!jform_uqyxvuOdbK_required)
{
updateFieldRequired('manual_files',1);
jQuery('#jform_manual_files').removeAttr('required');
jQuery('#jform_manual_files').removeAttr('aria-required');
jQuery('#jform_manual_files').removeClass('required');
jform_hdyAkcsOFV_required = true;
jform_uqyxvuOdbK_required = true;
}
jQuery('.note_manual_dropbox').closest('.control-group').hide();
}
}
// the hdyAkcs Some function
function build_hdyAkcs_SomeFunc(build_hdyAkcs)
// the uqyxvuO Some function
function build_uqyxvuO_SomeFunc(build_uqyxvuO)
{
// [7965] set the function logic
if (build_hdyAkcs == 1)
// [7967] set the function logic
if (build_uqyxvuO == 1)
{
return true;
}
return false;
}
// the hdyAkcs Some function
function source_hdyAkcs_SomeFunc(source_hdyAkcs)
// the uqyxvuO Some function
function source_uqyxvuO_SomeFunc(source_uqyxvuO)
{
// [7965] set the function logic
if (source_hdyAkcs == 2)
// [7967] set the function logic
if (source_uqyxvuO == 2)
{
return true;
}
return false;
}
// the MkfKpcz function
function MkfKpcz(source_MkfKpcz)
// the uqVcAgS function
function uqVcAgS(source_uqVcAgS)
{
if (isSet(source_MkfKpcz) && source_MkfKpcz.constructor !== Array)
if (isSet(source_uqVcAgS) && source_uqVcAgS.constructor !== Array)
{
var temp_MkfKpcz = source_MkfKpcz;
var source_MkfKpcz = [];
source_MkfKpcz.push(temp_MkfKpcz);
var temp_uqVcAgS = source_uqVcAgS;
var source_uqVcAgS = [];
source_uqVcAgS.push(temp_uqVcAgS);
}
else if (!isSet(source_MkfKpcz))
else if (!isSet(source_uqVcAgS))
{
var source_MkfKpcz = [];
var source_uqVcAgS = [];
}
var source = source_MkfKpcz.some(source_MkfKpcz_SomeFunc);
var source = source_uqVcAgS.some(source_uqVcAgS_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (source)
{
jQuery('#jform_local_files').closest('.control-group').show();
if (jform_MkfKpczQEa_required)
if (jform_uqVcAgSnSM_required)
{
updateFieldRequired('local_files',0);
jQuery('#jform_local_files').prop('required','required');
jQuery('#jform_local_files').attr('aria-required',true);
jQuery('#jform_local_files').addClass('required');
jform_MkfKpczQEa_required = false;
jform_uqVcAgSnSM_required = false;
}
}
else
{
jQuery('#jform_local_files').closest('.control-group').hide();
if (!jform_MkfKpczQEa_required)
if (!jform_uqVcAgSnSM_required)
{
updateFieldRequired('local_files',1);
jQuery('#jform_local_files').removeAttr('required');
jQuery('#jform_local_files').removeAttr('aria-required');
jQuery('#jform_local_files').removeClass('required');
jform_MkfKpczQEa_required = true;
jform_uqVcAgSnSM_required = true;
}
}
}
// the MkfKpcz Some function
function source_MkfKpcz_SomeFunc(source_MkfKpcz)
// the uqVcAgS Some function
function source_uqVcAgS_SomeFunc(source_uqVcAgS)
{
// [7965] set the function logic
if (source_MkfKpcz == 1)
// [7967] set the function logic
if (source_uqVcAgS == 1)
{
return true;
}
return false;
}
// the VHZADuE function
function VHZADuE(source_VHZADuE)
// the HCeOmWW function
function HCeOmWW(source_HCeOmWW)
{
if (isSet(source_VHZADuE) && source_VHZADuE.constructor !== Array)
if (isSet(source_HCeOmWW) && source_HCeOmWW.constructor !== Array)
{
var temp_VHZADuE = source_VHZADuE;
var source_VHZADuE = [];
source_VHZADuE.push(temp_VHZADuE);
var temp_HCeOmWW = source_HCeOmWW;
var source_HCeOmWW = [];
source_HCeOmWW.push(temp_HCeOmWW);
}
else if (!isSet(source_VHZADuE))
else if (!isSet(source_HCeOmWW))
{
var source_VHZADuE = [];
var source_HCeOmWW = [];
}
var source = source_VHZADuE.some(source_VHZADuE_SomeFunc);
var source = source_HCeOmWW.some(source_HCeOmWW_SomeFunc);
// [7978] set this function logic
// [7980] set this function logic
if (source)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_VHZADuEZeK_required)
if (jform_HCeOmWWRle_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_VHZADuEZeK_required = false;
jform_HCeOmWWRle_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_VHZADuEZeK_required)
if (!jform_HCeOmWWRle_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_VHZADuEZeK_required = true;
jform_HCeOmWWRle_required = true;
}
}
}
// the VHZADuE Some function
function source_VHZADuE_SomeFunc(source_VHZADuE)
// the HCeOmWW Some function
function source_HCeOmWW_SomeFunc(source_HCeOmWW)
{
// [7965] set the function logic
if (source_VHZADuE == 3)
// [7967] set the function logic
if (source_HCeOmWW == 3)
{
return true;
}
return false;
}
// the BlITSTV function
function BlITSTV(link_type_BlITSTV)
// the MMtrqVI function
function MMtrqVI(link_type_MMtrqVI)
{
// [8000] set the function logic
if (link_type_BlITSTV == 2)
// [8002] set the function logic
if (link_type_MMtrqVI == 2)
{
jQuery('.note_link_directed').closest('.control-group').show();
}
@ -455,11 +455,11 @@ function BlITSTV(link_type_BlITSTV)
}
}
// the fGuayEg function
function fGuayEg(link_type_fGuayEg)
// the cZNPuaM function
function cZNPuaM(link_type_cZNPuaM)
{
// [8000] set the function logic
if (link_type_fGuayEg == 1)
// [8002] set the function logic
if (link_type_cZNPuaM == 1)
{
jQuery('.note_link_encrypted').closest('.control-group').show();
}

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<!-- [11013] Default Fields. -->
<!-- [11014] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<!-- [11021] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11030] User Created Field. Type: User (joomla) -->
<!-- [11032] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_DESC"
/>
<!-- [11038] Published Field. Type: List (joomla) -->
<!-- [11040] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11055] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11057] User Modified Field. Type: User (joomla) -->
<!-- [11059] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<!-- [11069] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<!-- [11079] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11089] Version Field. Type: Text (joomla) -->
<!-- [11091] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<!-- [11105] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11114] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Name Field. Type: Text. (joomla) -->
<!-- [11124] Dynamic Fields. -->
<!-- [11360] Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
@ -118,7 +118,7 @@
message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT"
/>
<!-- [11479] Preacher Field. Type: Preachers. (custom) -->
<!-- [11481] Preacher Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="preacher"
@ -129,7 +129,7 @@
default="0"
button="true"
/>
<!-- [11479] Series Field. Type: Series. (custom) -->
<!-- [11481] Series Field. Type: Series. (custom) -->
<field
type="series"
name="series"
@ -140,7 +140,7 @@
default="0"
button="true"
/>
<!-- [11358] Short_description Field. Type: Text. (joomla) -->
<!-- [11360] Short_description Field. Type: Text. (joomla) -->
<field
type="text"
name="short_description"
@ -154,7 +154,7 @@
message="Error! Please add some short description here."
hint="COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_HINT"
/>
<!-- [11358] Catid Field. Type: Category. (joomla) -->
<!-- [11360] Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
@ -164,7 +164,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- [11272] Link_type Field. Type: Radio. (joomla) -->
<!-- [11274] Link_type Field. Type: Radio. (joomla) -->
<field
type="radio"
name="link_type"
@ -173,13 +173,13 @@
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- [11344] Option Set. -->
<!-- [11346] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED</option>
<option value="2">
COM_SERMONDISTRIBUTOR_SERMON_DIRECT</option>
</field>
<!-- [11272] Source Field. Type: List. (joomla) -->
<!-- [11274] Source Field. Type: List. (joomla) -->
<field
type="list"
name="source"
@ -189,7 +189,7 @@
multiple="false"
filter="INT"
required="true">
<!-- [11344] Option Set. -->
<!-- [11346] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE</option>
<option value="1">
@ -199,7 +199,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_SERMON_URL</option>
</field>
<!-- [11358] Icon Field. Type: Media. (joomla) -->
<!-- [11360] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -207,7 +207,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION"
directory=""
/>
<!-- [11358] Tags Field. Type: Tag. (joomla) -->
<!-- [11360] Tags Field. Type: Tag. (joomla) -->
<field
type="tag"
name="tags"
@ -218,7 +218,7 @@
published="true"
multiple="true"
/>
<!-- [11479] Local_files Field. Type: Localfiles. (custom) -->
<!-- [11481] Local_files Field. Type: Localfiles. (custom) -->
<field
type="localfiles"
name="local_files"
@ -230,7 +230,7 @@
required="true"
button="false"
/>
<!-- [11358] Description Field. Type: Editor. (joomla) -->
<!-- [11360] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -242,9 +242,9 @@
buttons="false"
filter="safehtml"
/>
<!-- [11372] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11374] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_auto_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_auto_dropbox" />
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<!-- [11360] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -253,19 +253,19 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT"
/>
<!-- [11358] Not_required Field. Type: Hidden. (joomla) -->
<!-- [11360] Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- [11372] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11374] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_link_directed" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_directed" close="true" />
<!-- [11372] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11374] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_manual_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_manual_dropbox" />
<!-- [11372] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11374] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_link_encrypted" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_encrypted" close="true" />
<!-- [11479] Manual_files Field. Type: Dropboxfiles. (custom) -->
<!-- [11481] Manual_files Field. Type: Dropboxfiles. (custom) -->
<field
type="dropboxfiles"
name="manual_files"
@ -277,7 +277,7 @@
required="true"
button="false"
/>
<!-- [11358] Scripture Field. Type: Text. (joomla) -->
<!-- [11360] Scripture Field. Type: Text. (joomla) -->
<field
type="text"
name="scripture"
@ -293,7 +293,7 @@
message="Error! Please add some scripture reference here."
hint="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_HINT"
/>
<!-- [11358] Url Field. Type: Url. (joomla) -->
<!-- [11360] Url Field. Type: Url. (joomla) -->
<field
type="url"
name="url"
@ -308,7 +308,7 @@
message="Error! Please add sermon url here."
hint="COM_SERMONDISTRIBUTOR_SERMON_URL_HINT"
/>
<!-- [11272] Build Field. Type: Radio. (joomla) -->
<!-- [11274] Build Field. Type: Radio. (joomla) -->
<field
type="radio"
name="build"
@ -317,13 +317,13 @@
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- [11344] Option Set. -->
<!-- [11346] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_SERMON_MANUAL</option>
<option value="2">
COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC</option>
</field>
<!-- [11358] Auto_sermons Field. Type: Hidden. (joomla) -->
<!-- [11360] Auto_sermons Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="auto_sermons"
@ -331,11 +331,11 @@
/>
</fieldset>
<!-- [11141] Metadata Fields. -->
<!-- [11143] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11145] Robots Field. Type: List (joomla) -->
<!-- [11147] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -346,13 +346,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11156] Author Field. Type: Text (joomla) -->
<!-- [11158] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<!-- [11164] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -360,15 +360,15 @@
</fieldset>
</fields>
<!-- [10045] Access Control Fields. -->
<!-- [10047] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10049] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<!-- [10055] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.js

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<!-- [11013] Default Fields. -->
<!-- [11014] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<!-- [11021] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11030] User Created Field. Type: User (joomla) -->
<!-- [11032] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_DESC"
/>
<!-- [11038] Published Field. Type: List (joomla) -->
<!-- [11040] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11055] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11057] User Modified Field. Type: User (joomla) -->
<!-- [11059] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<!-- [11069] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<!-- [11079] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11089] Version Field. Type: Text (joomla) -->
<!-- [11091] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<!-- [11105] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11114] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Filename Field. Type: Text. (joomla) -->
<!-- [11124] Dynamic Fields. -->
<!-- [11360] Filename Field. Type: Text. (joomla) -->
<field
type="text"
name="filename"
@ -116,7 +116,7 @@
message="Error! Please add file name here."
hint="COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_HINT"
/>
<!-- [11479] Sermon Field. Type: Sermon. (custom) -->
<!-- [11481] Sermon Field. Type: Sermon. (custom) -->
<field
type="sermon"
name="sermon"
@ -127,7 +127,7 @@
required="true"
button="true"
/>
<!-- [11479] Preacher Field. Type: Preachers. (custom) -->
<!-- [11481] Preacher Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="preacher"
@ -138,7 +138,7 @@
default="0"
button="true"
/>
<!-- [11479] Series Field. Type: Series. (custom) -->
<!-- [11481] Series Field. Type: Series. (custom) -->
<field
type="series"
name="series"
@ -149,7 +149,7 @@
default="0"
button="true"
/>
<!-- [11358] Counter Field. Type: Text. (joomla) -->
<!-- [11360] Counter Field. Type: Text. (joomla) -->
<field
type="text"
name="counter"
@ -165,11 +165,11 @@
/>
</fieldset>
<!-- [11141] Metadata Fields. -->
<!-- [11143] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11145] Robots Field. Type: List (joomla) -->
<!-- [11147] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -180,13 +180,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11156] Author Field. Type: Text (joomla) -->
<!-- [11158] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<!-- [11164] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -194,15 +194,15 @@
</fieldset>
</fields>
<!-- [10045] Access Control Fields. -->
<!-- [10047] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10049] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<!-- [10055] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -117,7 +117,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9558] Get the form.
{ // [9560] Get the form.
$form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -127,12 +127,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -140,34 +140,34 @@ class SermondistributorModelHelp_document extends JModelAdmin
$user = JFactory::getUser();
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
// [9656] Check for existing item.
// [9657] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $id))
|| ($id == 0 && !$user->authorise('help_document.edit.state', 'com_sermondistributor')))
{
// [9668] Disable fields for display.
// [9670] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9671] Disable fields while saving.
// [9673] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9676] Modify the form based on Edit Creaded By access controls.
// [9678] Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
{
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9692] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9692] Disable fields while saving.
// [9694] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9695] Modify the form based on Edit Creaded Date access controls.
// [9697] Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
{
// [9707] Disable fields for display.
// [9709] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9709] Disable fields while saving.
// [9711] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -203,7 +203,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
$user = JFactory::getUser();
// [9859] The record has been set. Check the record permissions.
// [9861] The record has been set. Check the record permissions.
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
}
return false;
@ -225,14 +225,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
if ($recordId)
{
// [9946] The record has been set. Check the record permissions.
// [9948] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9963] In the absense of better information, revert to the component permissions.
// [9965] In the absense of better information, revert to the component permissions.
return $user->authorise('help_document.edit.state', 'com_sermondistributor');
}
@ -247,7 +247,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9771] Check specific edit permission then general edit permission.
// [9773] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('help_document.edit', 'com_sermondistributor.help_document.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('help_document.edit', 'com_sermondistributor');
@ -346,20 +346,20 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
// [8762] check if the not_required field is set
// [8764] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// [8767] now change the required field attributes value
// [8769] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [8770] make sure there is a string value
// [8772] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [8773] change to false
// [8775] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [8775] also clear the data set
// [8777] also clear the data set
$data[$requiredField] = '';
}
}
@ -490,7 +490,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4924] Set some needed variables.
// [4926] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -504,12 +504,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [4944] get list of uniqe fields
// [4946] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4946] remove move_copy from array
// [4948] remove move_copy from array
unset($values['move_copy']);
// [4949] make sure published is set
// [4951] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -521,21 +521,21 @@ class SermondistributorModelHelp_document extends JModelAdmin
$newIds = array();
// [4986] Parent exists so let's proceed
// [4988] Parent exists so let's proceed
while (!empty($pks))
{
// [4989] Pop the first ID off the stack
// [4991] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4994] only allow copy if user may edit this item.
// [4996] only allow copy if user may edit this item.
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
// [5004] Not fatal error
// [5006] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -543,19 +543,19 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
// [5009] Check that the row actually exists
// [5011] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5014] Fatal error
// [5016] Fatal error
$this->setError($error);
return false;
}
else
{
// [5021] Not fatal error
// [5023] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -563,7 +563,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
// [5057] insert all set values
// [5059] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -575,7 +575,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5069] update all uniqe fields
// [5071] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -584,13 +584,13 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5078] Reset the ID because we are making a copy
// [5080] Reset the ID because we are making a copy
$this->table->id = 0;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5083] TODO: Deal with ordering?
// [5084] $this->table->ordering = 1;
// [5084] Check the row.
// [5086] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -603,7 +603,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5097] Store the row.
// [5099] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -611,14 +611,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [5105] Get the new item ID
// [5107] Get the new item ID
$newId = $this->table->get('id');
// [5108] Add the new ID to the array
// [5110] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5112] Clean the cache
// [5114] Clean the cache
$this->cleanCache();
return $newIds;
@ -639,7 +639,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4726] Set some needed variables.
// [4728] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -654,15 +654,15 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [4748] make sure published only updates if user has the permission.
// [4750] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
{
unset($values['published']);
}
// [4761] remove move_copy from array
// [4763] remove move_copy from array
unset($values['move_copy']);
// [4782] Parent exists so we proceed
// [4784] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
@ -672,30 +672,30 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [4799] Check that the row actually exists
// [4801] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4804] Fatal error
// [4806] Fatal error
$this->setError($error);
return false;
}
else
{
// [4811] Not fatal error
// [4813] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4817] insert all set values.
// [4819] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4822] Do special action for access.
// [4824] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -708,7 +708,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
// [4834] Check the row.
// [4836] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -721,7 +721,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4847] Store the row.
// [4849] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -730,7 +730,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [4856] Clean the cache
// [4858] Clean the cache
$this->cleanCache();
return true;
@ -774,7 +774,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['params'] = (string) $params;
}
// [5138] Alter the title for save as copy
// [5140] Alter the title for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -797,7 +797,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['published'] = 0;
}
// [5165] Automatic handling of alias for empty fields
// [5167] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -828,10 +828,10 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5204] Alter the uniqe field for save as copy
// [5206] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5207] Automatic handling of other uniqe fields
// [5209] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -885,7 +885,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5238] Alter the title & alias
// [5240] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -108,16 +108,16 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getItems()
{
// [10528] check in items
// [10530] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -128,7 +128,7 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [10674] decode groups
// [10676] decode groups
$groupsArray = json_decode($item->groups, true);
if (SermondistributorHelper::checkArray($groupsArray))
{
@ -151,14 +151,14 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [10869] set selection value to a translatable value
// [10871] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10876] convert type
// [10878] convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// [10876] convert location
// [10878] convert location
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
@ -175,7 +175,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [10902] Array of type language strings
// [10904] Array of type language strings
if ($name == 'type')
{
$typeArray = array(
@ -184,20 +184,20 @@ class SermondistributorModelHelp_documents extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// [10902] Array of location language strings
// [10904] Array of location language strings
if ($name == 'location')
{
$locationArray = array(
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
{
return $locationArray[$value];
@ -213,19 +213,19 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getListQuery()
{
// [7389] Get the user object.
// [7391] Get the user object.
$user = JFactory::getUser();
// [7391] Create a new query object.
// [7393] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7394] Select some fields
// [7396] Select some fields
$query->select('a.*');
// [7401] From the sermondistributor_item table
// [7403] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
// [7415] Filter by published state
// [7417] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -236,21 +236,21 @@ class SermondistributorModelHelp_documents extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7427] Join over the asset groups.
// [7429] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7430] Filter by access level.
// [7432] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7435] Implement View Level Access
// [7437] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7512] Filter by search.
// [7514] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -265,28 +265,28 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [7755] Filter by Type.
// [7757] Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
}
// [7755] Filter by Location.
// [7757] Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
// [7755] Filter by Admin_view.
// [7757] Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
}
// [7755] Filter by Site_view.
// [7757] Filter by Site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
}
// [7471] Add the list ordering clause.
// [7473] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -304,42 +304,42 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExportData($pks)
{
// [7179] setup the query
// [7181] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7182] Get the user object.
// [7184] Get the user object.
$user = JFactory::getUser();
// [7184] Create a new query object.
// [7186] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7187] Select some fields
// [7189] Select some fields
$query->select('a.*');
// [7189] From the sermondistributor_help_document table
// [7191] From the sermondistributor_help_document table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7199] Implement View Level Access
// [7201] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7206] Order the results by ordering
// [7208] Order the results by ordering
$query->order('a.ordering ASC');
// [7208] Load the items
// [7210] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -350,13 +350,13 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [10816] unset the values we don't want exported.
// [10818] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10825] Add headers to items array.
// [10827] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -375,13 +375,13 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExImPortHeaders()
{
// [7228] Get a db connection.
// [7230] Get a db connection.
$db = JFactory::getDbo();
// [7230] get the columns
// [7232] get the columns
$columns = $db->getTableColumns("#__sermondistributor_help_document");
if (SermondistributorHelper::checkArray($columns))
{
// [7234] remove the headers you don't import/export.
// [7236] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -403,7 +403,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getStoreId($id = '')
{
// [10151] Compile the store id.
// [10153] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -427,15 +427,15 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function checkInNow()
{
// [10544] Get set check in time
// [10546] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10549] Get a db connection.
// [10551] Get a db connection.
$db = JFactory::getDbo();
// [10551] reset query
// [10553] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_help_document'));
@ -443,24 +443,24 @@ class SermondistributorModelHelp_documents extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10559] Get Yesterdays date
// [10561] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10561] reset query
// [10563] reset query
$query = $db->getQuery(true);
// [10563] Fields to update.
// [10565] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10568] Conditions for which records should be updated.
// [10570] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10573] Check table
// [10575] Check table
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -96,7 +96,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.preacher');
}
}
$this->preacherepnh = $item->id;
$this->preacherhsyu = $item->id;
return $item;
}
@ -106,74 +106,74 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getXhfsermons()
public function getWcisermons()
{
// [6937] Get the user object.
// [6939] Get the user object.
$user = JFactory::getUser();
// [6939] Create a new query object.
// [6941] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [6942] Select some fields
// [6944] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [6949] From the sermondistributor_sermon table
// [6951] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [7542] From the sermondistributor_preacher table.
// [7544] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [7542] From the sermondistributor_series table.
// [7544] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [6965] Filter by preacherepnh global.
$preacherepnh = $this->preacherepnh;
if (is_numeric($preacherepnh ))
// [6967] Filter by preacherhsyu global.
$preacherhsyu = $this->preacherhsyu;
if (is_numeric($preacherhsyu ))
{
$query->where('a.preacher = ' . (int) $preacherepnh );
$query->where('a.preacher = ' . (int) $preacherhsyu );
}
elseif (is_string($preacherepnh))
elseif (is_string($preacherhsyu))
{
$query->where('a.preacher = ' . $db->quote($preacherepnh));
$query->where('a.preacher = ' . $db->quote($preacherhsyu));
}
else
{
$query->where('a.preacher = -5');
}
// [6982] Join over the asset groups.
// [6984] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [6985] Filter by access level.
// [6987] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [6990] Implement View Level Access
// [6992] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [6997] Order the results by ordering
// [6999] Order the results by ordering
$query->order('a.ordering ASC');
// [6999] Load the items
// [7001] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -187,15 +187,15 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [10869] set selection value to a translatable value
// [10871] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10876] convert link_type
$item->link_type = $this->selectionTranslationXhfsermons($item->link_type, 'link_type');
// [10876] convert source
$item->source = $this->selectionTranslationXhfsermons($item->source, 'source');
// [10878] convert link_type
$item->link_type = $this->selectionTranslationWcisermons($item->link_type, 'link_type');
// [10878] convert source
$item->source = $this->selectionTranslationWcisermons($item->source, 'source');
}
}
@ -209,22 +209,22 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationXhfsermons($value,$name)
public function selectionTranslationWcisermons($value,$name)
{
// [10902] Array of link_type language strings
// [10904] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [10902] Array of source language strings
// [10904] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -233,7 +233,7 @@ class SermondistributorModelPreacher extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -253,7 +253,7 @@ class SermondistributorModelPreacher extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9558] Get the form.
{ // [9560] Get the form.
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -263,12 +263,12 @@ class SermondistributorModelPreacher extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -276,36 +276,36 @@ class SermondistributorModelPreacher extends JModelAdmin
$user = JFactory::getUser();
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
// [9656] Check for existing item.
// [9657] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.state', 'com_sermondistributor')))
{
// [9668] Disable fields for display.
// [9670] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9671] Disable fields while saving.
// [9673] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9676] Modify the form based on Edit Creaded By access controls.
// [9678] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created_by', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created_by', 'com_sermondistributor')))
{
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9692] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9692] Disable fields while saving.
// [9694] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9695] Modify the form based on Edit Creaded Date access controls.
// [9697] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created', 'com_sermondistributor')))
{
// [9707] Disable fields for display.
// [9709] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9709] Disable fields while saving.
// [9711] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -341,7 +341,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
$user = JFactory::getUser();
// [9859] The record has been set. Check the record permissions.
// [9861] The record has been set. Check the record permissions.
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
}
return false;
@ -363,14 +363,14 @@ class SermondistributorModelPreacher extends JModelAdmin
if ($recordId)
{
// [9946] The record has been set. Check the record permissions.
// [9948] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9963] In the absense of better information, revert to the component permissions.
// [9965] In the absense of better information, revert to the component permissions.
return $user->authorise('preacher.edit.state', 'com_sermondistributor');
}
@ -385,7 +385,7 @@ class SermondistributorModelPreacher extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9771] Check specific edit permission then general edit permission.
// [9773] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('preacher.edit', 'com_sermondistributor.preacher.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('preacher.edit', 'com_sermondistributor');
@ -592,7 +592,7 @@ class SermondistributorModelPreacher extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4924] Set some needed variables.
// [4926] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -606,12 +606,12 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [4944] get list of uniqe fields
// [4946] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4946] remove move_copy from array
// [4948] remove move_copy from array
unset($values['move_copy']);
// [4949] make sure published is set
// [4951] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -623,21 +623,21 @@ class SermondistributorModelPreacher extends JModelAdmin
$newIds = array();
// [4986] Parent exists so let's proceed
// [4988] Parent exists so let's proceed
while (!empty($pks))
{
// [4989] Pop the first ID off the stack
// [4991] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4994] only allow copy if user may edit this item.
// [4996] only allow copy if user may edit this item.
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
{
// [5004] Not fatal error
// [5006] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -645,19 +645,19 @@ class SermondistributorModelPreacher extends JModelAdmin
}
// [5009] Check that the row actually exists
// [5011] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5014] Fatal error
// [5016] Fatal error
$this->setError($error);
return false;
}
else
{
// [5021] Not fatal error
// [5023] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -665,7 +665,7 @@ class SermondistributorModelPreacher extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// [5057] insert all set values
// [5059] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -677,7 +677,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5069] update all uniqe fields
// [5071] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -686,13 +686,13 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5078] Reset the ID because we are making a copy
// [5080] Reset the ID because we are making a copy
$this->table->id = 0;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5083] TODO: Deal with ordering?
// [5084] $this->table->ordering = 1;
// [5084] Check the row.
// [5086] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -705,7 +705,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5097] Store the row.
// [5099] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -713,14 +713,14 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [5105] Get the new item ID
// [5107] Get the new item ID
$newId = $this->table->get('id');
// [5108] Add the new ID to the array
// [5110] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5112] Clean the cache
// [5114] Clean the cache
$this->cleanCache();
return $newIds;
@ -741,7 +741,7 @@ class SermondistributorModelPreacher extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4726] Set some needed variables.
// [4728] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -756,15 +756,15 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [4748] make sure published only updates if user has the permission.
// [4750] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('preacher.edit.state'))
{
unset($values['published']);
}
// [4761] remove move_copy from array
// [4763] remove move_copy from array
unset($values['move_copy']);
// [4782] Parent exists so we proceed
// [4784] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
@ -774,30 +774,30 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [4799] Check that the row actually exists
// [4801] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4804] Fatal error
// [4806] Fatal error
$this->setError($error);
return false;
}
else
{
// [4811] Not fatal error
// [4813] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4817] insert all set values.
// [4819] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4822] Do special action for access.
// [4824] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -810,7 +810,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
// [4834] Check the row.
// [4836] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -823,7 +823,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4847] Store the row.
// [4849] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -832,7 +832,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [4856] Clean the cache
// [4858] Clean the cache
$this->cleanCache();
return true;
@ -870,7 +870,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['params'] = (string) $params;
}
// [5138] Alter the name for save as copy
// [5140] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -893,7 +893,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['published'] = 0;
}
// [5165] Automatic handling of alias for empty fields
// [5167] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -924,10 +924,10 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5204] Alter the uniqe field for save as copy
// [5206] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5207] Automatic handling of other uniqe fields
// [5209] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -981,7 +981,7 @@ class SermondistributorModelPreacher extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5238] Alter the title & alias
// [5240] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -96,16 +96,16 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getItems()
{
// [10528] check in items
// [10530] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -130,19 +130,19 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getListQuery()
{
// [7389] Get the user object.
// [7391] Get the user object.
$user = JFactory::getUser();
// [7391] Create a new query object.
// [7393] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7394] Select some fields
// [7396] Select some fields
$query->select('a.*');
// [7401] From the sermondistributor_item table
// [7403] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
// [7415] Filter by published state
// [7417] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -153,21 +153,21 @@ class SermondistributorModelPreachers extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7427] Join over the asset groups.
// [7429] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7430] Filter by access level.
// [7432] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7435] Implement View Level Access
// [7437] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7512] Filter by search.
// [7514] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -183,7 +183,7 @@ class SermondistributorModelPreachers extends JModelList
}
// [7471] Add the list ordering clause.
// [7473] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -201,42 +201,42 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExportData($pks)
{
// [7179] setup the query
// [7181] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7182] Get the user object.
// [7184] Get the user object.
$user = JFactory::getUser();
// [7184] Create a new query object.
// [7186] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7187] Select some fields
// [7189] Select some fields
$query->select('a.*');
// [7189] From the sermondistributor_preacher table
// [7191] From the sermondistributor_preacher table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7199] Implement View Level Access
// [7201] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7206] Order the results by ordering
// [7208] Order the results by ordering
$query->order('a.ordering ASC');
// [7208] Load the items
// [7210] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -247,13 +247,13 @@ class SermondistributorModelPreachers extends JModelList
continue;
}
// [10816] unset the values we don't want exported.
// [10818] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10825] Add headers to items array.
// [10827] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -272,13 +272,13 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExImPortHeaders()
{
// [7228] Get a db connection.
// [7230] Get a db connection.
$db = JFactory::getDbo();
// [7230] get the columns
// [7232] get the columns
$columns = $db->getTableColumns("#__sermondistributor_preacher");
if (SermondistributorHelper::checkArray($columns))
{
// [7234] remove the headers you don't import/export.
// [7236] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -300,7 +300,7 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getStoreId($id = '')
{
// [10151] Compile the store id.
// [10153] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -321,15 +321,15 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function checkInNow()
{
// [10544] Get set check in time
// [10546] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10549] Get a db connection.
// [10551] Get a db connection.
$db = JFactory::getDbo();
// [10551] reset query
// [10553] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_preacher'));
@ -337,24 +337,24 @@ class SermondistributorModelPreachers extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10559] Get Yesterdays date
// [10561] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10561] reset query
// [10563] reset query
$query = $db->getQuery(true);
// [10563] Fields to update.
// [10565] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10568] Conditions for which records should be updated.
// [10570] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10573] Check table
// [10575] Check table
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -96,7 +96,7 @@ class SermondistributorModelSeries extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.series');
}
}
$this->seriesiueg = $item->id;
$this->serieseolv = $item->id;
return $item;
}
@ -106,74 +106,74 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getHspsermons()
public function getKcesermons()
{
// [6937] Get the user object.
// [6939] Get the user object.
$user = JFactory::getUser();
// [6939] Create a new query object.
// [6941] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [6942] Select some fields
// [6944] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [6949] From the sermondistributor_sermon table
// [6951] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [7542] From the sermondistributor_preacher table.
// [7544] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [7542] From the sermondistributor_series table.
// [7544] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [6965] Filter by seriesiueg global.
$seriesiueg = $this->seriesiueg;
if (is_numeric($seriesiueg ))
// [6967] Filter by serieseolv global.
$serieseolv = $this->serieseolv;
if (is_numeric($serieseolv ))
{
$query->where('a.series = ' . (int) $seriesiueg );
$query->where('a.series = ' . (int) $serieseolv );
}
elseif (is_string($seriesiueg))
elseif (is_string($serieseolv))
{
$query->where('a.series = ' . $db->quote($seriesiueg));
$query->where('a.series = ' . $db->quote($serieseolv));
}
else
{
$query->where('a.series = -5');
}
// [6982] Join over the asset groups.
// [6984] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [6985] Filter by access level.
// [6987] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [6990] Implement View Level Access
// [6992] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [6997] Order the results by ordering
// [6999] Order the results by ordering
$query->order('a.ordering ASC');
// [6999] Load the items
// [7001] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -187,15 +187,15 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [10869] set selection value to a translatable value
// [10871] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10876] convert link_type
$item->link_type = $this->selectionTranslationHspsermons($item->link_type, 'link_type');
// [10876] convert source
$item->source = $this->selectionTranslationHspsermons($item->source, 'source');
// [10878] convert link_type
$item->link_type = $this->selectionTranslationKcesermons($item->link_type, 'link_type');
// [10878] convert source
$item->source = $this->selectionTranslationKcesermons($item->source, 'source');
}
}
@ -209,22 +209,22 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationHspsermons($value,$name)
public function selectionTranslationKcesermons($value,$name)
{
// [10902] Array of link_type language strings
// [10904] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [10902] Array of source language strings
// [10904] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -233,7 +233,7 @@ class SermondistributorModelSeries extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -253,7 +253,7 @@ class SermondistributorModelSeries extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9558] Get the form.
{ // [9560] Get the form.
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -263,12 +263,12 @@ class SermondistributorModelSeries extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -276,36 +276,36 @@ class SermondistributorModelSeries extends JModelAdmin
$user = JFactory::getUser();
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
// [9656] Check for existing item.
// [9657] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.state', 'com_sermondistributor')))
{
// [9668] Disable fields for display.
// [9670] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9671] Disable fields while saving.
// [9673] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9676] Modify the form based on Edit Creaded By access controls.
// [9678] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('series.edit.created_by', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created_by', 'com_sermondistributor')))
{
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9692] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9692] Disable fields while saving.
// [9694] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9695] Modify the form based on Edit Creaded Date access controls.
// [9697] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('series.edit.created', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created', 'com_sermondistributor')))
{
// [9707] Disable fields for display.
// [9709] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9709] Disable fields while saving.
// [9711] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -341,7 +341,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
$user = JFactory::getUser();
// [9859] The record has been set. Check the record permissions.
// [9861] The record has been set. Check the record permissions.
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
}
return false;
@ -363,14 +363,14 @@ class SermondistributorModelSeries extends JModelAdmin
if ($recordId)
{
// [9946] The record has been set. Check the record permissions.
// [9948] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9963] In the absense of better information, revert to the component permissions.
// [9965] In the absense of better information, revert to the component permissions.
return $user->authorise('series.edit.state', 'com_sermondistributor');
}
@ -385,7 +385,7 @@ class SermondistributorModelSeries extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9771] Check specific edit permission then general edit permission.
// [9773] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('series.edit', 'com_sermondistributor.series.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('series.edit', 'com_sermondistributor');
@ -592,7 +592,7 @@ class SermondistributorModelSeries extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4924] Set some needed variables.
// [4926] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -606,12 +606,12 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [4944] get list of uniqe fields
// [4946] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4946] remove move_copy from array
// [4948] remove move_copy from array
unset($values['move_copy']);
// [4949] make sure published is set
// [4951] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -623,21 +623,21 @@ class SermondistributorModelSeries extends JModelAdmin
$newIds = array();
// [4986] Parent exists so let's proceed
// [4988] Parent exists so let's proceed
while (!empty($pks))
{
// [4989] Pop the first ID off the stack
// [4991] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4994] only allow copy if user may edit this item.
// [4996] only allow copy if user may edit this item.
if (!$this->user->authorise('series.edit', $contexts[$pk]))
{
// [5004] Not fatal error
// [5006] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -645,19 +645,19 @@ class SermondistributorModelSeries extends JModelAdmin
}
// [5009] Check that the row actually exists
// [5011] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5014] Fatal error
// [5016] Fatal error
$this->setError($error);
return false;
}
else
{
// [5021] Not fatal error
// [5023] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -665,7 +665,7 @@ class SermondistributorModelSeries extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// [5057] insert all set values
// [5059] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -677,7 +677,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5069] update all uniqe fields
// [5071] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -686,13 +686,13 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5078] Reset the ID because we are making a copy
// [5080] Reset the ID because we are making a copy
$this->table->id = 0;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5083] TODO: Deal with ordering?
// [5084] $this->table->ordering = 1;
// [5084] Check the row.
// [5086] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -705,7 +705,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5097] Store the row.
// [5099] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -713,14 +713,14 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [5105] Get the new item ID
// [5107] Get the new item ID
$newId = $this->table->get('id');
// [5108] Add the new ID to the array
// [5110] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5112] Clean the cache
// [5114] Clean the cache
$this->cleanCache();
return $newIds;
@ -741,7 +741,7 @@ class SermondistributorModelSeries extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4726] Set some needed variables.
// [4728] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -756,15 +756,15 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [4748] make sure published only updates if user has the permission.
// [4750] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('series.edit.state'))
{
unset($values['published']);
}
// [4761] remove move_copy from array
// [4763] remove move_copy from array
unset($values['move_copy']);
// [4782] Parent exists so we proceed
// [4784] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('series.edit', $contexts[$pk]))
@ -774,30 +774,30 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [4799] Check that the row actually exists
// [4801] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4804] Fatal error
// [4806] Fatal error
$this->setError($error);
return false;
}
else
{
// [4811] Not fatal error
// [4813] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4817] insert all set values.
// [4819] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4822] Do special action for access.
// [4824] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -810,7 +810,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
// [4834] Check the row.
// [4836] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -823,7 +823,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4847] Store the row.
// [4849] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -832,7 +832,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [4856] Clean the cache
// [4858] Clean the cache
$this->cleanCache();
return true;
@ -870,7 +870,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['params'] = (string) $params;
}
// [5138] Alter the name for save as copy
// [5140] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -893,7 +893,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['published'] = 0;
}
// [5165] Automatic handling of alias for empty fields
// [5167] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -924,10 +924,10 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5204] Alter the uniqe field for save as copy
// [5206] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5207] Automatic handling of other uniqe fields
// [5209] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -981,7 +981,7 @@ class SermondistributorModelSeries extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5238] Alter the title & alias
// [5240] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -92,16 +92,16 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getItems()
{
// [10528] check in items
// [10530] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -126,19 +126,19 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getListQuery()
{
// [7389] Get the user object.
// [7391] Get the user object.
$user = JFactory::getUser();
// [7391] Create a new query object.
// [7393] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7394] Select some fields
// [7396] Select some fields
$query->select('a.*');
// [7401] From the sermondistributor_item table
// [7403] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
// [7415] Filter by published state
// [7417] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -149,21 +149,21 @@ class SermondistributorModelSeries_list extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7427] Join over the asset groups.
// [7429] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7430] Filter by access level.
// [7432] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7435] Implement View Level Access
// [7437] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7512] Filter by search.
// [7514] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -179,7 +179,7 @@ class SermondistributorModelSeries_list extends JModelList
}
// [7471] Add the list ordering clause.
// [7473] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -197,42 +197,42 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExportData($pks)
{
// [7179] setup the query
// [7181] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7182] Get the user object.
// [7184] Get the user object.
$user = JFactory::getUser();
// [7184] Create a new query object.
// [7186] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7187] Select some fields
// [7189] Select some fields
$query->select('a.*');
// [7189] From the sermondistributor_series table
// [7191] From the sermondistributor_series table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7199] Implement View Level Access
// [7201] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7206] Order the results by ordering
// [7208] Order the results by ordering
$query->order('a.ordering ASC');
// [7208] Load the items
// [7210] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -243,13 +243,13 @@ class SermondistributorModelSeries_list extends JModelList
continue;
}
// [10816] unset the values we don't want exported.
// [10818] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10825] Add headers to items array.
// [10827] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -268,13 +268,13 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExImPortHeaders()
{
// [7228] Get a db connection.
// [7230] Get a db connection.
$db = JFactory::getDbo();
// [7230] get the columns
// [7232] get the columns
$columns = $db->getTableColumns("#__sermondistributor_series");
if (SermondistributorHelper::checkArray($columns))
{
// [7234] remove the headers you don't import/export.
// [7236] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -296,7 +296,7 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getStoreId($id = '')
{
// [10151] Compile the store id.
// [10153] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -316,15 +316,15 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function checkInNow()
{
// [10544] Get set check in time
// [10546] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10549] Get a db connection.
// [10551] Get a db connection.
$db = JFactory::getDbo();
// [10551] reset query
// [10553] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_series'));
@ -332,24 +332,24 @@ class SermondistributorModelSeries_list extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10559] Get Yesterdays date
// [10561] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10561] reset query
// [10563] reset query
$query = $db->getQuery(true);
// [10563] Fields to update.
// [10565] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10568] Conditions for which records should be updated.
// [10570] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10573] Check table
// [10575] Check table
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -108,7 +108,7 @@ class SermondistributorModelSermon extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.sermon');
}
}
$this->sermonqbhv = $item->id;
$this->sermonrwfz = $item->id;
return $item;
}
@ -118,76 +118,76 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getBagstastics()
public function getXtqstastics()
{
// [6937] Get the user object.
// [6939] Get the user object.
$user = JFactory::getUser();
// [6939] Create a new query object.
// [6941] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [6942] Select some fields
// [6944] Select some fields
$query->select('a.*');
// [6949] From the sermondistributor_statistic table
// [6951] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [7542] From the sermondistributor_sermon table.
// [7544] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
// [7542] From the sermondistributor_preacher table.
// [7544] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
// [7542] From the sermondistributor_series table.
// [7544] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
// [6965] Filter by sermonqbhv global.
$sermonqbhv = $this->sermonqbhv;
if (is_numeric($sermonqbhv ))
// [6967] Filter by sermonrwfz global.
$sermonrwfz = $this->sermonrwfz;
if (is_numeric($sermonrwfz ))
{
$query->where('a.sermon = ' . (int) $sermonqbhv );
$query->where('a.sermon = ' . (int) $sermonrwfz );
}
elseif (is_string($sermonqbhv))
elseif (is_string($sermonrwfz))
{
$query->where('a.sermon = ' . $db->quote($sermonqbhv));
$query->where('a.sermon = ' . $db->quote($sermonrwfz));
}
else
{
$query->where('a.sermon = -5');
}
// [6982] Join over the asset groups.
// [6984] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [6985] Filter by access level.
// [6987] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [6990] Implement View Level Access
// [6992] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [6997] Order the results by ordering
// [6999] Order the results by ordering
$query->order('a.ordering ASC');
// [6999] Load the items
// [7001] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -216,7 +216,7 @@ class SermondistributorModelSermon extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9558] Get the form.
{ // [9560] Get the form.
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -226,17 +226,17 @@ class SermondistributorModelSermon extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9585] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9587] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9590] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9592] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
// [9595] Determine correct permissions to check.
// [9597] Determine correct permissions to check.
if ($this->getState('sermon.id'))
{
$id = $this->getState('sermon.id');
@ -244,56 +244,56 @@ class SermondistributorModelSermon extends JModelAdmin
$catid = 0;
if (isset($this->getItem($id)->catid))
{
// [9602] set catagory id
// [9604] set catagory id
$catid = $this->getItem($id)->catid;
// [9604] Existing record. Can only edit in selected categories.
// [9606] Existing record. Can only edit in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit');
// [9606] Existing record. Can only edit own items in selected categories.
// [9608] Existing record. Can only edit own items in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
}
}
else
{
// [9612] New record. Can only create in selected categories.
// [9614] New record. Can only create in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.create');
}
$user = JFactory::getUser();
// [9616] Check for existing item.
// [9617] Modify the form based on Edit State access controls.
// [9618] Check for existing item.
// [9619] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $id))
|| (isset($catid) && $catid != 0 && !$user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $catid))
|| ($id == 0 && !$user->authorise('sermon.edit.state', 'com_sermondistributor')))
{
// [9632] Disable fields for display.
// [9634] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9635] Disable fields while saving.
// [9637] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9676] Modify the form based on Edit Creaded By access controls.
// [9678] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created_by', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created_by', 'com_sermondistributor')))
{
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9692] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9692] Disable fields while saving.
// [9694] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9695] Modify the form based on Edit Creaded Date access controls.
// [9697] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created', 'com_sermondistributor')))
{
// [9707] Disable fields for display.
// [9709] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9709] Disable fields while saving.
// [9711] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -333,7 +333,7 @@ class SermondistributorModelSermon extends JModelAdmin
if ($allow)
{
// [9830] The record has been set. Check the record permissions.
// [9832] The record has been set. Check the record permissions.
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
}
return $allow;
@ -357,14 +357,14 @@ class SermondistributorModelSermon extends JModelAdmin
if ($recordId)
{
// [9903] The record has been set. Check the record permissions.
// [9905] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9919] Check against the category.
// [9921] Check against the category.
if (!empty($record->catid))
{
$catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid);
@ -373,7 +373,7 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
}
// [9930] In the absense of better information, revert to the component permissions.
// [9932] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.edit.state', 'com_sermondistributor');
}
@ -388,7 +388,7 @@ class SermondistributorModelSermon extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9771] Check specific edit permission then general edit permission.
// [9773] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('sermon.edit', 'com_sermondistributor.sermon.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('sermon.edit', 'com_sermondistributor');
@ -487,20 +487,20 @@ class SermondistributorModelSermon extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
// [8762] check if the not_required field is set
// [8764] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// [8767] now change the required field attributes value
// [8769] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [8770] make sure there is a string value
// [8772] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [8773] change to false
// [8775] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [8775] also clear the data set
// [8777] also clear the data set
$data[$requiredField] = '';
}
}
@ -631,7 +631,7 @@ class SermondistributorModelSermon extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4924] Set some needed variables.
// [4926] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -645,12 +645,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [4944] get list of uniqe fields
// [4946] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4946] remove move_copy from array
// [4948] remove move_copy from array
unset($values['move_copy']);
// [4949] make sure published is set
// [4951] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -666,7 +666,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
// [4974] move the category value to correct field name
// [4976] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@ -677,21 +677,21 @@ class SermondistributorModelSermon extends JModelAdmin
$newIds = array();
// [4986] Parent exists so let's proceed
// [4988] Parent exists so let's proceed
while (!empty($pks))
{
// [4989] Pop the first ID off the stack
// [4991] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4994] only allow copy if user may edit this item.
// [4996] only allow copy if user may edit this item.
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
{
// [5004] Not fatal error
// [5006] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -699,19 +699,19 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [5009] Check that the row actually exists
// [5011] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5014] Fatal error
// [5016] Fatal error
$this->setError($error);
return false;
}
else
{
// [5021] Not fatal error
// [5023] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -726,7 +726,7 @@ class SermondistributorModelSermon extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->generateNewTitle($this->table->catid, $this->table->alias, $this->table->name);
}
// [5057] insert all set values
// [5059] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -738,7 +738,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5069] update all uniqe fields
// [5071] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -747,13 +747,13 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5078] Reset the ID because we are making a copy
// [5080] Reset the ID because we are making a copy
$this->table->id = 0;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5083] TODO: Deal with ordering?
// [5084] $this->table->ordering = 1;
// [5084] Check the row.
// [5086] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -766,7 +766,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5097] Store the row.
// [5099] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -774,14 +774,14 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [5105] Get the new item ID
// [5107] Get the new item ID
$newId = $this->table->get('id');
// [5108] Add the new ID to the array
// [5110] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5112] Clean the cache
// [5114] Clean the cache
$this->cleanCache();
return $newIds;
@ -802,7 +802,7 @@ class SermondistributorModelSermon extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4726] Set some needed variables.
// [4728] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -817,12 +817,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [4748] make sure published only updates if user has the permission.
// [4750] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('sermon.edit.state'))
{
unset($values['published']);
}
// [4761] remove move_copy from array
// [4763] remove move_copy from array
unset($values['move_copy']);
if (isset($values['category']) && (int) $values['category'] > 0 && !static::checkCategoryId($values['category']))
@ -831,7 +831,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
// [4772] move the category value to correct field name
// [4774] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@ -841,7 +841,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [4782] Parent exists so we proceed
// [4784] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
@ -851,30 +851,30 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [4799] Check that the row actually exists
// [4801] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4804] Fatal error
// [4806] Fatal error
$this->setError($error);
return false;
}
else
{
// [4811] Not fatal error
// [4813] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4817] insert all set values.
// [4819] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4822] Do special action for access.
// [4824] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -887,7 +887,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [4834] Check the row.
// [4836] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -900,7 +900,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4847] Store the row.
// [4849] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -909,7 +909,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [4856] Clean the cache
// [4858] Clean the cache
$this->cleanCache();
return true;
@ -959,7 +959,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['params'] = (string) $params;
}
// [5138] Alter the name for save as copy
// [5140] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -982,7 +982,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['published'] = 0;
}
// [5165] Automatic handling of alias for empty fields
// [5167] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -1013,10 +1013,10 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5204] Alter the uniqe field for save as copy
// [5206] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5207] Automatic handling of other uniqe fields
// [5209] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -1070,7 +1070,7 @@ class SermondistributorModelSermon extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5238] Alter the title & alias
// [5240] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -40,7 +40,7 @@ class SermondistributorModelSermondistributor extends JModelList
$viewGroups = array(
'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.help_documents')
);
// [12174] view access array
// [12176] view access array
$viewAccess = array(
'preacher.create' => 'preacher.create',
'preachers.access' => 'preacher.access',

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -124,16 +124,16 @@ class SermondistributorModelSermons extends JModelList
*/
public function getItems()
{
// [10528] check in items
// [10530] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -147,14 +147,14 @@ class SermondistributorModelSermons extends JModelList
}
}
// [10869] set selection value to a translatable value
// [10871] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10876] convert link_type
// [10878] convert link_type
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
// [10876] convert source
// [10878] convert source
$item->source = $this->selectionTranslation($item->source, 'source');
}
}
@ -171,20 +171,20 @@ class SermondistributorModelSermons extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [10902] Array of link_type language strings
// [10904] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [10902] Array of source language strings
// [10904] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -193,7 +193,7 @@ class SermondistributorModelSermons extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [10933] Now check if value is found in this array
// [10935] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -209,29 +209,29 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getListQuery()
{
// [7389] Get the user object.
// [7391] Get the user object.
$user = JFactory::getUser();
// [7391] Create a new query object.
// [7393] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7394] Select some fields
// [7396] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [7401] From the sermondistributor_item table
// [7403] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [7542] From the sermondistributor_preacher table.
// [7544] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [7542] From the sermondistributor_series table.
// [7544] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [7415] Filter by published state
// [7417] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -242,21 +242,21 @@ class SermondistributorModelSermons extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7427] Join over the asset groups.
// [7429] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7430] Filter by access level.
// [7432] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7435] Implement View Level Access
// [7437] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7512] Filter by search.
// [7514] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -271,28 +271,28 @@ class SermondistributorModelSermons extends JModelList
}
}
// [7746] Filter by preacher.
// [7748] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [7746] Filter by series.
// [7748] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [7755] Filter by Link_type.
// [7757] Filter by Link_type.
if ($link_type = $this->getState('filter.link_type'))
{
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
}
// [7755] Filter by Source.
// [7757] Filter by Source.
if ($source = $this->getState('filter.source'))
{
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
}
// [7449] Filter by a single or group of categories.
// [7451] Filter by a single or group of categories.
$baselevel = 1;
$categoryId = $this->getState('filter.category_id');
@ -314,7 +314,7 @@ class SermondistributorModelSermons extends JModelList
}
// [7471] Add the list ordering clause.
// [7473] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -332,42 +332,42 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExportData($pks)
{
// [7179] setup the query
// [7181] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7182] Get the user object.
// [7184] Get the user object.
$user = JFactory::getUser();
// [7184] Create a new query object.
// [7186] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7187] Select some fields
// [7189] Select some fields
$query->select('a.*');
// [7189] From the sermondistributor_sermon table
// [7191] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7199] Implement View Level Access
// [7201] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7206] Order the results by ordering
// [7208] Order the results by ordering
$query->order('a.ordering ASC');
// [7208] Load the items
// [7210] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -378,13 +378,13 @@ class SermondistributorModelSermons extends JModelList
continue;
}
// [10816] unset the values we don't want exported.
// [10818] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10825] Add headers to items array.
// [10827] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -403,13 +403,13 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExImPortHeaders()
{
// [7228] Get a db connection.
// [7230] Get a db connection.
$db = JFactory::getDbo();
// [7230] get the columns
// [7232] get the columns
$columns = $db->getTableColumns("#__sermondistributor_sermon");
if (SermondistributorHelper::checkArray($columns))
{
// [7234] remove the headers you don't import/export.
// [7236] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -431,7 +431,7 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getStoreId($id = '')
{
// [10151] Compile the store id.
// [10153] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -459,15 +459,15 @@ class SermondistributorModelSermons extends JModelList
*/
protected function checkInNow()
{
// [10544] Get set check in time
// [10546] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10549] Get a db connection.
// [10551] Get a db connection.
$db = JFactory::getDbo();
// [10551] reset query
// [10553] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_sermon'));
@ -475,24 +475,24 @@ class SermondistributorModelSermons extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10559] Get Yesterdays date
// [10561] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10561] reset query
// [10563] reset query
$query = $db->getQuery(true);
// [10563] Fields to update.
// [10565] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10568] Conditions for which records should be updated.
// [10570] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10573] Check table
// [10575] Check table
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -111,7 +111,7 @@ class SermondistributorModelStatistic extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9558] Get the form.
{ // [9560] Get the form.
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -121,12 +121,12 @@ class SermondistributorModelStatistic extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -134,36 +134,36 @@ class SermondistributorModelStatistic extends JModelAdmin
$user = JFactory::getUser();
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
// [9656] Check for existing item.
// [9657] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.state', 'com_sermondistributor')))
{
// [9668] Disable fields for display.
// [9670] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9671] Disable fields while saving.
// [9673] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9676] Modify the form based on Edit Creaded By access controls.
// [9678] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created_by', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created_by', 'com_sermondistributor')))
{
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9692] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9692] Disable fields while saving.
// [9694] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9695] Modify the form based on Edit Creaded Date access controls.
// [9697] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created', 'com_sermondistributor')))
{
// [9707] Disable fields for display.
// [9709] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9709] Disable fields while saving.
// [9711] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -199,7 +199,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
$user = JFactory::getUser();
// [9859] The record has been set. Check the record permissions.
// [9861] The record has been set. Check the record permissions.
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
}
return false;
@ -221,14 +221,14 @@ class SermondistributorModelStatistic extends JModelAdmin
if ($recordId)
{
// [9946] The record has been set. Check the record permissions.
// [9948] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9963] In the absense of better information, revert to the component permissions.
// [9965] In the absense of better information, revert to the component permissions.
return $user->authorise('statistic.edit.state', 'com_sermondistributor');
}
@ -243,7 +243,7 @@ class SermondistributorModelStatistic extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9771] Check specific edit permission then general edit permission.
// [9773] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('statistic.edit', 'com_sermondistributor.statistic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('statistic.edit', 'com_sermondistributor');
@ -450,7 +450,7 @@ class SermondistributorModelStatistic extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4924] Set some needed variables.
// [4926] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -464,12 +464,12 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [4944] get list of uniqe fields
// [4946] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4946] remove move_copy from array
// [4948] remove move_copy from array
unset($values['move_copy']);
// [4949] make sure published is set
// [4951] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -481,21 +481,21 @@ class SermondistributorModelStatistic extends JModelAdmin
$newIds = array();
// [4986] Parent exists so let's proceed
// [4988] Parent exists so let's proceed
while (!empty($pks))
{
// [4989] Pop the first ID off the stack
// [4991] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4994] only allow copy if user may edit this item.
// [4996] only allow copy if user may edit this item.
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
{
// [5004] Not fatal error
// [5006] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -503,19 +503,19 @@ class SermondistributorModelStatistic extends JModelAdmin
}
// [5009] Check that the row actually exists
// [5011] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5014] Fatal error
// [5016] Fatal error
$this->setError($error);
return false;
}
else
{
// [5021] Not fatal error
// [5023] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -523,7 +523,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->table->filename = $this->generateUniqe('filename',$this->table->filename);
// [5057] insert all set values
// [5059] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -535,7 +535,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5069] update all uniqe fields
// [5071] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -544,13 +544,13 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5078] Reset the ID because we are making a copy
// [5080] Reset the ID because we are making a copy
$this->table->id = 0;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5083] TODO: Deal with ordering?
// [5084] $this->table->ordering = 1;
// [5084] Check the row.
// [5086] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -563,7 +563,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5097] Store the row.
// [5099] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -571,14 +571,14 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [5105] Get the new item ID
// [5107] Get the new item ID
$newId = $this->table->get('id');
// [5108] Add the new ID to the array
// [5110] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5112] Clean the cache
// [5114] Clean the cache
$this->cleanCache();
return $newIds;
@ -599,7 +599,7 @@ class SermondistributorModelStatistic extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4726] Set some needed variables.
// [4728] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -614,15 +614,15 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [4748] make sure published only updates if user has the permission.
// [4750] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('statistic.edit.state'))
{
unset($values['published']);
}
// [4761] remove move_copy from array
// [4763] remove move_copy from array
unset($values['move_copy']);
// [4782] Parent exists so we proceed
// [4784] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
@ -632,30 +632,30 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [4799] Check that the row actually exists
// [4801] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4804] Fatal error
// [4806] Fatal error
$this->setError($error);
return false;
}
else
{
// [4811] Not fatal error
// [4813] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4817] insert all set values.
// [4819] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4822] Do special action for access.
// [4824] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -668,7 +668,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
// [4834] Check the row.
// [4836] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -681,7 +681,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4847] Store the row.
// [4849] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -690,7 +690,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [4856] Clean the cache
// [4858] Clean the cache
$this->cleanCache();
return true;
@ -728,10 +728,10 @@ class SermondistributorModelStatistic extends JModelAdmin
$data['params'] = (string) $params;
}
// [5204] Alter the uniqe field for save as copy
// [5206] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5207] Automatic handling of other uniqe fields
// [5209] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -784,7 +784,7 @@ class SermondistributorModelStatistic extends JModelAdmin
protected function _generateNewTitle($title)
{
// [5262] Alter the title
// [5264] Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -108,16 +108,16 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getItems()
{
// [10528] check in items
// [10530] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -142,31 +142,31 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getListQuery()
{
// [7389] Get the user object.
// [7391] Get the user object.
$user = JFactory::getUser();
// [7391] Create a new query object.
// [7393] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7394] Select some fields
// [7396] Select some fields
$query->select('a.*');
// [7401] From the sermondistributor_item table
// [7403] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [7542] From the sermondistributor_sermon table.
// [7544] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
// [7542] From the sermondistributor_preacher table.
// [7544] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
// [7542] From the sermondistributor_series table.
// [7544] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
// [7415] Filter by published state
// [7417] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -177,21 +177,21 @@ class SermondistributorModelStatistics extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7427] Join over the asset groups.
// [7429] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7430] Filter by access level.
// [7432] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7435] Implement View Level Access
// [7437] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7512] Filter by search.
// [7514] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -206,23 +206,23 @@ class SermondistributorModelStatistics extends JModelList
}
}
// [7746] Filter by sermon.
// [7748] Filter by sermon.
if ($sermon = $this->getState('filter.sermon'))
{
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
}
// [7746] Filter by preacher.
// [7748] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [7746] Filter by series.
// [7748] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [7471] Add the list ordering clause.
// [7473] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -240,42 +240,42 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExportData($pks)
{
// [7179] setup the query
// [7181] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7182] Get the user object.
// [7184] Get the user object.
$user = JFactory::getUser();
// [7184] Create a new query object.
// [7186] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7187] Select some fields
// [7189] Select some fields
$query->select('a.*');
// [7189] From the sermondistributor_statistic table
// [7191] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7199] Implement View Level Access
// [7201] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7206] Order the results by ordering
// [7208] Order the results by ordering
$query->order('a.ordering ASC');
// [7208] Load the items
// [7210] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10603] set values to display correctly.
// [10605] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10606] get user object.
// [10608] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -286,13 +286,13 @@ class SermondistributorModelStatistics extends JModelList
continue;
}
// [10816] unset the values we don't want exported.
// [10818] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10825] Add headers to items array.
// [10827] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -311,13 +311,13 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExImPortHeaders()
{
// [7228] Get a db connection.
// [7230] Get a db connection.
$db = JFactory::getDbo();
// [7230] get the columns
// [7232] get the columns
$columns = $db->getTableColumns("#__sermondistributor_statistic");
if (SermondistributorHelper::checkArray($columns))
{
// [7234] remove the headers you don't import/export.
// [7236] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -339,7 +339,7 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getStoreId($id = '')
{
// [10151] Compile the store id.
// [10153] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -363,15 +363,15 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function checkInNow()
{
// [10544] Get set check in time
// [10546] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10549] Get a db connection.
// [10551] Get a db connection.
$db = JFactory::getDbo();
// [10551] reset query
// [10553] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_statistic'));
@ -379,24 +379,24 @@ class SermondistributorModelStatistics extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10559] Get Yesterdays date
// [10561] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10561] reset query
// [10563] reset query
$query = $db->getQuery(true);
// [10563] Fields to update.
// [10565] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10568] Conditions for which records should be updated.
// [10570] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10573] Check table
// [10575] Check table
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.2.9
@build 30th November, 2015
@build 1st December, 2015
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php

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