Next commit. All other changes are only random variable name and date changes (due to automation)

This commit is contained in:
Llewellyn van der Merwe 2016-02-26 02:37:42 +02:00
parent 247536e1da
commit 59ce0b8d50
259 changed files with 2829 additions and 2829 deletions

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor] (https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 21st February, 2016
+ *Last Build*: 26th February, 2016
+ *Version*: 1.3.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -60,13 +60,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [10007] Access check.
// [Interpretation 8637] Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [10018] In the absense of better information, revert to the component permissions.
// [Interpretation 8648] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('help_document.create', $this->option);
}
@ -82,13 +82,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10161] get user object.
// [Interpretation 8791] get user object.
$user = JFactory::getUser();
// [10163] get record id.
// [Interpretation 8793] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [10170] Access check.
// [Interpretation 8800] Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
@ -97,17 +97,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
if ($recordId)
{
// [10179] The record has been set. Check the record permissions.
// [Interpretation 8809] 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))
{
// [10201] Now test the owner is the user.
// [Interpretation 8831] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [10205] Need to do a lookup from the model.
// [Interpretation 8835] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
$ownerId = $record->created_by;
}
// [10213] If the owner matches 'me' then allow.
// [Interpretation 8843] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false;
}
}
// [10235] Since there is no permission, revert to the component permissions.
// [Interpretation 8865] Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option);
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -48,29 +48,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData()
{
// [7957] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7959] check if export is allowed for this user.
// [Interpretation 6589] 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'))
{
// [7963] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7966] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [7968] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Help_documents');
// [7970] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7974] now set the data to the spreadsheet
// [Interpretation 6604] 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');
}
}
// [7979] Redirect to the list screen with error.
// [Interpretation 6609] 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;
@ -79,31 +79,31 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData()
{
// [7988] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7990] check if import is allowed for this user.
// [Interpretation 6620] 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'))
{
// [7994] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Help_documents');
// [7996] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [8000] Load headers to session.
// [Interpretation 6630] 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');
// [8006] Redirect to import view.
// [Interpretation 6636] 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;
}
}
// [8018] Redirect to the list screen with error.
// [Interpretation 6648] 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

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -60,13 +60,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [10007] Access check.
// [Interpretation 8637] Access check.
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [10018] In the absense of better information, revert to the component permissions.
// [Interpretation 8648] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('preacher.create', $this->option);
}
@ -82,13 +82,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10161] get user object.
// [Interpretation 8791] get user object.
$user = JFactory::getUser();
// [10163] get record id.
// [Interpretation 8793] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [10170] Access check.
// [Interpretation 8800] Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
@ -97,17 +97,17 @@ class SermondistributorControllerPreacher extends JControllerForm
if ($recordId)
{
// [10179] The record has been set. Check the record permissions.
// [Interpretation 8809] 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))
{
// [10201] Now test the owner is the user.
// [Interpretation 8831] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [10205] Need to do a lookup from the model.
// [Interpretation 8835] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerPreacher extends JControllerForm
$ownerId = $record->created_by;
}
// [10213] If the owner matches 'me' then allow.
// [Interpretation 8843] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerPreacher extends JControllerForm
return false;
}
}
// [10235] Since there is no permission, revert to the component permissions.
// [Interpretation 8865] Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option);
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -48,29 +48,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData()
{
// [7957] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7959] check if export is allowed for this user.
// [Interpretation 6589] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7963] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7966] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [7968] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Preachers');
// [7970] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7974] now set the data to the spreadsheet
// [Interpretation 6604] 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');
}
}
// [7979] Redirect to the list screen with error.
// [Interpretation 6609] 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;
@ -79,31 +79,31 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData()
{
// [7988] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7990] check if import is allowed for this user.
// [Interpretation 6620] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7994] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Preachers');
// [7996] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [8000] Load headers to session.
// [Interpretation 6630] 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');
// [8006] Redirect to import view.
// [Interpretation 6636] 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;
}
}
// [8018] Redirect to the list screen with error.
// [Interpretation 6648] 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

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -60,13 +60,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [10007] Access check.
// [Interpretation 8637] Access check.
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [10018] In the absense of better information, revert to the component permissions.
// [Interpretation 8648] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('series.create', $this->option);
}
@ -82,13 +82,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10161] get user object.
// [Interpretation 8791] get user object.
$user = JFactory::getUser();
// [10163] get record id.
// [Interpretation 8793] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [10170] Access check.
// [Interpretation 8800] Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
@ -97,17 +97,17 @@ class SermondistributorControllerSeries extends JControllerForm
if ($recordId)
{
// [10179] The record has been set. Check the record permissions.
// [Interpretation 8809] 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))
{
// [10201] Now test the owner is the user.
// [Interpretation 8831] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [10205] Need to do a lookup from the model.
// [Interpretation 8835] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerSeries extends JControllerForm
$ownerId = $record->created_by;
}
// [10213] If the owner matches 'me' then allow.
// [Interpretation 8843] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('series.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerSeries extends JControllerForm
return false;
}
}
// [10235] Since there is no permission, revert to the component permissions.
// [Interpretation 8865] Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option);
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -48,29 +48,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData()
{
// [7957] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7959] check if export is allowed for this user.
// [Interpretation 6589] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7963] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7966] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [7968] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Series_list');
// [7970] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7974] now set the data to the spreadsheet
// [Interpretation 6604] 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');
}
}
// [7979] Redirect to the list screen with error.
// [Interpretation 6609] 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;
@ -79,31 +79,31 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData()
{
// [7988] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7990] check if import is allowed for this user.
// [Interpretation 6620] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7994] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Series_list');
// [7996] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [8000] Load headers to session.
// [Interpretation 6630] 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');
// [8006] Redirect to import view.
// [Interpretation 6636] 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;
}
}
// [8018] Redirect to the list screen with error.
// [Interpretation 6648] 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

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -60,10 +60,10 @@ class SermondistributorControllerSermon extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9962] get the user object
// [Interpretation 8592] get the user object
$user = JFactory::getUser();
// [9967] Access check.
// [Interpretation 8597] Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
{
@ -74,13 +74,13 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [9978] If the category has been passed in the URL check it.
// [Interpretation 8608] If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
}
if ($allow === null)
{
// [9987] In the absense of better information, revert to the component permissions.
// [Interpretation 8617] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option);
}
else
@ -100,13 +100,13 @@ class SermondistributorControllerSermon extends JControllerForm
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{ // [10065] get user object.
{ // [Interpretation 8695] get user object.
$user = JFactory::getUser();
// [10067] get record id.
// [Interpretation 8697] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [10074] Access check.
// [Interpretation 8704] Access check.
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
@ -115,17 +115,17 @@ class SermondistributorControllerSermon extends JControllerForm
if ($recordId)
{
// [10083] The record has been set. Check the record permissions.
// [Interpretation 8713] 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))
{
// [10105] Fallback on edit.own. Now test the owner is the user.
// [Interpretation 8735] Fallback on edit.own. Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [10109] Need to do a lookup from the model.
// [Interpretation 8739] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -135,7 +135,7 @@ class SermondistributorControllerSermon extends JControllerForm
$ownerId = $record->created_by;
}
// [10117] If the owner matches 'me' then do the test.
// [Interpretation 8747] If the owner matches 'me' then do the test.
if ($ownerId == $user->id)
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
@ -151,7 +151,7 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [10139] The category has been set. Check the category permissions.
// [Interpretation 8769] The category has been set. Check the category permissions.
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
if (!$catpermission && !is_null($catpermission))
{
@ -159,7 +159,7 @@ class SermondistributorControllerSermon extends JControllerForm
}
}
}
// [10149] Since there is no permission, revert to the component permissions.
// [Interpretation 8779] Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option);
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -48,29 +48,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData()
{
// [7957] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7959] check if export is allowed for this user.
// [Interpretation 6589] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7963] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7966] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [7968] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Sermons');
// [7970] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7974] now set the data to the spreadsheet
// [Interpretation 6604] 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');
}
}
// [7979] Redirect to the list screen with error.
// [Interpretation 6609] 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;
@ -79,31 +79,31 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData()
{
// [7988] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7990] check if import is allowed for this user.
// [Interpretation 6620] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7994] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Sermons');
// [7996] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [8000] Load headers to session.
// [Interpretation 6630] 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');
// [8006] Redirect to import view.
// [Interpretation 6636] 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;
}
}
// [8018] Redirect to the list screen with error.
// [Interpretation 6648] 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

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -60,13 +60,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [10007] Access check.
// [Interpretation 8637] Access check.
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [10018] In the absense of better information, revert to the component permissions.
// [Interpretation 8648] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('statistic.create', $this->option);
}
@ -82,13 +82,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10161] get user object.
// [Interpretation 8791] get user object.
$user = JFactory::getUser();
// [10163] get record id.
// [Interpretation 8793] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [10170] Access check.
// [Interpretation 8800] Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
@ -97,17 +97,17 @@ class SermondistributorControllerStatistic extends JControllerForm
if ($recordId)
{
// [10179] The record has been set. Check the record permissions.
// [Interpretation 8809] 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))
{
// [10201] Now test the owner is the user.
// [Interpretation 8831] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [10205] Need to do a lookup from the model.
// [Interpretation 8835] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerStatistic extends JControllerForm
$ownerId = $record->created_by;
}
// [10213] If the owner matches 'me' then allow.
// [Interpretation 8843] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerStatistic extends JControllerForm
return false;
}
}
// [10235] Since there is no permission, revert to the component permissions.
// [Interpretation 8865] Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option);
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -48,29 +48,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData()
{
// [7957] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7959] check if export is allowed for this user.
// [Interpretation 6589] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7963] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7966] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [7968] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Statistics');
// [7970] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7974] now set the data to the spreadsheet
// [Interpretation 6604] 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');
}
}
// [7979] Redirect to the list screen with error.
// [Interpretation 6609] 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;
@ -79,31 +79,31 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData()
{
// [7988] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7990] check if import is allowed for this user.
// [Interpretation 6620] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7994] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Statistics');
// [7996] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [8000] Load headers to session.
// [Interpretation 6630] 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');
// [8006] Redirect to import view.
// [Interpretation 6636] 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;
}
}
// [8018] Redirect to the list screen with error.
// [Interpretation 6648] 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

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -553,23 +553,23 @@ abstract class SermondistributorHelper
$targetgroups = json_decode($help->groups, true);
if (!array_intersect($targetgroups, $groups))
{
// [1709] if user not in those target groups then remove the item
// [Interpretation 680] if user not in those target groups then remove the item
unset($helps[$nr]);
continue;
}
}
// [1714] set the return type
// [Interpretation 685] set the return type
switch ($help->type)
{
// [1717] set joomla article
// [Interpretation 688] set joomla article
case 1:
return self::loadArticleLink($help->article);
break;
// [1721] set help text
// [Interpretation 692] set help text
case 2:
return self::loadHelpTextLink($help->id);
break;
// [1725] set Link
// [Interpretation 696] set Link
case 3:
return $help->url;
break;
@ -698,7 +698,7 @@ abstract class SermondistributorHelper
{
if (strpos($content,'class="uk-') !== false)
{
// [2953] reset
// [Interpretation 1924] reset
$temp = array();
foreach (self::$uk_components as $looking => $add)
{
@ -707,15 +707,15 @@ abstract class SermondistributorHelper
$temp[] = $looking;
}
}
// [2962] make sure uikit is loaded to config
// [Interpretation 1933] make sure uikit is loaded to config
if (strpos($content,'class="uk-') !== false)
{
self::$uikit = true;
}
// [2967] sorter
// [Interpretation 1938] sorter
if (self::checkArray($temp))
{
// [2970] merger
// [Interpretation 1941] merger
if (self::checkArray($classes))
{
$newTemp = array_merge($temp,$classes);
@ -736,37 +736,37 @@ abstract class SermondistributorHelper
*/
public static function xls($rows,$fileName = null,$title = null,$subjectTab = null,$creator = 'Vast Development Method',$description = null,$category = null,$keywords = null,$modified = null)
{
// [1764] set the user
// [Interpretation 735] set the user
$user = JFactory::getUser();
// [1767] set fieldname if not set
// [Interpretation 738] set fieldname if not set
if (!$fileName)
{
$fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y');
}
// [1772] set modiefied if not set
// [Interpretation 743] set modiefied if not set
if (!$modified)
{
$modified = $user->name;
}
// [1777] set title if not set
// [Interpretation 748] set title if not set
if (!$title)
{
$title = 'Book1';
}
// [1782] set tab name if not set
// [Interpretation 753] set tab name if not set
if (!$subjectTab)
{
$subjectTab = 'Sheet1';
}
// [1788] make sure the file is loaded
// [Interpretation 759] make sure the file is loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
// [1791] Create new PHPExcel object
// [Interpretation 762] Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// [1794] Set document properties
// [Interpretation 765] Set document properties
$objPHPExcel->getProperties()->setCreator($creator)
->setCompany('Vast Development Method')
->setLastModifiedBy($modified)
@ -785,7 +785,7 @@ abstract class SermondistributorHelper
$objPHPExcel->getProperties()->setCategory($category);
}
// [1813] Some styles
// [Interpretation 784] Some styles
$headerStyles = array(
'font' => array(
'bold' => true,
@ -807,7 +807,7 @@ abstract class SermondistributorHelper
'name' => 'Verdana'
));
// [1835] Add some data
// [Interpretation 806] Add some data
if (self::checkArray($rows))
{
$i = 1;
@ -834,20 +834,20 @@ abstract class SermondistributorHelper
return false;
}
// [1862] Rename worksheet
// [Interpretation 833] Rename worksheet
$objPHPExcel->getActiveSheet()->setTitle($subjectTab);
// [1865] Set active sheet index to the first sheet, so Excel opens this as the first sheet
// [Interpretation 836] Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0);
// [1868] Redirect output to a client's web browser (Excel5)
// [Interpretation 839] Redirect output to a client's web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$fileName.'.xls"');
header('Cache-Control: max-age=0');
// [1872] If you're serving to IE 9, then the following may be needed
// [Interpretation 843] If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1');
// [1875] If you're serving to IE over SSL, then the following may be needed
// [Interpretation 846] If you're serving to IE over SSL, then the following may be needed
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
@ -863,13 +863,13 @@ abstract class SermondistributorHelper
*/
public static function getFileHeaders($dataType)
{
// [1891] make sure the file is loaded
// [Interpretation 862] make sure the file is loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
// [1893] get session object
// [Interpretation 864] get session object
$session = JFactory::getSession();
$package = $session->get('package', null);
$package = json_decode($package, true);
// [1897] set the headers
// [Interpretation 868] set the headers
if(isset($package['dir']))
{
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -28,7 +28,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->rrksermons;
$items = $displayData->mzrsermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -28,7 +28,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->soesermons;
$items = $displayData->himsermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage files_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php
@ -28,7 +28,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->wczstastics;
$items = $displayData->kyqstastics;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.php
@ -43,7 +43,7 @@ class SermondistributorModelAjax extends JModelList
}
// [9604] Used in sermon
// [Interpretation 8234] Used in sermon
/**
* Check and Set Dropbox local listing
**/

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage articles.php
@ -48,38 +48,38 @@ class JFormFieldArticles extends JFormFieldList
*
* @since 3.2
*/
protected function getInput()
public function getInput()
{
// [8379] see if we should add buttons
// [Interpretation 7009] see if we should add buttons
$setButton = $this->getAttribute('button');
// [8381] get html
// [Interpretation 7011] get html
$html = parent::getInput();
// [8383] if true set button
// [Interpretation 7013] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [8387] only add if user allowed to create article
// [Interpretation 7017] only add if user allowed to create article
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [8405] get the input from url
// [Interpretation 7035] get the input from url
$jinput = JFactory::getApplication()->input;
// [8407] get the view name & id
// [Interpretation 7037] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [8412] check if new item
// [Interpretation 7042] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [8416] only load referal if not new item.
// [Interpretation 7046] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
// [8419] build the button
// [Interpretation 7049] 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>';
// [8423] return the button attached to input field
// [Interpretation 7053] return the button attached to input field
return $html . $button;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dropboxfiles.php
@ -48,38 +48,38 @@ class JFormFieldDropboxfiles extends JFormFieldList
*
* @since 3.2
*/
protected function getInput()
public function getInput()
{
// [8379] see if we should add buttons
// [Interpretation 7009] see if we should add buttons
$setButton = $this->getAttribute('button');
// [8381] get html
// [Interpretation 7011] get html
$html = parent::getInput();
// [8383] if true set button
// [Interpretation 7013] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [8387] only add if user allowed to create
// [Interpretation 7017] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [8405] get the input from url
// [Interpretation 7035] get the input from url
$jinput = JFactory::getApplication()->input;
// [8407] get the view name & id
// [Interpretation 7037] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [8412] check if new item
// [Interpretation 7042] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [8416] only load referal if not new item.
// [Interpretation 7046] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [8419] build the button
// [Interpretation 7049] 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>';
// [8423] return the button attached to input field
// [Interpretation 7053] return the button attached to input field
return $html . $button;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage localfiles.php
@ -48,38 +48,38 @@ class JFormFieldLocalfiles extends JFormFieldList
*
* @since 3.2
*/
protected function getInput()
public function getInput()
{
// [8379] see if we should add buttons
// [Interpretation 7009] see if we should add buttons
$setButton = $this->getAttribute('button');
// [8381] get html
// [Interpretation 7011] get html
$html = parent::getInput();
// [8383] if true set button
// [Interpretation 7013] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [8387] only add if user allowed to create
// [Interpretation 7017] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [8405] get the input from url
// [Interpretation 7035] get the input from url
$jinput = JFactory::getApplication()->input;
// [8407] get the view name & id
// [Interpretation 7037] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [8412] check if new item
// [Interpretation 7042] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [8416] only load referal if not new item.
// [Interpretation 7046] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [8419] build the button
// [Interpretation 7049] 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>';
// [8423] return the button attached to input field
// [Interpretation 7053] return the button attached to input field
return $html . $button;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -48,38 +48,38 @@ class JFormFieldPreachers extends JFormFieldList
*
* @since 3.2
*/
protected function getInput()
public function getInput()
{
// [8379] see if we should add buttons
// [Interpretation 7009] see if we should add buttons
$setButton = $this->getAttribute('button');
// [8381] get html
// [Interpretation 7011] get html
$html = parent::getInput();
// [8383] if true set button
// [Interpretation 7013] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [8387] only add if user allowed to create preacher
// [Interpretation 7017] only add if user allowed to create preacher
if ($user->authorise('preacher.create', 'com_sermondistributor'))
{
// [8405] get the input from url
// [Interpretation 7035] get the input from url
$jinput = JFactory::getApplication()->input;
// [8407] get the view name & id
// [Interpretation 7037] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [8412] check if new item
// [Interpretation 7042] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [8416] only load referal if not new item.
// [Interpretation 7046] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [8419] build the button
// [Interpretation 7049] 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>';
// [8423] return the button attached to input field
// [Interpretation 7053] return the button attached to input field
return $html . $button;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -48,38 +48,38 @@ class JFormFieldSeries extends JFormFieldList
*
* @since 3.2
*/
protected function getInput()
public function getInput()
{
// [8379] see if we should add buttons
// [Interpretation 7009] see if we should add buttons
$setButton = $this->getAttribute('button');
// [8381] get html
// [Interpretation 7011] get html
$html = parent::getInput();
// [8383] if true set button
// [Interpretation 7013] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [8387] only add if user allowed to create series
// [Interpretation 7017] only add if user allowed to create series
if ($user->authorise('series.create', 'com_sermondistributor'))
{
// [8405] get the input from url
// [Interpretation 7035] get the input from url
$jinput = JFactory::getApplication()->input;
// [8407] get the view name & id
// [Interpretation 7037] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [8412] check if new item
// [Interpretation 7042] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [8416] only load referal if not new item.
// [Interpretation 7046] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [8419] build the button
// [Interpretation 7049] 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>';
// [8423] return the button attached to input field
// [Interpretation 7053] return the button attached to input field
return $html . $button;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -48,38 +48,38 @@ class JFormFieldSermon extends JFormFieldList
*
* @since 3.2
*/
protected function getInput()
public function getInput()
{
// [8379] see if we should add buttons
// [Interpretation 7009] see if we should add buttons
$setButton = $this->getAttribute('button');
// [8381] get html
// [Interpretation 7011] get html
$html = parent::getInput();
// [8383] if true set button
// [Interpretation 7013] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [8387] only add if user allowed to create sermon
// [Interpretation 7017] only add if user allowed to create sermon
if ($user->authorise('sermon.create', 'com_sermondistributor'))
{
// [8405] get the input from url
// [Interpretation 7035] get the input from url
$jinput = JFactory::getApplication()->input;
// [8407] get the view name & id
// [Interpretation 7037] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [8412] check if new item
// [Interpretation 7042] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [8416] only load referal if not new item.
// [Interpretation 7046] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [8419] build the button
// [Interpretation 7049] 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>';
// [8423] return the button attached to input field
// [Interpretation 7053] return the button attached to input field
return $html . $button;
}
}

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.js
@ -23,38 +23,38 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_jcTlLIzzmU_required = false;
jform_IQphLzkpQA_required = false;
jform_pWDgJoNcvN_required = false;
jform_hLRaUvJvdU_required = false;
jform_NCKgxlwFZY_required = false;
jform_XCxooMvuZd_required = false;
jform_pgDLIJxzwT_required = false;
jform_nhDdpbtHGn_required = false;
// Initial Script
jQuery(document).ready(function()
{
var location_zkpehfO = jQuery("#jform_location input[type='radio']:checked").val();
zkpehfO(location_zkpehfO);
var location_hmAPgsz = jQuery("#jform_location input[type='radio']:checked").val();
hmAPgsz(location_hmAPgsz);
var location_RSFshae = jQuery("#jform_location input[type='radio']:checked").val();
RSFshae(location_RSFshae);
var location_BhHQJDK = jQuery("#jform_location input[type='radio']:checked").val();
BhHQJDK(location_BhHQJDK);
var type_jcTlLIz = jQuery("#jform_type").val();
jcTlLIz(type_jcTlLIz);
var type_NCKgxlw = jQuery("#jform_type").val();
NCKgxlw(type_NCKgxlw);
var type_IQphLzk = jQuery("#jform_type").val();
IQphLzk(type_IQphLzk);
var type_XCxooMv = jQuery("#jform_type").val();
XCxooMv(type_XCxooMv);
var type_pWDgJoN = jQuery("#jform_type").val();
pWDgJoN(type_pWDgJoN);
var type_pgDLIJx = jQuery("#jform_type").val();
pgDLIJx(type_pgDLIJx);
var target_hLRaUvJ = jQuery("#jform_target input[type='radio']:checked").val();
hLRaUvJ(target_hLRaUvJ);
var target_nhDdpbt = jQuery("#jform_target input[type='radio']:checked").val();
nhDdpbt(target_nhDdpbt);
});
// the zkpehfO function
function zkpehfO(location_zkpehfO)
// the hmAPgsz function
function hmAPgsz(location_hmAPgsz)
{
// [8696] set the function logic
if (location_zkpehfO == 1)
// [Interpretation 7326] set the function logic
if (location_hmAPgsz == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
}
@ -64,11 +64,11 @@ function zkpehfO(location_zkpehfO)
}
}
// the RSFshae function
function RSFshae(location_RSFshae)
// the BhHQJDK function
function BhHQJDK(location_BhHQJDK)
{
// [8696] set the function logic
if (location_RSFshae == 2)
// [Interpretation 7326] set the function logic
if (location_BhHQJDK == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
}
@ -78,198 +78,198 @@ function RSFshae(location_RSFshae)
}
}
// the jcTlLIz function
function jcTlLIz(type_jcTlLIz)
// the NCKgxlw function
function NCKgxlw(type_NCKgxlw)
{
if (isSet(type_jcTlLIz) && type_jcTlLIz.constructor !== Array)
if (isSet(type_NCKgxlw) && type_NCKgxlw.constructor !== Array)
{
var temp_jcTlLIz = type_jcTlLIz;
var type_jcTlLIz = [];
type_jcTlLIz.push(temp_jcTlLIz);
var temp_NCKgxlw = type_NCKgxlw;
var type_NCKgxlw = [];
type_NCKgxlw.push(temp_NCKgxlw);
}
else if (!isSet(type_jcTlLIz))
else if (!isSet(type_NCKgxlw))
{
var type_jcTlLIz = [];
var type_NCKgxlw = [];
}
var type = type_jcTlLIz.some(type_jcTlLIz_SomeFunc);
var type = type_NCKgxlw.some(type_NCKgxlw_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_jcTlLIzzmU_required)
if (jform_NCKgxlwFZY_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_jcTlLIzzmU_required = false;
jform_NCKgxlwFZY_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_jcTlLIzzmU_required)
if (!jform_NCKgxlwFZY_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_jcTlLIzzmU_required = true;
jform_NCKgxlwFZY_required = true;
}
}
}
// the jcTlLIz Some function
function type_jcTlLIz_SomeFunc(type_jcTlLIz)
// the NCKgxlw Some function
function type_NCKgxlw_SomeFunc(type_NCKgxlw)
{
// [8661] set the function logic
if (type_jcTlLIz == 3)
// [Interpretation 7291] set the function logic
if (type_NCKgxlw == 3)
{
return true;
}
return false;
}
// the IQphLzk function
function IQphLzk(type_IQphLzk)
// the XCxooMv function
function XCxooMv(type_XCxooMv)
{
if (isSet(type_IQphLzk) && type_IQphLzk.constructor !== Array)
if (isSet(type_XCxooMv) && type_XCxooMv.constructor !== Array)
{
var temp_IQphLzk = type_IQphLzk;
var type_IQphLzk = [];
type_IQphLzk.push(temp_IQphLzk);
var temp_XCxooMv = type_XCxooMv;
var type_XCxooMv = [];
type_XCxooMv.push(temp_XCxooMv);
}
else if (!isSet(type_IQphLzk))
else if (!isSet(type_XCxooMv))
{
var type_IQphLzk = [];
var type_XCxooMv = [];
}
var type = type_IQphLzk.some(type_IQphLzk_SomeFunc);
var type = type_XCxooMv.some(type_XCxooMv_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_IQphLzkpQA_required)
if (jform_XCxooMvuZd_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_IQphLzkpQA_required = false;
jform_XCxooMvuZd_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_IQphLzkpQA_required)
if (!jform_XCxooMvuZd_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_IQphLzkpQA_required = true;
jform_XCxooMvuZd_required = true;
}
}
}
// the IQphLzk Some function
function type_IQphLzk_SomeFunc(type_IQphLzk)
// the XCxooMv Some function
function type_XCxooMv_SomeFunc(type_XCxooMv)
{
// [8661] set the function logic
if (type_IQphLzk == 1)
// [Interpretation 7291] set the function logic
if (type_XCxooMv == 1)
{
return true;
}
return false;
}
// the pWDgJoN function
function pWDgJoN(type_pWDgJoN)
// the pgDLIJx function
function pgDLIJx(type_pgDLIJx)
{
if (isSet(type_pWDgJoN) && type_pWDgJoN.constructor !== Array)
if (isSet(type_pgDLIJx) && type_pgDLIJx.constructor !== Array)
{
var temp_pWDgJoN = type_pWDgJoN;
var type_pWDgJoN = [];
type_pWDgJoN.push(temp_pWDgJoN);
var temp_pgDLIJx = type_pgDLIJx;
var type_pgDLIJx = [];
type_pgDLIJx.push(temp_pgDLIJx);
}
else if (!isSet(type_pWDgJoN))
else if (!isSet(type_pgDLIJx))
{
var type_pWDgJoN = [];
var type_pgDLIJx = [];
}
var type = type_pWDgJoN.some(type_pWDgJoN_SomeFunc);
var type = type_pgDLIJx.some(type_pgDLIJx_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_pWDgJoNcvN_required)
if (jform_pgDLIJxzwT_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_pWDgJoNcvN_required = false;
jform_pgDLIJxzwT_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_pWDgJoNcvN_required)
if (!jform_pgDLIJxzwT_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_pWDgJoNcvN_required = true;
jform_pgDLIJxzwT_required = true;
}
}
}
// the pWDgJoN Some function
function type_pWDgJoN_SomeFunc(type_pWDgJoN)
// the pgDLIJx Some function
function type_pgDLIJx_SomeFunc(type_pgDLIJx)
{
// [8661] set the function logic
if (type_pWDgJoN == 2)
// [Interpretation 7291] set the function logic
if (type_pgDLIJx == 2)
{
return true;
}
return false;
}
// the hLRaUvJ function
function hLRaUvJ(target_hLRaUvJ)
// the nhDdpbt function
function nhDdpbt(target_nhDdpbt)
{
// [8696] set the function logic
if (target_hLRaUvJ == 1)
// [Interpretation 7326] set the function logic
if (target_nhDdpbt == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_hLRaUvJvdU_required)
if (jform_nhDdpbtHGn_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_hLRaUvJvdU_required = false;
jform_nhDdpbtHGn_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_hLRaUvJvdU_required)
if (!jform_nhDdpbtHGn_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_hLRaUvJvdU_required = true;
jform_nhDdpbtHGn_required = true;
}
}
}

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [11731] Default Fields. -->
<!-- [11732] Id Field. Type: Text (joomla) -->
<!-- [Interpretation 10361] Default Fields. -->
<!-- [Interpretation 10362] 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"
/>
<!-- [11739] Date Created Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10369] 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"
/>
<!-- [11750] User Created Field. Type: User (joomla) -->
<!-- [Interpretation 10380] 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"
/>
<!-- [11758] Published Field. Type: List (joomla) -->
<!-- [Interpretation 10388] 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>
<!-- [11773] Date Modified Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10403] 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" />
<!-- [11777] User Modified Field. Type: User (joomla) -->
<!-- [Interpretation 10407] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11787] Access Field. Type: Accesslevel (joomla) -->
<!-- [Interpretation 10417] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11797] Ordering Field. Type: Numbers (joomla) -->
<!-- [Interpretation 10427] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11809] Version Field. Type: Text (joomla) -->
<!-- [Interpretation 10439] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11823] Metakey Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10453] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11832] Metadesc Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10462] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11842] Dynamic Fields. -->
<!-- [12078] Title Field. Type: Text. (joomla) -->
<!-- [Interpretation 10472] Dynamic Fields. -->
<!-- [Interpretation 10708] 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"
/>
<!-- [11992] Type Field. Type: List. (joomla) -->
<!-- [Interpretation 10622] Type Field. Type: List. (joomla) -->
<field
type="list"
name="type"
@ -127,7 +127,7 @@
class="list_class"
multiple="false"
required="true">
<!-- [12064] Option Set. -->
<!-- [Interpretation 10694] 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>
<!-- [12078] Groups Field. Type: Usergroup. (joomla) -->
<!-- [Interpretation 10708] Groups Field. Type: Usergroup. (joomla) -->
<field
type="usergroup"
name="groups"
@ -146,7 +146,7 @@
required="true"
multiple="true"
/>
<!-- [11992] Location Field. Type: Radio. (joomla) -->
<!-- [Interpretation 10622] 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">
<!-- [12064] Option Set. -->
<!-- [Interpretation 10694] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN</option>
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option>
</field>
<!-- [12078] Admin_view Field. Type: Folderlist. (joomla) -->
<!-- [Interpretation 10708] Admin_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="admin_view"
@ -170,7 +170,7 @@
hide_none="true"
hide_default="true"
/>
<!-- [12078] Site_view Field. Type: Folderlist. (joomla) -->
<!-- [Interpretation 10708] Site_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="site_view"
@ -180,7 +180,7 @@
hide_none="true"
hide_default="true"
/>
<!-- [11992] Target Field. Type: Radio. (joomla) -->
<!-- [Interpretation 10622] 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">
<!-- [12064] Option Set. -->
<!-- [Interpretation 10694] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME</option>
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL</option>
</field>
<!-- [12078] Content Field. Type: Editor. (joomla) -->
<!-- [Interpretation 10708] Content Field. Type: Editor. (joomla) -->
<field
type="editor"
name="content"
@ -205,7 +205,7 @@
filter="safehtml"
required="true"
/>
<!-- [12078] Alias Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -214,7 +214,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT"
/>
<!-- [12199] Article Field. Type: Articles. (custom) -->
<!-- [Interpretation 10829] Article Field. Type: Articles. (custom) -->
<field
type="articles"
name="article"
@ -224,7 +224,7 @@
default="0"
required="true"
/>
<!-- [12078] Url Field. Type: Url. (joomla) -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Not_required Field. Type: Hidden. (joomla) -->
<!-- [Interpretation 10708] Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
@ -247,11 +247,11 @@
/>
</fieldset>
<!-- [11861] Metadata Fields. -->
<!-- [Interpretation 10491] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11865] Robots Field. Type: List (joomla) -->
<!-- [Interpretation 10495] 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>
<!-- [11876] Author Field. Type: Text (joomla) -->
<!-- [Interpretation 10506] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11882] Rights Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10512] 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>
<!-- [10764] Access Control Fields. -->
<!-- [Interpretation 9394] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10766] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9396] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10772] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9402] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@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">
<!-- [11731] Default Fields. -->
<!-- [11732] Id Field. Type: Text (joomla) -->
<!-- [Interpretation 10361] Default Fields. -->
<!-- [Interpretation 10362] 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"
/>
<!-- [11739] Date Created Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10369] 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"
/>
<!-- [11750] User Created Field. Type: User (joomla) -->
<!-- [Interpretation 10380] 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"
/>
<!-- [11758] Published Field. Type: List (joomla) -->
<!-- [Interpretation 10388] 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>
<!-- [11773] Date Modified Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10403] 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" />
<!-- [11777] User Modified Field. Type: User (joomla) -->
<!-- [Interpretation 10407] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11787] Access Field. Type: Accesslevel (joomla) -->
<!-- [Interpretation 10417] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11797] Ordering Field. Type: Numbers (joomla) -->
<!-- [Interpretation 10427] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11809] Version Field. Type: Text (joomla) -->
<!-- [Interpretation 10439] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11823] Metakey Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10453] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11832] Metadesc Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10462] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11842] Dynamic Fields. -->
<!-- [12078] Name Field. Type: Text. (joomla) -->
<!-- [Interpretation 10472] Dynamic Fields. -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Description Field. Type: Editor. (joomla) -->
<!-- [Interpretation 10708] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -130,7 +130,7 @@
buttons="false"
filter="safehtml"
/>
<!-- [12078] Alias Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -139,7 +139,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT"
/>
<!-- [12078] Email Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Website Field. Type: Url. (joomla) -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Icon Field. Type: Media. (joomla) -->
<!-- [Interpretation 10708] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -178,11 +178,11 @@
/>
</fieldset>
<!-- [11861] Metadata Fields. -->
<!-- [Interpretation 10491] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11865] Robots Field. Type: List (joomla) -->
<!-- [Interpretation 10495] 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>
<!-- [11876] Author Field. Type: Text (joomla) -->
<!-- [Interpretation 10506] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11882] Rights Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10512] 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>
<!-- [10764] Access Control Fields. -->
<!-- [Interpretation 9394] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10766] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9396] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10772] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9402] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@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">
<!-- [11731] Default Fields. -->
<!-- [11732] Id Field. Type: Text (joomla) -->
<!-- [Interpretation 10361] Default Fields. -->
<!-- [Interpretation 10362] 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"
/>
<!-- [11739] Date Created Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10369] 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"
/>
<!-- [11750] User Created Field. Type: User (joomla) -->
<!-- [Interpretation 10380] 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"
/>
<!-- [11758] Published Field. Type: List (joomla) -->
<!-- [Interpretation 10388] 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>
<!-- [11773] Date Modified Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10403] 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" />
<!-- [11777] User Modified Field. Type: User (joomla) -->
<!-- [Interpretation 10407] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11787] Access Field. Type: Accesslevel (joomla) -->
<!-- [Interpretation 10417] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11797] Ordering Field. Type: Numbers (joomla) -->
<!-- [Interpretation 10427] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11809] Version Field. Type: Text (joomla) -->
<!-- [Interpretation 10439] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11823] Metakey Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10453] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11832] Metadesc Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10462] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11842] Dynamic Fields. -->
<!-- [12078] Name Field. Type: Text. (joomla) -->
<!-- [Interpretation 10472] Dynamic Fields. -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Description Field. Type: Editor. (joomla) -->
<!-- [Interpretation 10708] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -130,7 +130,7 @@
buttons="false"
filter="safehtml"
/>
<!-- [12078] Alias Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -139,7 +139,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT"
/>
<!-- [12078] Icon Field. Type: Media. (joomla) -->
<!-- [Interpretation 10708] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -147,7 +147,7 @@
description="COM_SERMONDISTRIBUTOR_SERIES_ICON_DESCRIPTION"
directory=""
/>
<!-- [12078] Scripture Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] Scripture Field. Type: Text. (joomla) -->
<field
type="text"
name="scripture"
@ -165,11 +165,11 @@
/>
</fieldset>
<!-- [11861] Metadata Fields. -->
<!-- [Interpretation 10491] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11865] Robots Field. Type: List (joomla) -->
<!-- [Interpretation 10495] 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>
<!-- [11876] Author Field. Type: Text (joomla) -->
<!-- [Interpretation 10506] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11882] Rights Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10512] 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>
<!-- [10764] Access Control Fields. -->
<!-- [Interpretation 9394] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10766] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9396] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10772] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9402] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.js
@ -23,127 +23,127 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_faEnFllAiT_required = false;
jform_DQWFhNVlPF_required = false;
jform_uoNLWYHarm_required = false;
jform_WZlRgqxKFH_required = false;
jform_ZkxVREMNVv_required = false;
jform_LeYQWzTzQy_required = false;
jform_nqLwYLVFNU_required = false;
jform_vGBwfrOvWo_required = false;
jform_sqkUWYdCaz_required = false;
jform_htLRPCvMmp_required = false;
// Initial Script
jQuery(document).ready(function()
{
var source_faEnFll = jQuery("#jform_source").val();
faEnFll(source_faEnFll);
var source_LeYQWzT = jQuery("#jform_source").val();
LeYQWzT(source_LeYQWzT);
var source_dmLWMYS = jQuery("#jform_source").val();
var build_dmLWMYS = jQuery("#jform_build input[type='radio']:checked").val();
dmLWMYS(source_dmLWMYS,build_dmLWMYS);
var source_qFuRtXH = jQuery("#jform_source").val();
var build_qFuRtXH = jQuery("#jform_build input[type='radio']:checked").val();
qFuRtXH(source_qFuRtXH,build_qFuRtXH);
var source_DQWFhNV = jQuery("#jform_source").val();
var build_DQWFhNV = jQuery("#jform_build input[type='radio']:checked").val();
DQWFhNV(source_DQWFhNV,build_DQWFhNV);
var source_nqLwYLV = jQuery("#jform_source").val();
var build_nqLwYLV = jQuery("#jform_build input[type='radio']:checked").val();
nqLwYLV(source_nqLwYLV,build_nqLwYLV);
var build_uoNLWYH = jQuery("#jform_build input[type='radio']:checked").val();
var source_uoNLWYH = jQuery("#jform_source").val();
uoNLWYH(build_uoNLWYH,source_uoNLWYH);
var build_vGBwfrO = jQuery("#jform_build input[type='radio']:checked").val();
var source_vGBwfrO = jQuery("#jform_source").val();
vGBwfrO(build_vGBwfrO,source_vGBwfrO);
var source_WZlRgqx = jQuery("#jform_source").val();
WZlRgqx(source_WZlRgqx);
var source_sqkUWYd = jQuery("#jform_source").val();
sqkUWYd(source_sqkUWYd);
var source_ZkxVREM = jQuery("#jform_source").val();
ZkxVREM(source_ZkxVREM);
var source_htLRPCv = jQuery("#jform_source").val();
htLRPCv(source_htLRPCv);
var link_type_muRdbJc = jQuery("#jform_link_type input[type='radio']:checked").val();
muRdbJc(link_type_muRdbJc);
var link_type_BPUcgat = jQuery("#jform_link_type input[type='radio']:checked").val();
BPUcgat(link_type_BPUcgat);
var link_type_CJtVLni = jQuery("#jform_link_type input[type='radio']:checked").val();
CJtVLni(link_type_CJtVLni);
var link_type_TvqhKCs = jQuery("#jform_link_type input[type='radio']:checked").val();
TvqhKCs(link_type_TvqhKCs);
});
// the faEnFll function
function faEnFll(source_faEnFll)
// the LeYQWzT function
function LeYQWzT(source_LeYQWzT)
{
if (isSet(source_faEnFll) && source_faEnFll.constructor !== Array)
if (isSet(source_LeYQWzT) && source_LeYQWzT.constructor !== Array)
{
var temp_faEnFll = source_faEnFll;
var source_faEnFll = [];
source_faEnFll.push(temp_faEnFll);
var temp_LeYQWzT = source_LeYQWzT;
var source_LeYQWzT = [];
source_LeYQWzT.push(temp_LeYQWzT);
}
else if (!isSet(source_faEnFll))
else if (!isSet(source_LeYQWzT))
{
var source_faEnFll = [];
var source_LeYQWzT = [];
}
var source = source_faEnFll.some(source_faEnFll_SomeFunc);
var source = source_LeYQWzT.some(source_LeYQWzT_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (source)
{
jQuery('#jform_build').closest('.control-group').show();
if (jform_faEnFllAiT_required)
if (jform_LeYQWzTzQy_required)
{
updateFieldRequired('build',0);
jQuery('#jform_build').prop('required','required');
jQuery('#jform_build').attr('aria-required',true);
jQuery('#jform_build').addClass('required');
jform_faEnFllAiT_required = false;
jform_LeYQWzTzQy_required = false;
}
}
else
{
jQuery('#jform_build').closest('.control-group').hide();
if (!jform_faEnFllAiT_required)
if (!jform_LeYQWzTzQy_required)
{
updateFieldRequired('build',1);
jQuery('#jform_build').removeAttr('required');
jQuery('#jform_build').removeAttr('aria-required');
jQuery('#jform_build').removeClass('required');
jform_faEnFllAiT_required = true;
jform_LeYQWzTzQy_required = true;
}
}
}
// the faEnFll Some function
function source_faEnFll_SomeFunc(source_faEnFll)
// the LeYQWzT Some function
function source_LeYQWzT_SomeFunc(source_LeYQWzT)
{
// [8661] set the function logic
if (source_faEnFll == 2)
// [Interpretation 7291] set the function logic
if (source_LeYQWzT == 2)
{
return true;
}
return false;
}
// the dmLWMYS function
function dmLWMYS(source_dmLWMYS,build_dmLWMYS)
// the qFuRtXH function
function qFuRtXH(source_qFuRtXH,build_qFuRtXH)
{
if (isSet(source_dmLWMYS) && source_dmLWMYS.constructor !== Array)
if (isSet(source_qFuRtXH) && source_qFuRtXH.constructor !== Array)
{
var temp_dmLWMYS = source_dmLWMYS;
var source_dmLWMYS = [];
source_dmLWMYS.push(temp_dmLWMYS);
var temp_qFuRtXH = source_qFuRtXH;
var source_qFuRtXH = [];
source_qFuRtXH.push(temp_qFuRtXH);
}
else if (!isSet(source_dmLWMYS))
else if (!isSet(source_qFuRtXH))
{
var source_dmLWMYS = [];
var source_qFuRtXH = [];
}
var source = source_dmLWMYS.some(source_dmLWMYS_SomeFunc);
var source = source_qFuRtXH.some(source_qFuRtXH_SomeFunc);
if (isSet(build_dmLWMYS) && build_dmLWMYS.constructor !== Array)
if (isSet(build_qFuRtXH) && build_qFuRtXH.constructor !== Array)
{
var temp_dmLWMYS = build_dmLWMYS;
var build_dmLWMYS = [];
build_dmLWMYS.push(temp_dmLWMYS);
var temp_qFuRtXH = build_qFuRtXH;
var build_qFuRtXH = [];
build_qFuRtXH.push(temp_qFuRtXH);
}
else if (!isSet(build_dmLWMYS))
else if (!isSet(build_qFuRtXH))
{
var build_dmLWMYS = [];
var build_qFuRtXH = [];
}
var build = build_dmLWMYS.some(build_dmLWMYS_SomeFunc);
var build = build_qFuRtXH.some(build_qFuRtXH_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (source && build)
{
jQuery('.note_auto_dropbox').closest('.control-group').show();
@ -154,67 +154,67 @@ function dmLWMYS(source_dmLWMYS,build_dmLWMYS)
}
}
// the dmLWMYS Some function
function source_dmLWMYS_SomeFunc(source_dmLWMYS)
// the qFuRtXH Some function
function source_qFuRtXH_SomeFunc(source_qFuRtXH)
{
// [8661] set the function logic
if (source_dmLWMYS == 2)
// [Interpretation 7291] set the function logic
if (source_qFuRtXH == 2)
{
return true;
}
return false;
}
// the dmLWMYS Some function
function build_dmLWMYS_SomeFunc(build_dmLWMYS)
// the qFuRtXH Some function
function build_qFuRtXH_SomeFunc(build_qFuRtXH)
{
// [8661] set the function logic
if (build_dmLWMYS == 2)
// [Interpretation 7291] set the function logic
if (build_qFuRtXH == 2)
{
return true;
}
return false;
}
// the DQWFhNV function
function DQWFhNV(source_DQWFhNV,build_DQWFhNV)
// the nqLwYLV function
function nqLwYLV(source_nqLwYLV,build_nqLwYLV)
{
if (isSet(source_DQWFhNV) && source_DQWFhNV.constructor !== Array)
if (isSet(source_nqLwYLV) && source_nqLwYLV.constructor !== Array)
{
var temp_DQWFhNV = source_DQWFhNV;
var source_DQWFhNV = [];
source_DQWFhNV.push(temp_DQWFhNV);
var temp_nqLwYLV = source_nqLwYLV;
var source_nqLwYLV = [];
source_nqLwYLV.push(temp_nqLwYLV);
}
else if (!isSet(source_DQWFhNV))
else if (!isSet(source_nqLwYLV))
{
var source_DQWFhNV = [];
var source_nqLwYLV = [];
}
var source = source_DQWFhNV.some(source_DQWFhNV_SomeFunc);
var source = source_nqLwYLV.some(source_nqLwYLV_SomeFunc);
if (isSet(build_DQWFhNV) && build_DQWFhNV.constructor !== Array)
if (isSet(build_nqLwYLV) && build_nqLwYLV.constructor !== Array)
{
var temp_DQWFhNV = build_DQWFhNV;
var build_DQWFhNV = [];
build_DQWFhNV.push(temp_DQWFhNV);
var temp_nqLwYLV = build_nqLwYLV;
var build_nqLwYLV = [];
build_nqLwYLV.push(temp_nqLwYLV);
}
else if (!isSet(build_DQWFhNV))
else if (!isSet(build_nqLwYLV))
{
var build_DQWFhNV = [];
var build_nqLwYLV = [];
}
var build = build_DQWFhNV.some(build_DQWFhNV_SomeFunc);
var build = build_nqLwYLV.some(build_nqLwYLV_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (source && build)
{
jQuery('#jform_manual_files').closest('.control-group').show();
if (jform_DQWFhNVlPF_required)
if (jform_nqLwYLVFNU_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_DQWFhNVlPF_required = false;
jform_nqLwYLVFNU_required = false;
}
jQuery('.note_manual_dropbox').closest('.control-group').show();
@ -222,79 +222,79 @@ function DQWFhNV(source_DQWFhNV,build_DQWFhNV)
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
if (!jform_DQWFhNVlPF_required)
if (!jform_nqLwYLVFNU_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_DQWFhNVlPF_required = true;
jform_nqLwYLVFNU_required = true;
}
jQuery('.note_manual_dropbox').closest('.control-group').hide();
}
}
// the DQWFhNV Some function
function source_DQWFhNV_SomeFunc(source_DQWFhNV)
// the nqLwYLV Some function
function source_nqLwYLV_SomeFunc(source_nqLwYLV)
{
// [8661] set the function logic
if (source_DQWFhNV == 2)
// [Interpretation 7291] set the function logic
if (source_nqLwYLV == 2)
{
return true;
}
return false;
}
// the DQWFhNV Some function
function build_DQWFhNV_SomeFunc(build_DQWFhNV)
// the nqLwYLV Some function
function build_nqLwYLV_SomeFunc(build_nqLwYLV)
{
// [8661] set the function logic
if (build_DQWFhNV == 1)
// [Interpretation 7291] set the function logic
if (build_nqLwYLV == 1)
{
return true;
}
return false;
}
// the uoNLWYH function
function uoNLWYH(build_uoNLWYH,source_uoNLWYH)
// the vGBwfrO function
function vGBwfrO(build_vGBwfrO,source_vGBwfrO)
{
if (isSet(build_uoNLWYH) && build_uoNLWYH.constructor !== Array)
if (isSet(build_vGBwfrO) && build_vGBwfrO.constructor !== Array)
{
var temp_uoNLWYH = build_uoNLWYH;
var build_uoNLWYH = [];
build_uoNLWYH.push(temp_uoNLWYH);
var temp_vGBwfrO = build_vGBwfrO;
var build_vGBwfrO = [];
build_vGBwfrO.push(temp_vGBwfrO);
}
else if (!isSet(build_uoNLWYH))
else if (!isSet(build_vGBwfrO))
{
var build_uoNLWYH = [];
var build_vGBwfrO = [];
}
var build = build_uoNLWYH.some(build_uoNLWYH_SomeFunc);
var build = build_vGBwfrO.some(build_vGBwfrO_SomeFunc);
if (isSet(source_uoNLWYH) && source_uoNLWYH.constructor !== Array)
if (isSet(source_vGBwfrO) && source_vGBwfrO.constructor !== Array)
{
var temp_uoNLWYH = source_uoNLWYH;
var source_uoNLWYH = [];
source_uoNLWYH.push(temp_uoNLWYH);
var temp_vGBwfrO = source_vGBwfrO;
var source_vGBwfrO = [];
source_vGBwfrO.push(temp_vGBwfrO);
}
else if (!isSet(source_uoNLWYH))
else if (!isSet(source_vGBwfrO))
{
var source_uoNLWYH = [];
var source_vGBwfrO = [];
}
var source = source_uoNLWYH.some(source_uoNLWYH_SomeFunc);
var source = source_vGBwfrO.some(source_vGBwfrO_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (build && source)
{
jQuery('#jform_manual_files').closest('.control-group').show();
if (jform_uoNLWYHarm_required)
if (jform_vGBwfrOvWo_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_uoNLWYHarm_required = false;
jform_vGBwfrOvWo_required = false;
}
jQuery('.note_manual_dropbox').closest('.control-group').show();
@ -302,155 +302,155 @@ function uoNLWYH(build_uoNLWYH,source_uoNLWYH)
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
if (!jform_uoNLWYHarm_required)
if (!jform_vGBwfrOvWo_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_uoNLWYHarm_required = true;
jform_vGBwfrOvWo_required = true;
}
jQuery('.note_manual_dropbox').closest('.control-group').hide();
}
}
// the uoNLWYH Some function
function build_uoNLWYH_SomeFunc(build_uoNLWYH)
// the vGBwfrO Some function
function build_vGBwfrO_SomeFunc(build_vGBwfrO)
{
// [8661] set the function logic
if (build_uoNLWYH == 1)
// [Interpretation 7291] set the function logic
if (build_vGBwfrO == 1)
{
return true;
}
return false;
}
// the uoNLWYH Some function
function source_uoNLWYH_SomeFunc(source_uoNLWYH)
// the vGBwfrO Some function
function source_vGBwfrO_SomeFunc(source_vGBwfrO)
{
// [8661] set the function logic
if (source_uoNLWYH == 2)
// [Interpretation 7291] set the function logic
if (source_vGBwfrO == 2)
{
return true;
}
return false;
}
// the WZlRgqx function
function WZlRgqx(source_WZlRgqx)
// the sqkUWYd function
function sqkUWYd(source_sqkUWYd)
{
if (isSet(source_WZlRgqx) && source_WZlRgqx.constructor !== Array)
if (isSet(source_sqkUWYd) && source_sqkUWYd.constructor !== Array)
{
var temp_WZlRgqx = source_WZlRgqx;
var source_WZlRgqx = [];
source_WZlRgqx.push(temp_WZlRgqx);
var temp_sqkUWYd = source_sqkUWYd;
var source_sqkUWYd = [];
source_sqkUWYd.push(temp_sqkUWYd);
}
else if (!isSet(source_WZlRgqx))
else if (!isSet(source_sqkUWYd))
{
var source_WZlRgqx = [];
var source_sqkUWYd = [];
}
var source = source_WZlRgqx.some(source_WZlRgqx_SomeFunc);
var source = source_sqkUWYd.some(source_sqkUWYd_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (source)
{
jQuery('#jform_local_files').closest('.control-group').show();
if (jform_WZlRgqxKFH_required)
if (jform_sqkUWYdCaz_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_WZlRgqxKFH_required = false;
jform_sqkUWYdCaz_required = false;
}
}
else
{
jQuery('#jform_local_files').closest('.control-group').hide();
if (!jform_WZlRgqxKFH_required)
if (!jform_sqkUWYdCaz_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_WZlRgqxKFH_required = true;
jform_sqkUWYdCaz_required = true;
}
}
}
// the WZlRgqx Some function
function source_WZlRgqx_SomeFunc(source_WZlRgqx)
// the sqkUWYd Some function
function source_sqkUWYd_SomeFunc(source_sqkUWYd)
{
// [8661] set the function logic
if (source_WZlRgqx == 1)
// [Interpretation 7291] set the function logic
if (source_sqkUWYd == 1)
{
return true;
}
return false;
}
// the ZkxVREM function
function ZkxVREM(source_ZkxVREM)
// the htLRPCv function
function htLRPCv(source_htLRPCv)
{
if (isSet(source_ZkxVREM) && source_ZkxVREM.constructor !== Array)
if (isSet(source_htLRPCv) && source_htLRPCv.constructor !== Array)
{
var temp_ZkxVREM = source_ZkxVREM;
var source_ZkxVREM = [];
source_ZkxVREM.push(temp_ZkxVREM);
var temp_htLRPCv = source_htLRPCv;
var source_htLRPCv = [];
source_htLRPCv.push(temp_htLRPCv);
}
else if (!isSet(source_ZkxVREM))
else if (!isSet(source_htLRPCv))
{
var source_ZkxVREM = [];
var source_htLRPCv = [];
}
var source = source_ZkxVREM.some(source_ZkxVREM_SomeFunc);
var source = source_htLRPCv.some(source_htLRPCv_SomeFunc);
// [8674] set this function logic
// [Interpretation 7304] set this function logic
if (source)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_ZkxVREMNVv_required)
if (jform_htLRPCvMmp_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_ZkxVREMNVv_required = false;
jform_htLRPCvMmp_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_ZkxVREMNVv_required)
if (!jform_htLRPCvMmp_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_ZkxVREMNVv_required = true;
jform_htLRPCvMmp_required = true;
}
}
}
// the ZkxVREM Some function
function source_ZkxVREM_SomeFunc(source_ZkxVREM)
// the htLRPCv Some function
function source_htLRPCv_SomeFunc(source_htLRPCv)
{
// [8661] set the function logic
if (source_ZkxVREM == 3)
// [Interpretation 7291] set the function logic
if (source_htLRPCv == 3)
{
return true;
}
return false;
}
// the muRdbJc function
function muRdbJc(link_type_muRdbJc)
// the BPUcgat function
function BPUcgat(link_type_BPUcgat)
{
// [8696] set the function logic
if (link_type_muRdbJc == 2)
// [Interpretation 7326] set the function logic
if (link_type_BPUcgat == 2)
{
jQuery('.note_link_directed').closest('.control-group').show();
}
@ -460,11 +460,11 @@ function muRdbJc(link_type_muRdbJc)
}
}
// the CJtVLni function
function CJtVLni(link_type_CJtVLni)
// the TvqhKCs function
function TvqhKCs(link_type_TvqhKCs)
{
// [8696] set the function logic
if (link_type_CJtVLni == 1)
// [Interpretation 7326] set the function logic
if (link_type_TvqhKCs == 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">
<!-- [11731] Default Fields. -->
<!-- [11732] Id Field. Type: Text (joomla) -->
<!-- [Interpretation 10361] Default Fields. -->
<!-- [Interpretation 10362] 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"
/>
<!-- [11739] Date Created Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10369] 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"
/>
<!-- [11750] User Created Field. Type: User (joomla) -->
<!-- [Interpretation 10380] 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"
/>
<!-- [11758] Published Field. Type: List (joomla) -->
<!-- [Interpretation 10388] 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>
<!-- [11773] Date Modified Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10403] 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" />
<!-- [11777] User Modified Field. Type: User (joomla) -->
<!-- [Interpretation 10407] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11787] Access Field. Type: Accesslevel (joomla) -->
<!-- [Interpretation 10417] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11797] Ordering Field. Type: Numbers (joomla) -->
<!-- [Interpretation 10427] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11809] Version Field. Type: Text (joomla) -->
<!-- [Interpretation 10439] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11823] Metakey Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10453] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11832] Metadesc Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10462] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11842] Dynamic Fields. -->
<!-- [12078] Name Field. Type: Text. (joomla) -->
<!-- [Interpretation 10472] Dynamic Fields. -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12199] Preacher Field. Type: Preachers. (custom) -->
<!-- [Interpretation 10829] Preacher Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="preacher"
@ -129,7 +129,7 @@
default="0"
button="true"
/>
<!-- [12199] Series Field. Type: Series. (custom) -->
<!-- [Interpretation 10829] Series Field. Type: Series. (custom) -->
<field
type="series"
name="series"
@ -140,7 +140,7 @@
default="0"
button="true"
/>
<!-- [12078] Short_description Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Catid Field. Type: Category. (joomla) -->
<!-- [Interpretation 10708] Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
@ -164,7 +164,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- [11992] Link_type Field. Type: Radio. (joomla) -->
<!-- [Interpretation 10622] 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">
<!-- [12064] Option Set. -->
<!-- [Interpretation 10694] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED</option>
<option value="2">
COM_SERMONDISTRIBUTOR_SERMON_DIRECT</option>
</field>
<!-- [11992] Source Field. Type: List. (joomla) -->
<!-- [Interpretation 10622] Source Field. Type: List. (joomla) -->
<field
type="list"
name="source"
@ -189,7 +189,7 @@
multiple="false"
filter="INT"
required="true">
<!-- [12064] Option Set. -->
<!-- [Interpretation 10694] 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>
<!-- [12078] Icon Field. Type: Media. (joomla) -->
<!-- [Interpretation 10708] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -207,7 +207,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION"
directory=""
/>
<!-- [12078] Tags Field. Type: Tag. (joomla) -->
<!-- [Interpretation 10708] Tags Field. Type: Tag. (joomla) -->
<field
type="tag"
name="tags"
@ -218,7 +218,7 @@
published="true"
multiple="true"
/>
<!-- [12199] Local_files Field. Type: Localfiles. (custom) -->
<!-- [Interpretation 10829] Local_files Field. Type: Localfiles. (custom) -->
<field
type="localfiles"
name="local_files"
@ -230,7 +230,7 @@
required="true"
button="false"
/>
<!-- [12078] Description Field. Type: Editor. (joomla) -->
<!-- [Interpretation 10708] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -242,9 +242,9 @@
buttons="false"
filter="safehtml"
/>
<!-- [12092] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<!-- [Interpretation 10722] 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" />
<!-- [12078] Alias Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -253,19 +253,19 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT"
/>
<!-- [12078] Not_required Field. Type: Hidden. (joomla) -->
<!-- [Interpretation 10708] Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- [12092] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
<!-- [Interpretation 10722] 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" />
<!-- [12092] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<!-- [Interpretation 10722] 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" />
<!-- [12092] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
<!-- [Interpretation 10722] 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" />
<!-- [12199] Manual_files Field. Type: Dropboxfiles. (custom) -->
<!-- [Interpretation 10829] Manual_files Field. Type: Dropboxfiles. (custom) -->
<field
type="dropboxfiles"
name="manual_files"
@ -277,7 +277,7 @@
required="true"
button="false"
/>
<!-- [12078] Scripture Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12078] Url Field. Type: Url. (joomla) -->
<!-- [Interpretation 10708] 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"
/>
<!-- [11992] Build Field. Type: Radio. (joomla) -->
<!-- [Interpretation 10622] Build Field. Type: Radio. (joomla) -->
<field
type="radio"
name="build"
@ -317,13 +317,13 @@
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- [12064] Option Set. -->
<!-- [Interpretation 10694] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_SERMON_MANUAL</option>
<option value="2">
COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC</option>
</field>
<!-- [12078] Auto_sermons Field. Type: Hidden. (joomla) -->
<!-- [Interpretation 10708] Auto_sermons Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="auto_sermons"
@ -331,11 +331,11 @@
/>
</fieldset>
<!-- [11861] Metadata Fields. -->
<!-- [Interpretation 10491] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11865] Robots Field. Type: List (joomla) -->
<!-- [Interpretation 10495] 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>
<!-- [11876] Author Field. Type: Text (joomla) -->
<!-- [Interpretation 10506] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11882] Rights Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10512] 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>
<!-- [10764] Access Control Fields. -->
<!-- [Interpretation 9394] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10766] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9396] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10772] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9402] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@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">
<!-- [11731] Default Fields. -->
<!-- [11732] Id Field. Type: Text (joomla) -->
<!-- [Interpretation 10361] Default Fields. -->
<!-- [Interpretation 10362] 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"
/>
<!-- [11739] Date Created Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10369] 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"
/>
<!-- [11750] User Created Field. Type: User (joomla) -->
<!-- [Interpretation 10380] 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"
/>
<!-- [11758] Published Field. Type: List (joomla) -->
<!-- [Interpretation 10388] 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>
<!-- [11773] Date Modified Field. Type: Calendar (joomla) -->
<!-- [Interpretation 10403] 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" />
<!-- [11777] User Modified Field. Type: User (joomla) -->
<!-- [Interpretation 10407] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11787] Access Field. Type: Accesslevel (joomla) -->
<!-- [Interpretation 10417] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11797] Ordering Field. Type: Numbers (joomla) -->
<!-- [Interpretation 10427] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11809] Version Field. Type: Text (joomla) -->
<!-- [Interpretation 10439] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11823] Metakey Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10453] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11832] Metadesc Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10462] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11842] Dynamic Fields. -->
<!-- [12078] Filename Field. Type: Text. (joomla) -->
<!-- [Interpretation 10472] Dynamic Fields. -->
<!-- [Interpretation 10708] 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"
/>
<!-- [12199] Sermon Field. Type: Sermon. (custom) -->
<!-- [Interpretation 10829] Sermon Field. Type: Sermon. (custom) -->
<field
type="sermon"
name="sermon"
@ -127,7 +127,7 @@
required="true"
button="true"
/>
<!-- [12199] Preacher Field. Type: Preachers. (custom) -->
<!-- [Interpretation 10829] Preacher Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="preacher"
@ -138,7 +138,7 @@
default="0"
button="true"
/>
<!-- [12199] Series Field. Type: Series. (custom) -->
<!-- [Interpretation 10829] Series Field. Type: Series. (custom) -->
<field
type="series"
name="series"
@ -149,7 +149,7 @@
default="0"
button="true"
/>
<!-- [12078] Counter Field. Type: Text. (joomla) -->
<!-- [Interpretation 10708] Counter Field. Type: Text. (joomla) -->
<field
type="text"
name="counter"
@ -165,11 +165,11 @@
/>
</fieldset>
<!-- [11861] Metadata Fields. -->
<!-- [Interpretation 10491] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11865] Robots Field. Type: List (joomla) -->
<!-- [Interpretation 10495] 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>
<!-- [11876] Author Field. Type: Text (joomla) -->
<!-- [Interpretation 10506] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11882] Rights Field. Type: Textarea (joomla) -->
<!-- [Interpretation 10512] 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>
<!-- [10764] Access Control Fields. -->
<!-- [Interpretation 9394] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10766] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9396] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10772] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9402] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -97,7 +97,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
if (!empty($item->groups))
{
// [4559] JSON Decode groups.
// [Interpretation 3189] JSON Decode groups.
$item->groups = json_decode($item->groups,true);
}
@ -122,7 +122,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [10254] Get the form.
{ // [Interpretation 8884] Get the form.
$form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -132,12 +132,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [10339] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8969] 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');
}
// [10344] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8974] 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');
@ -145,52 +145,52 @@ class SermondistributorModelHelp_document extends JModelAdmin
$user = JFactory::getUser();
// [10350] Check for existing item.
// [10351] Modify the form based on Edit State access controls.
// [Interpretation 8980] Check for existing item.
// [Interpretation 8981] 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')))
{
// [10364] Disable fields for display.
// [Interpretation 8994] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [10367] Disable fields while saving.
// [Interpretation 8997] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [10372] If this is a new item insure the greated by is set.
// [Interpretation 9002] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [10375] Set the created_by to this user
// [Interpretation 9005] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [10378] Modify the form based on Edit Creaded By access controls.
// [Interpretation 9008] Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
{
// [10390] Disable fields for display.
// [Interpretation 9020] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [10392] Disable fields for display.
// [Interpretation 9022] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [10394] Disable fields while saving.
// [Interpretation 9024] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [10397] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 9027] Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
{
// [10409] Disable fields for display.
// [Interpretation 9039] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [10411] Disable fields while saving.
// [Interpretation 9041] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [10444] Only load these values if no id is found
// [Interpretation 9074] Only load these values if no id is found
if (0 == $id)
{
// [10447] Set redirected field name
// [Interpretation 9077] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [10449] Set redirected field value
// [Interpretation 9079] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [10453] Now set the local-redirected field default value
// [Interpretation 9083] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -227,7 +227,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
$user = JFactory::getUser();
// [10575] The record has been set. Check the record permissions.
// [Interpretation 9205] The record has been set. Check the record permissions.
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
}
return false;
@ -249,14 +249,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
if ($recordId)
{
// [10662] The record has been set. Check the record permissions.
// [Interpretation 9292] 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;
}
}
// [10679] In the absense of better information, revert to the component permissions.
// [Interpretation 9309] In the absense of better information, revert to the component permissions.
return $user->authorise('help_document.edit.state', 'com_sermondistributor');
}
@ -271,7 +271,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10487] Check specific edit permission then general edit permission.
// [Interpretation 9117] 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');
@ -370,20 +370,20 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
// [9458] check if the not_required field is set
// [Interpretation 8088] 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);
// [9463] now change the required field attributes value
// [Interpretation 8093] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [9466] make sure there is a string value
// [Interpretation 8096] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [9469] change to false
// [Interpretation 8099] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [9471] also clear the data set
// [Interpretation 8101] also clear the data set
$data[$requiredField] = '';
}
}
@ -398,7 +398,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
*
* @since 3.0
*/
protected function getUniqeFields()
public function getUniqeFields()
{
return false;
}
@ -529,11 +529,11 @@ class SermondistributorModelHelp_document extends JModelAdmin
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
public function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5552] Set some needed variables.
// [Interpretation 4182] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -547,12 +547,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [5572] get list of uniqe fields
// [Interpretation 4202] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [5574] remove move_copy from array
// [Interpretation 4204] remove move_copy from array
unset($values['move_copy']);
// [5577] make sure published is set
// [Interpretation 4207] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -564,21 +564,21 @@ class SermondistributorModelHelp_document extends JModelAdmin
$newIds = array();
// [5614] Parent exists so let's proceed
// [Interpretation 4244] Parent exists so let's proceed
while (!empty($pks))
{
// [5617] Pop the first ID off the stack
// [Interpretation 4247] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [5622] only allow copy if user may edit this item.
// [Interpretation 4252] only allow copy if user may edit this item.
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
// [5632] Not fatal error
// [Interpretation 4262] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -586,19 +586,19 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
// [5637] Check that the row actually exists
// [Interpretation 4267] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5642] Fatal error
// [Interpretation 4272] Fatal error
$this->setError($error);
return false;
}
else
{
// [5649] Not fatal error
// [Interpretation 4279] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -606,7 +606,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
// [5685] insert all set values
// [Interpretation 4315] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -618,7 +618,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5697] update all uniqe fields
// [Interpretation 4327] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -627,13 +627,13 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5706] Reset the ID because we are making a copy
// [Interpretation 4336] Reset the ID because we are making a copy
$this->table->id = 0;
// [5709] TODO: Deal with ordering?
// [5710] $this->table->ordering = 1;
// [Interpretation 4339] TODO: Deal with ordering?
// [Interpretation 4340] $this->table->ordering = 1;
// [5712] Check the row.
// [Interpretation 4342] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -646,7 +646,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5725] Store the row.
// [Interpretation 4355] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -654,14 +654,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [5733] Get the new item ID
// [Interpretation 4363] Get the new item ID
$newId = $this->table->get('id');
// [5736] Add the new ID to the array
// [Interpretation 4366] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5740] Clean the cache
// [Interpretation 4370] Clean the cache
$this->cleanCache();
return $newIds;
@ -678,11 +678,11 @@ class SermondistributorModelHelp_document extends JModelAdmin
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
public function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5354] Set some needed variables.
// [Interpretation 3984] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -697,15 +697,15 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [5376] make sure published only updates if user has the permission.
// [Interpretation 4006] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
{
unset($values['published']);
}
// [5389] remove move_copy from array
// [Interpretation 4019] remove move_copy from array
unset($values['move_copy']);
// [5410] Parent exists so we proceed
// [Interpretation 4040] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
@ -715,30 +715,30 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [5427] Check that the row actually exists
// [Interpretation 4057] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5432] Fatal error
// [Interpretation 4062] Fatal error
$this->setError($error);
return false;
}
else
{
// [5439] Not fatal error
// [Interpretation 4069] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [5445] insert all set values.
// [Interpretation 4075] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [5450] Do special action for access.
// [Interpretation 4080] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -751,7 +751,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
// [5462] Check the row.
// [Interpretation 4092] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -764,7 +764,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5475] Store the row.
// [Interpretation 4105] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -773,7 +773,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5484] Clean the cache
// [Interpretation 4114] Clean the cache
$this->cleanCache();
return true;
@ -803,7 +803,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// [4669] Set the groups string to JSON string.
// [Interpretation 3299] Set the groups string to JSON string.
if (isset($data['groups']))
{
$data['groups'] = (string) json_encode($data['groups']);
@ -817,7 +817,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['params'] = (string) $params;
}
// [5766] Alter the title for save as copy
// [Interpretation 4396] Alter the title for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -840,7 +840,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['published'] = 0;
}
// [5793] Automatic handling of alias for empty fields
// [Interpretation 4423] 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)
@ -871,10 +871,10 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5832] Alter the uniqe field for save as copy
// [Interpretation 4462] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5835] Automatic handling of other uniqe fields
// [Interpretation 4465] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -925,10 +925,10 @@ class SermondistributorModelHelp_document extends JModelAdmin
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($alias, $title)
public function _generateNewTitle($alias, $title)
{
// [5866] Alter the title & alias
// [Interpretation 4496] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -113,16 +113,16 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getItems()
{
// [11248] check in items
// [Interpretation 9878] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -133,7 +133,7 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [11394] decode groups
// [Interpretation 10024] decode groups
$groupsArray = json_decode($item->groups, true);
if (SermondistributorHelper::checkArray($groupsArray))
{
@ -156,14 +156,14 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [11589] set selection value to a translatable value
// [Interpretation 10219] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [11596] convert type
// [Interpretation 10226] convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// [11596] convert location
// [Interpretation 10226] convert location
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
@ -180,7 +180,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [11622] Array of type language strings
// [Interpretation 10252] Array of type language strings
if ($name == 'type')
{
$typeArray = array(
@ -189,20 +189,20 @@ class SermondistributorModelHelp_documents extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// [11622] Array of location language strings
// [Interpretation 10252] Array of location language strings
if ($name == 'location')
{
$locationArray = array(
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
{
return $locationArray[$value];
@ -218,19 +218,19 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getListQuery()
{
// [8085] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [8087] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [8090] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [8097] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
// [8111] Filter by published state
// [Interpretation 6741] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -241,21 +241,21 @@ class SermondistributorModelHelp_documents extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [8123] Join over the asset groups.
// [Interpretation 6753] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [8126] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [8131] Implement View Level Access
// [Interpretation 6761] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [8208] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -270,28 +270,28 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [8451] Filter by Type.
// [Interpretation 7081] Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
}
// [8451] Filter by Location.
// [Interpretation 7081] Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
// [8451] Filter by Admin_view.
// [Interpretation 7081] Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
}
// [8451] Filter by Site_view.
// [Interpretation 7081] Filter by Site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
}
// [8167] Add the list ordering clause.
// [Interpretation 6797] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -309,42 +309,42 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExportData($pks)
{
// [7875] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7878] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [7880] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7883] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [7885] From the sermondistributor_help_document table
// [Interpretation 6515] From the sermondistributor_help_document table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7895] Implement View Level Access
// [Interpretation 6525] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7902] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [7904] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -355,13 +355,13 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [11536] unset the values we don't want exported.
// [Interpretation 10166] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [11545] Add headers to items array.
// [Interpretation 10175] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -380,13 +380,13 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExImPortHeaders()
{
// [7924] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [7926] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_help_document");
if (SermondistributorHelper::checkArray($columns))
{
// [7930] remove the headers you don't import/export.
// [Interpretation 6560] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -408,7 +408,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getStoreId($id = '')
{
// [10871] Compile the store id.
// [Interpretation 9501] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -430,17 +430,17 @@ class SermondistributorModelHelp_documents extends JModelList
* @return a bool
*
*/
protected function checkInNow()
public function checkInNow()
{
// [11264] Get set check in time
// [Interpretation 9894] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [11269] Get a db connection.
// [Interpretation 9899] Get a db connection.
$db = JFactory::getDbo();
// [11271] reset query
// [Interpretation 9901] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_help_document'));
@ -448,24 +448,24 @@ class SermondistributorModelHelp_documents extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [11279] Get Yesterdays date
// [Interpretation 9909] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [11281] reset query
// [Interpretation 9911] reset query
$query = $db->getQuery(true);
// [11283] Fields to update.
// [Interpretation 9913] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [11288] Conditions for which records should be updated.
// [Interpretation 9918] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [11293] Check table
// [Interpretation 9923] Check table
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -101,7 +101,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.preacher');
}
}
$this->preacherxpmi = $item->id;
$this->preacherfexe = $item->id;
return $item;
}
@ -111,74 +111,74 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getRrksermons()
public function getMzrsermons()
{
// [7633] Get the user object.
// [Interpretation 6263] Get the user object.
$user = JFactory::getUser();
// [7635] Create a new query object.
// [Interpretation 6265] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7638] Select some fields
// [Interpretation 6268] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [7645] From the sermondistributor_sermon table
// [Interpretation 6275] 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') . ')');
// [8238] From the sermondistributor_preacher table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_series table.
// [Interpretation 6868] 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') . ')');
// [7661] Filter by preacherxpmi global.
$preacherxpmi = $this->preacherxpmi;
if (is_numeric($preacherxpmi ))
// [Interpretation 6291] Filter by preacherfexe global.
$preacherfexe = $this->preacherfexe;
if (is_numeric($preacherfexe ))
{
$query->where('a.preacher = ' . (int) $preacherxpmi );
$query->where('a.preacher = ' . (int) $preacherfexe );
}
elseif (is_string($preacherxpmi))
elseif (is_string($preacherfexe))
{
$query->where('a.preacher = ' . $db->quote($preacherxpmi));
$query->where('a.preacher = ' . $db->quote($preacherfexe));
}
else
{
$query->where('a.preacher = -5');
}
// [7678] Join over the asset groups.
// [Interpretation 6308] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7681] Filter by access level.
// [Interpretation 6311] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7686] Implement View Level Access
// [Interpretation 6316] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7693] Order the results by ordering
// [Interpretation 6323] Order the results by ordering
$query->order('a.ordering ASC');
// [7695] Load the items
// [Interpretation 6325] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -192,15 +192,15 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [11589] set selection value to a translatable value
// [Interpretation 10219] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [11596] convert link_type
$item->link_type = $this->selectionTranslationRrksermons($item->link_type, 'link_type');
// [11596] convert source
$item->source = $this->selectionTranslationRrksermons($item->source, 'source');
// [Interpretation 10226] convert link_type
$item->link_type = $this->selectionTranslationMzrsermons($item->link_type, 'link_type');
// [Interpretation 10226] convert source
$item->source = $this->selectionTranslationMzrsermons($item->source, 'source');
}
}
@ -214,22 +214,22 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationRrksermons($value,$name)
public function selectionTranslationMzrsermons($value,$name)
{
// [11622] Array of link_type language strings
// [Interpretation 10252] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [11622] Array of source language strings
// [Interpretation 10252] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -238,7 +238,7 @@ class SermondistributorModelPreacher extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -258,7 +258,7 @@ class SermondistributorModelPreacher extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [10254] Get the form.
{ // [Interpretation 8884] Get the form.
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -268,12 +268,12 @@ class SermondistributorModelPreacher extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [10339] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8969] 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');
}
// [10344] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8974] 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');
@ -281,54 +281,54 @@ class SermondistributorModelPreacher extends JModelAdmin
$user = JFactory::getUser();
// [10350] Check for existing item.
// [10351] Modify the form based on Edit State access controls.
// [Interpretation 8980] Check for existing item.
// [Interpretation 8981] 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')))
{
// [10364] Disable fields for display.
// [Interpretation 8994] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [10367] Disable fields while saving.
// [Interpretation 8997] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [10372] If this is a new item insure the greated by is set.
// [Interpretation 9002] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [10375] Set the created_by to this user
// [Interpretation 9005] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [10378] Modify the form based on Edit Creaded By access controls.
// [Interpretation 9008] 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')))
{
// [10390] Disable fields for display.
// [Interpretation 9020] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [10392] Disable fields for display.
// [Interpretation 9022] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [10394] Disable fields while saving.
// [Interpretation 9024] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [10397] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 9027] 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')))
{
// [10409] Disable fields for display.
// [Interpretation 9039] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [10411] Disable fields while saving.
// [Interpretation 9041] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [10444] Only load these values if no id is found
// [Interpretation 9074] Only load these values if no id is found
if (0 == $id)
{
// [10447] Set redirected field name
// [Interpretation 9077] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [10449] Set redirected field value
// [Interpretation 9079] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [10453] Now set the local-redirected field default value
// [Interpretation 9083] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -365,7 +365,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
$user = JFactory::getUser();
// [10575] The record has been set. Check the record permissions.
// [Interpretation 9205] The record has been set. Check the record permissions.
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
}
return false;
@ -387,14 +387,14 @@ class SermondistributorModelPreacher extends JModelAdmin
if ($recordId)
{
// [10662] The record has been set. Check the record permissions.
// [Interpretation 9292] 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;
}
}
// [10679] In the absense of better information, revert to the component permissions.
// [Interpretation 9309] In the absense of better information, revert to the component permissions.
return $user->authorise('preacher.edit.state', 'com_sermondistributor');
}
@ -409,7 +409,7 @@ class SermondistributorModelPreacher extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10487] Check specific edit permission then general edit permission.
// [Interpretation 9117] 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');
@ -500,7 +500,7 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @since 3.0
*/
protected function getUniqeFields()
public function getUniqeFields()
{
return false;
}
@ -631,11 +631,11 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
public function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5552] Set some needed variables.
// [Interpretation 4182] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -649,12 +649,12 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [5572] get list of uniqe fields
// [Interpretation 4202] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [5574] remove move_copy from array
// [Interpretation 4204] remove move_copy from array
unset($values['move_copy']);
// [5577] make sure published is set
// [Interpretation 4207] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -666,21 +666,21 @@ class SermondistributorModelPreacher extends JModelAdmin
$newIds = array();
// [5614] Parent exists so let's proceed
// [Interpretation 4244] Parent exists so let's proceed
while (!empty($pks))
{
// [5617] Pop the first ID off the stack
// [Interpretation 4247] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [5622] only allow copy if user may edit this item.
// [Interpretation 4252] only allow copy if user may edit this item.
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
{
// [5632] Not fatal error
// [Interpretation 4262] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -688,19 +688,19 @@ class SermondistributorModelPreacher extends JModelAdmin
}
// [5637] Check that the row actually exists
// [Interpretation 4267] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5642] Fatal error
// [Interpretation 4272] Fatal error
$this->setError($error);
return false;
}
else
{
// [5649] Not fatal error
// [Interpretation 4279] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -708,7 +708,7 @@ class SermondistributorModelPreacher extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// [5685] insert all set values
// [Interpretation 4315] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -720,7 +720,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5697] update all uniqe fields
// [Interpretation 4327] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -729,13 +729,13 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5706] Reset the ID because we are making a copy
// [Interpretation 4336] Reset the ID because we are making a copy
$this->table->id = 0;
// [5709] TODO: Deal with ordering?
// [5710] $this->table->ordering = 1;
// [Interpretation 4339] TODO: Deal with ordering?
// [Interpretation 4340] $this->table->ordering = 1;
// [5712] Check the row.
// [Interpretation 4342] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -748,7 +748,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5725] Store the row.
// [Interpretation 4355] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -756,14 +756,14 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [5733] Get the new item ID
// [Interpretation 4363] Get the new item ID
$newId = $this->table->get('id');
// [5736] Add the new ID to the array
// [Interpretation 4366] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5740] Clean the cache
// [Interpretation 4370] Clean the cache
$this->cleanCache();
return $newIds;
@ -780,11 +780,11 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
public function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5354] Set some needed variables.
// [Interpretation 3984] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -799,15 +799,15 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [5376] make sure published only updates if user has the permission.
// [Interpretation 4006] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('preacher.edit.state'))
{
unset($values['published']);
}
// [5389] remove move_copy from array
// [Interpretation 4019] remove move_copy from array
unset($values['move_copy']);
// [5410] Parent exists so we proceed
// [Interpretation 4040] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
@ -817,30 +817,30 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [5427] Check that the row actually exists
// [Interpretation 4057] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5432] Fatal error
// [Interpretation 4062] Fatal error
$this->setError($error);
return false;
}
else
{
// [5439] Not fatal error
// [Interpretation 4069] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [5445] insert all set values.
// [Interpretation 4075] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [5450] Do special action for access.
// [Interpretation 4080] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -853,7 +853,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
// [5462] Check the row.
// [Interpretation 4092] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -866,7 +866,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5475] Store the row.
// [Interpretation 4105] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -875,7 +875,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5484] Clean the cache
// [Interpretation 4114] Clean the cache
$this->cleanCache();
return true;
@ -913,7 +913,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['params'] = (string) $params;
}
// [5766] Alter the name for save as copy
// [Interpretation 4396] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -936,7 +936,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['published'] = 0;
}
// [5793] Automatic handling of alias for empty fields
// [Interpretation 4423] 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)
@ -967,10 +967,10 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5832] Alter the uniqe field for save as copy
// [Interpretation 4462] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5835] Automatic handling of other uniqe fields
// [Interpretation 4465] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -1021,10 +1021,10 @@ class SermondistributorModelPreacher extends JModelAdmin
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($alias, $title)
public function _generateNewTitle($alias, $title)
{
// [5866] Alter the title & alias
// [Interpretation 4496] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -101,16 +101,16 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getItems()
{
// [11248] check in items
// [Interpretation 9878] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -135,19 +135,19 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getListQuery()
{
// [8085] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [8087] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [8090] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [8097] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
// [8111] Filter by published state
// [Interpretation 6741] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -158,21 +158,21 @@ class SermondistributorModelPreachers extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [8123] Join over the asset groups.
// [Interpretation 6753] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [8126] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [8131] Implement View Level Access
// [Interpretation 6761] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [8208] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -188,7 +188,7 @@ class SermondistributorModelPreachers extends JModelList
}
// [8167] Add the list ordering clause.
// [Interpretation 6797] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -206,42 +206,42 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExportData($pks)
{
// [7875] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7878] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [7880] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7883] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [7885] From the sermondistributor_preacher table
// [Interpretation 6515] From the sermondistributor_preacher table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7895] Implement View Level Access
// [Interpretation 6525] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7902] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [7904] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -252,13 +252,13 @@ class SermondistributorModelPreachers extends JModelList
continue;
}
// [11536] unset the values we don't want exported.
// [Interpretation 10166] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [11545] Add headers to items array.
// [Interpretation 10175] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -277,13 +277,13 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExImPortHeaders()
{
// [7924] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [7926] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_preacher");
if (SermondistributorHelper::checkArray($columns))
{
// [7930] remove the headers you don't import/export.
// [Interpretation 6560] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -305,7 +305,7 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getStoreId($id = '')
{
// [10871] Compile the store id.
// [Interpretation 9501] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -324,17 +324,17 @@ class SermondistributorModelPreachers extends JModelList
* @return a bool
*
*/
protected function checkInNow()
public function checkInNow()
{
// [11264] Get set check in time
// [Interpretation 9894] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [11269] Get a db connection.
// [Interpretation 9899] Get a db connection.
$db = JFactory::getDbo();
// [11271] reset query
// [Interpretation 9901] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_preacher'));
@ -342,24 +342,24 @@ class SermondistributorModelPreachers extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [11279] Get Yesterdays date
// [Interpretation 9909] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [11281] reset query
// [Interpretation 9911] reset query
$query = $db->getQuery(true);
// [11283] Fields to update.
// [Interpretation 9913] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [11288] Conditions for which records should be updated.
// [Interpretation 9918] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [11293] Check table
// [Interpretation 9923] Check table
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -101,7 +101,7 @@ class SermondistributorModelSeries extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.series');
}
}
$this->seriesbfwx = $item->id;
$this->serieskoaz = $item->id;
return $item;
}
@ -111,74 +111,74 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getSoesermons()
public function getHimsermons()
{
// [7633] Get the user object.
// [Interpretation 6263] Get the user object.
$user = JFactory::getUser();
// [7635] Create a new query object.
// [Interpretation 6265] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7638] Select some fields
// [Interpretation 6268] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [7645] From the sermondistributor_sermon table
// [Interpretation 6275] 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') . ')');
// [8238] From the sermondistributor_preacher table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_series table.
// [Interpretation 6868] 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') . ')');
// [7661] Filter by seriesbfwx global.
$seriesbfwx = $this->seriesbfwx;
if (is_numeric($seriesbfwx ))
// [Interpretation 6291] Filter by serieskoaz global.
$serieskoaz = $this->serieskoaz;
if (is_numeric($serieskoaz ))
{
$query->where('a.series = ' . (int) $seriesbfwx );
$query->where('a.series = ' . (int) $serieskoaz );
}
elseif (is_string($seriesbfwx))
elseif (is_string($serieskoaz))
{
$query->where('a.series = ' . $db->quote($seriesbfwx));
$query->where('a.series = ' . $db->quote($serieskoaz));
}
else
{
$query->where('a.series = -5');
}
// [7678] Join over the asset groups.
// [Interpretation 6308] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7681] Filter by access level.
// [Interpretation 6311] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7686] Implement View Level Access
// [Interpretation 6316] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7693] Order the results by ordering
// [Interpretation 6323] Order the results by ordering
$query->order('a.ordering ASC');
// [7695] Load the items
// [Interpretation 6325] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -192,15 +192,15 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [11589] set selection value to a translatable value
// [Interpretation 10219] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [11596] convert link_type
$item->link_type = $this->selectionTranslationSoesermons($item->link_type, 'link_type');
// [11596] convert source
$item->source = $this->selectionTranslationSoesermons($item->source, 'source');
// [Interpretation 10226] convert link_type
$item->link_type = $this->selectionTranslationHimsermons($item->link_type, 'link_type');
// [Interpretation 10226] convert source
$item->source = $this->selectionTranslationHimsermons($item->source, 'source');
}
}
@ -214,22 +214,22 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationSoesermons($value,$name)
public function selectionTranslationHimsermons($value,$name)
{
// [11622] Array of link_type language strings
// [Interpretation 10252] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [11622] Array of source language strings
// [Interpretation 10252] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -238,7 +238,7 @@ class SermondistributorModelSeries extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -258,7 +258,7 @@ class SermondistributorModelSeries extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [10254] Get the form.
{ // [Interpretation 8884] Get the form.
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -268,12 +268,12 @@ class SermondistributorModelSeries extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [10339] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8969] 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');
}
// [10344] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8974] 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');
@ -281,54 +281,54 @@ class SermondistributorModelSeries extends JModelAdmin
$user = JFactory::getUser();
// [10350] Check for existing item.
// [10351] Modify the form based on Edit State access controls.
// [Interpretation 8980] Check for existing item.
// [Interpretation 8981] 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')))
{
// [10364] Disable fields for display.
// [Interpretation 8994] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [10367] Disable fields while saving.
// [Interpretation 8997] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [10372] If this is a new item insure the greated by is set.
// [Interpretation 9002] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [10375] Set the created_by to this user
// [Interpretation 9005] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [10378] Modify the form based on Edit Creaded By access controls.
// [Interpretation 9008] 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')))
{
// [10390] Disable fields for display.
// [Interpretation 9020] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [10392] Disable fields for display.
// [Interpretation 9022] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [10394] Disable fields while saving.
// [Interpretation 9024] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [10397] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 9027] 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')))
{
// [10409] Disable fields for display.
// [Interpretation 9039] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [10411] Disable fields while saving.
// [Interpretation 9041] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [10444] Only load these values if no id is found
// [Interpretation 9074] Only load these values if no id is found
if (0 == $id)
{
// [10447] Set redirected field name
// [Interpretation 9077] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [10449] Set redirected field value
// [Interpretation 9079] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [10453] Now set the local-redirected field default value
// [Interpretation 9083] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -365,7 +365,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
$user = JFactory::getUser();
// [10575] The record has been set. Check the record permissions.
// [Interpretation 9205] The record has been set. Check the record permissions.
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
}
return false;
@ -387,14 +387,14 @@ class SermondistributorModelSeries extends JModelAdmin
if ($recordId)
{
// [10662] The record has been set. Check the record permissions.
// [Interpretation 9292] 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;
}
}
// [10679] In the absense of better information, revert to the component permissions.
// [Interpretation 9309] In the absense of better information, revert to the component permissions.
return $user->authorise('series.edit.state', 'com_sermondistributor');
}
@ -409,7 +409,7 @@ class SermondistributorModelSeries extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10487] Check specific edit permission then general edit permission.
// [Interpretation 9117] 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');
@ -500,7 +500,7 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @since 3.0
*/
protected function getUniqeFields()
public function getUniqeFields()
{
return false;
}
@ -631,11 +631,11 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
public function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5552] Set some needed variables.
// [Interpretation 4182] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -649,12 +649,12 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [5572] get list of uniqe fields
// [Interpretation 4202] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [5574] remove move_copy from array
// [Interpretation 4204] remove move_copy from array
unset($values['move_copy']);
// [5577] make sure published is set
// [Interpretation 4207] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -666,21 +666,21 @@ class SermondistributorModelSeries extends JModelAdmin
$newIds = array();
// [5614] Parent exists so let's proceed
// [Interpretation 4244] Parent exists so let's proceed
while (!empty($pks))
{
// [5617] Pop the first ID off the stack
// [Interpretation 4247] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [5622] only allow copy if user may edit this item.
// [Interpretation 4252] only allow copy if user may edit this item.
if (!$this->user->authorise('series.edit', $contexts[$pk]))
{
// [5632] Not fatal error
// [Interpretation 4262] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -688,19 +688,19 @@ class SermondistributorModelSeries extends JModelAdmin
}
// [5637] Check that the row actually exists
// [Interpretation 4267] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5642] Fatal error
// [Interpretation 4272] Fatal error
$this->setError($error);
return false;
}
else
{
// [5649] Not fatal error
// [Interpretation 4279] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -708,7 +708,7 @@ class SermondistributorModelSeries extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// [5685] insert all set values
// [Interpretation 4315] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -720,7 +720,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5697] update all uniqe fields
// [Interpretation 4327] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -729,13 +729,13 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5706] Reset the ID because we are making a copy
// [Interpretation 4336] Reset the ID because we are making a copy
$this->table->id = 0;
// [5709] TODO: Deal with ordering?
// [5710] $this->table->ordering = 1;
// [Interpretation 4339] TODO: Deal with ordering?
// [Interpretation 4340] $this->table->ordering = 1;
// [5712] Check the row.
// [Interpretation 4342] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -748,7 +748,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5725] Store the row.
// [Interpretation 4355] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -756,14 +756,14 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [5733] Get the new item ID
// [Interpretation 4363] Get the new item ID
$newId = $this->table->get('id');
// [5736] Add the new ID to the array
// [Interpretation 4366] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5740] Clean the cache
// [Interpretation 4370] Clean the cache
$this->cleanCache();
return $newIds;
@ -780,11 +780,11 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
public function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5354] Set some needed variables.
// [Interpretation 3984] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -799,15 +799,15 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [5376] make sure published only updates if user has the permission.
// [Interpretation 4006] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('series.edit.state'))
{
unset($values['published']);
}
// [5389] remove move_copy from array
// [Interpretation 4019] remove move_copy from array
unset($values['move_copy']);
// [5410] Parent exists so we proceed
// [Interpretation 4040] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('series.edit', $contexts[$pk]))
@ -817,30 +817,30 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [5427] Check that the row actually exists
// [Interpretation 4057] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5432] Fatal error
// [Interpretation 4062] Fatal error
$this->setError($error);
return false;
}
else
{
// [5439] Not fatal error
// [Interpretation 4069] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [5445] insert all set values.
// [Interpretation 4075] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [5450] Do special action for access.
// [Interpretation 4080] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -853,7 +853,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
// [5462] Check the row.
// [Interpretation 4092] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -866,7 +866,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5475] Store the row.
// [Interpretation 4105] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -875,7 +875,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5484] Clean the cache
// [Interpretation 4114] Clean the cache
$this->cleanCache();
return true;
@ -913,7 +913,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['params'] = (string) $params;
}
// [5766] Alter the name for save as copy
// [Interpretation 4396] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -936,7 +936,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['published'] = 0;
}
// [5793] Automatic handling of alias for empty fields
// [Interpretation 4423] 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)
@ -967,10 +967,10 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5832] Alter the uniqe field for save as copy
// [Interpretation 4462] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5835] Automatic handling of other uniqe fields
// [Interpretation 4465] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -1021,10 +1021,10 @@ class SermondistributorModelSeries extends JModelAdmin
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($alias, $title)
public function _generateNewTitle($alias, $title)
{
// [5866] Alter the title & alias
// [Interpretation 4496] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -97,16 +97,16 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getItems()
{
// [11248] check in items
// [Interpretation 9878] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -131,19 +131,19 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getListQuery()
{
// [8085] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [8087] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [8090] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [8097] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
// [8111] Filter by published state
// [Interpretation 6741] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -154,21 +154,21 @@ class SermondistributorModelSeries_list extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [8123] Join over the asset groups.
// [Interpretation 6753] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [8126] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [8131] Implement View Level Access
// [Interpretation 6761] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [8208] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -184,7 +184,7 @@ class SermondistributorModelSeries_list extends JModelList
}
// [8167] Add the list ordering clause.
// [Interpretation 6797] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -202,42 +202,42 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExportData($pks)
{
// [7875] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7878] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [7880] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7883] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [7885] From the sermondistributor_series table
// [Interpretation 6515] From the sermondistributor_series table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7895] Implement View Level Access
// [Interpretation 6525] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7902] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [7904] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -248,13 +248,13 @@ class SermondistributorModelSeries_list extends JModelList
continue;
}
// [11536] unset the values we don't want exported.
// [Interpretation 10166] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [11545] Add headers to items array.
// [Interpretation 10175] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -273,13 +273,13 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExImPortHeaders()
{
// [7924] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [7926] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_series");
if (SermondistributorHelper::checkArray($columns))
{
// [7930] remove the headers you don't import/export.
// [Interpretation 6560] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -301,7 +301,7 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getStoreId($id = '')
{
// [10871] Compile the store id.
// [Interpretation 9501] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -319,17 +319,17 @@ class SermondistributorModelSeries_list extends JModelList
* @return a bool
*
*/
protected function checkInNow()
public function checkInNow()
{
// [11264] Get set check in time
// [Interpretation 9894] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [11269] Get a db connection.
// [Interpretation 9899] Get a db connection.
$db = JFactory::getDbo();
// [11271] reset query
// [Interpretation 9901] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_series'));
@ -337,24 +337,24 @@ class SermondistributorModelSeries_list extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [11279] Get Yesterdays date
// [Interpretation 9909] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [11281] reset query
// [Interpretation 9911] reset query
$query = $db->getQuery(true);
// [11283] Fields to update.
// [Interpretation 9913] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [11288] Conditions for which records should be updated.
// [Interpretation 9918] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [11293] Check table
// [Interpretation 9923] Check table
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -97,13 +97,13 @@ class SermondistributorModelSermon extends JModelAdmin
if (!empty($item->local_files))
{
// [4559] JSON Decode local_files.
// [Interpretation 3189] JSON Decode local_files.
$item->local_files = json_decode($item->local_files);
}
if (!empty($item->manual_files))
{
// [4559] JSON Decode manual_files.
// [Interpretation 3189] JSON Decode manual_files.
$item->manual_files = json_decode($item->manual_files);
}
@ -113,7 +113,7 @@ class SermondistributorModelSermon extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.sermon');
}
}
$this->sermonvqmd = $item->id;
$this->sermonrsop = $item->id;
return $item;
}
@ -123,76 +123,76 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getWczstastics()
public function getKyqstastics()
{
// [7633] Get the user object.
// [Interpretation 6263] Get the user object.
$user = JFactory::getUser();
// [7635] Create a new query object.
// [Interpretation 6265] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7638] Select some fields
// [Interpretation 6268] Select some fields
$query->select('a.*');
// [7645] From the sermondistributor_statistic table
// [Interpretation 6275] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [8238] From the sermondistributor_sermon table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_preacher table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_series table.
// [Interpretation 6868] 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') . ')');
// [7661] Filter by sermonvqmd global.
$sermonvqmd = $this->sermonvqmd;
if (is_numeric($sermonvqmd ))
// [Interpretation 6291] Filter by sermonrsop global.
$sermonrsop = $this->sermonrsop;
if (is_numeric($sermonrsop ))
{
$query->where('a.sermon = ' . (int) $sermonvqmd );
$query->where('a.sermon = ' . (int) $sermonrsop );
}
elseif (is_string($sermonvqmd))
elseif (is_string($sermonrsop))
{
$query->where('a.sermon = ' . $db->quote($sermonvqmd));
$query->where('a.sermon = ' . $db->quote($sermonrsop));
}
else
{
$query->where('a.sermon = -5');
}
// [7678] Join over the asset groups.
// [Interpretation 6308] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7681] Filter by access level.
// [Interpretation 6311] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7686] Implement View Level Access
// [Interpretation 6316] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7693] Order the results by ordering
// [Interpretation 6323] Order the results by ordering
$query->order('a.ordering ASC');
// [7695] Load the items
// [Interpretation 6325] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -221,7 +221,7 @@ class SermondistributorModelSermon extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [10254] Get the form.
{ // [Interpretation 8884] Get the form.
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -231,17 +231,17 @@ class SermondistributorModelSermon extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [10281] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8911] 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');
}
// [10286] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8916] 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');
}
// [10291] Determine correct permissions to check.
// [Interpretation 8921] Determine correct permissions to check.
if ($this->getState('sermon.id'))
{
$id = $this->getState('sermon.id');
@ -249,74 +249,74 @@ class SermondistributorModelSermon extends JModelAdmin
$catid = 0;
if (isset($this->getItem($id)->catid))
{
// [10298] set catagory id
// [Interpretation 8928] set catagory id
$catid = $this->getItem($id)->catid;
// [10300] Existing record. Can only edit in selected categories.
// [Interpretation 8930] Existing record. Can only edit in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit');
// [10302] Existing record. Can only edit own items in selected categories.
// [Interpretation 8932] Existing record. Can only edit own items in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
}
}
else
{
// [10308] New record. Can only create in selected categories.
// [Interpretation 8938] New record. Can only create in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.create');
}
$user = JFactory::getUser();
// [10312] Check for existing item.
// [10313] Modify the form based on Edit State access controls.
// [Interpretation 8942] Check for existing item.
// [Interpretation 8943] 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')))
{
// [10328] Disable fields for display.
// [Interpretation 8958] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [10331] Disable fields while saving.
// [Interpretation 8961] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [10372] If this is a new item insure the greated by is set.
// [Interpretation 9002] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [10375] Set the created_by to this user
// [Interpretation 9005] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [10378] Modify the form based on Edit Creaded By access controls.
// [Interpretation 9008] 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')))
{
// [10390] Disable fields for display.
// [Interpretation 9020] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [10392] Disable fields for display.
// [Interpretation 9022] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [10394] Disable fields while saving.
// [Interpretation 9024] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [10397] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 9027] 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')))
{
// [10409] Disable fields for display.
// [Interpretation 9039] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [10411] Disable fields while saving.
// [Interpretation 9041] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [10444] Only load these values if no id is found
// [Interpretation 9074] Only load these values if no id is found
if (0 == $id)
{
// [10447] Set redirected field name
// [Interpretation 9077] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [10449] Set redirected field value
// [Interpretation 9079] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [10453] Now set the local-redirected field default value
// [Interpretation 9083] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -357,7 +357,7 @@ class SermondistributorModelSermon extends JModelAdmin
if ($allow)
{
// [10546] The record has been set. Check the record permissions.
// [Interpretation 9176] The record has been set. Check the record permissions.
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
}
return $allow;
@ -381,14 +381,14 @@ class SermondistributorModelSermon extends JModelAdmin
if ($recordId)
{
// [10619] The record has been set. Check the record permissions.
// [Interpretation 9249] 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;
}
}
// [10635] Check against the category.
// [Interpretation 9265] Check against the category.
if (!empty($record->catid))
{
$catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid);
@ -397,7 +397,7 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
}
// [10646] In the absense of better information, revert to the component permissions.
// [Interpretation 9276] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.edit.state', 'com_sermondistributor');
}
@ -412,7 +412,7 @@ class SermondistributorModelSermon extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10487] Check specific edit permission then general edit permission.
// [Interpretation 9117] 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');
@ -511,20 +511,20 @@ class SermondistributorModelSermon extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
// [9458] check if the not_required field is set
// [Interpretation 8088] 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);
// [9463] now change the required field attributes value
// [Interpretation 8093] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [9466] make sure there is a string value
// [Interpretation 8096] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [9469] change to false
// [Interpretation 8099] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [9471] also clear the data set
// [Interpretation 8101] also clear the data set
$data[$requiredField] = '';
}
}
@ -539,7 +539,7 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @since 3.0
*/
protected function getUniqeFields()
public function getUniqeFields()
{
return false;
}
@ -670,11 +670,11 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
public function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5552] Set some needed variables.
// [Interpretation 4182] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -688,12 +688,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [5572] get list of uniqe fields
// [Interpretation 4202] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [5574] remove move_copy from array
// [Interpretation 4204] remove move_copy from array
unset($values['move_copy']);
// [5577] make sure published is set
// [Interpretation 4207] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -709,7 +709,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
// [5602] move the category value to correct field name
// [Interpretation 4232] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@ -720,21 +720,21 @@ class SermondistributorModelSermon extends JModelAdmin
$newIds = array();
// [5614] Parent exists so let's proceed
// [Interpretation 4244] Parent exists so let's proceed
while (!empty($pks))
{
// [5617] Pop the first ID off the stack
// [Interpretation 4247] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [5622] only allow copy if user may edit this item.
// [Interpretation 4252] only allow copy if user may edit this item.
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
{
// [5632] Not fatal error
// [Interpretation 4262] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -742,19 +742,19 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [5637] Check that the row actually exists
// [Interpretation 4267] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5642] Fatal error
// [Interpretation 4272] Fatal error
$this->setError($error);
return false;
}
else
{
// [5649] Not fatal error
// [Interpretation 4279] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -769,7 +769,7 @@ class SermondistributorModelSermon extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->generateNewTitle($this->table->catid, $this->table->alias, $this->table->name);
}
// [5685] insert all set values
// [Interpretation 4315] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -781,7 +781,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5697] update all uniqe fields
// [Interpretation 4327] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -790,13 +790,13 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5706] Reset the ID because we are making a copy
// [Interpretation 4336] Reset the ID because we are making a copy
$this->table->id = 0;
// [5709] TODO: Deal with ordering?
// [5710] $this->table->ordering = 1;
// [Interpretation 4339] TODO: Deal with ordering?
// [Interpretation 4340] $this->table->ordering = 1;
// [5712] Check the row.
// [Interpretation 4342] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -809,7 +809,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5725] Store the row.
// [Interpretation 4355] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -817,14 +817,14 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [5733] Get the new item ID
// [Interpretation 4363] Get the new item ID
$newId = $this->table->get('id');
// [5736] Add the new ID to the array
// [Interpretation 4366] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5740] Clean the cache
// [Interpretation 4370] Clean the cache
$this->cleanCache();
return $newIds;
@ -841,11 +841,11 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
public function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5354] Set some needed variables.
// [Interpretation 3984] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -860,12 +860,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [5376] make sure published only updates if user has the permission.
// [Interpretation 4006] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('sermon.edit.state'))
{
unset($values['published']);
}
// [5389] remove move_copy from array
// [Interpretation 4019] remove move_copy from array
unset($values['move_copy']);
if (isset($values['category']) && (int) $values['category'] > 0 && !static::checkCategoryId($values['category']))
@ -874,7 +874,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
// [5400] move the category value to correct field name
// [Interpretation 4030] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@ -884,7 +884,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [5410] Parent exists so we proceed
// [Interpretation 4040] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
@ -894,30 +894,30 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [5427] Check that the row actually exists
// [Interpretation 4057] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5432] Fatal error
// [Interpretation 4062] Fatal error
$this->setError($error);
return false;
}
else
{
// [5439] Not fatal error
// [Interpretation 4069] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [5445] insert all set values.
// [Interpretation 4075] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [5450] Do special action for access.
// [Interpretation 4080] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -930,7 +930,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [5462] Check the row.
// [Interpretation 4092] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -943,7 +943,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5475] Store the row.
// [Interpretation 4105] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -952,7 +952,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5484] Clean the cache
// [Interpretation 4114] Clean the cache
$this->cleanCache();
return true;
@ -982,13 +982,13 @@ class SermondistributorModelSermon extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// [4669] Set the local_files string to JSON string.
// [Interpretation 3299] Set the local_files string to JSON string.
if (isset($data['local_files']))
{
$data['local_files'] = (string) json_encode($data['local_files']);
}
// [4669] Set the manual_files string to JSON string.
// [Interpretation 3299] Set the manual_files string to JSON string.
if (isset($data['manual_files']))
{
$data['manual_files'] = (string) json_encode($data['manual_files']);
@ -1002,7 +1002,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['params'] = (string) $params;
}
// [5766] Alter the name for save as copy
// [Interpretation 4396] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -1025,7 +1025,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['published'] = 0;
}
// [5793] Automatic handling of alias for empty fields
// [Interpretation 4423] 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)
@ -1056,10 +1056,10 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5832] Alter the uniqe field for save as copy
// [Interpretation 4462] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5835] Automatic handling of other uniqe fields
// [Interpretation 4465] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -1110,10 +1110,10 @@ class SermondistributorModelSermon extends JModelAdmin
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($alias, $title)
public function _generateNewTitle($alias, $title)
{
// [5866] Alter the title & alias
// [Interpretation 4496] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -45,7 +45,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')
);
// [12897] view access array
// [Interpretation 11527] view access array
$viewAccess = array(
'preacher.create' => 'preacher.create',
'preachers.access' => 'preacher.access',

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -129,16 +129,16 @@ class SermondistributorModelSermons extends JModelList
*/
public function getItems()
{
// [11248] check in items
// [Interpretation 9878] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -152,14 +152,14 @@ class SermondistributorModelSermons extends JModelList
}
}
// [11589] set selection value to a translatable value
// [Interpretation 10219] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [11596] convert link_type
// [Interpretation 10226] convert link_type
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
// [11596] convert source
// [Interpretation 10226] convert source
$item->source = $this->selectionTranslation($item->source, 'source');
}
}
@ -176,20 +176,20 @@ class SermondistributorModelSermons extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [11622] Array of link_type language strings
// [Interpretation 10252] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [11622] Array of source language strings
// [Interpretation 10252] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -198,7 +198,7 @@ class SermondistributorModelSermons extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [11653] Now check if value is found in this array
// [Interpretation 10283] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -214,29 +214,29 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getListQuery()
{
// [8085] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [8087] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [8090] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [8097] From the sermondistributor_item table
// [Interpretation 6727] 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') . ')');
// [8238] From the sermondistributor_preacher table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_series table.
// [Interpretation 6868] 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') . ')');
// [8111] Filter by published state
// [Interpretation 6741] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -247,21 +247,21 @@ class SermondistributorModelSermons extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [8123] Join over the asset groups.
// [Interpretation 6753] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [8126] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [8131] Implement View Level Access
// [Interpretation 6761] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [8208] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -276,28 +276,28 @@ class SermondistributorModelSermons extends JModelList
}
}
// [8442] Filter by preacher.
// [Interpretation 7072] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [8442] Filter by series.
// [Interpretation 7072] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [8451] Filter by Link_type.
// [Interpretation 7081] Filter by Link_type.
if ($link_type = $this->getState('filter.link_type'))
{
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
}
// [8451] Filter by Source.
// [Interpretation 7081] Filter by Source.
if ($source = $this->getState('filter.source'))
{
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
}
// [8145] Filter by a single or group of categories.
// [Interpretation 6775] Filter by a single or group of categories.
$baselevel = 1;
$categoryId = $this->getState('filter.category_id');
@ -319,7 +319,7 @@ class SermondistributorModelSermons extends JModelList
}
// [8167] Add the list ordering clause.
// [Interpretation 6797] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -337,42 +337,42 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExportData($pks)
{
// [7875] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7878] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [7880] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7883] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [7885] From the sermondistributor_sermon table
// [Interpretation 6515] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7895] Implement View Level Access
// [Interpretation 6525] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7902] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [7904] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -383,13 +383,13 @@ class SermondistributorModelSermons extends JModelList
continue;
}
// [11536] unset the values we don't want exported.
// [Interpretation 10166] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [11545] Add headers to items array.
// [Interpretation 10175] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -408,13 +408,13 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExImPortHeaders()
{
// [7924] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [7926] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_sermon");
if (SermondistributorHelper::checkArray($columns))
{
// [7930] remove the headers you don't import/export.
// [Interpretation 6560] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -436,7 +436,7 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getStoreId($id = '')
{
// [10871] Compile the store id.
// [Interpretation 9501] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -462,17 +462,17 @@ class SermondistributorModelSermons extends JModelList
* @return a bool
*
*/
protected function checkInNow()
public function checkInNow()
{
// [11264] Get set check in time
// [Interpretation 9894] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [11269] Get a db connection.
// [Interpretation 9899] Get a db connection.
$db = JFactory::getDbo();
// [11271] reset query
// [Interpretation 9901] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_sermon'));
@ -480,24 +480,24 @@ class SermondistributorModelSermons extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [11279] Get Yesterdays date
// [Interpretation 9909] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [11281] reset query
// [Interpretation 9911] reset query
$query = $db->getQuery(true);
// [11283] Fields to update.
// [Interpretation 9913] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [11288] Conditions for which records should be updated.
// [Interpretation 9918] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [11293] Check table
// [Interpretation 9923] Check table
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -116,7 +116,7 @@ class SermondistributorModelStatistic extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [10254] Get the form.
{ // [Interpretation 8884] Get the form.
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -126,12 +126,12 @@ class SermondistributorModelStatistic extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [10339] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8969] 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');
}
// [10344] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8974] 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');
@ -139,54 +139,54 @@ class SermondistributorModelStatistic extends JModelAdmin
$user = JFactory::getUser();
// [10350] Check for existing item.
// [10351] Modify the form based on Edit State access controls.
// [Interpretation 8980] Check for existing item.
// [Interpretation 8981] 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')))
{
// [10364] Disable fields for display.
// [Interpretation 8994] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [10367] Disable fields while saving.
// [Interpretation 8997] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [10372] If this is a new item insure the greated by is set.
// [Interpretation 9002] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [10375] Set the created_by to this user
// [Interpretation 9005] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [10378] Modify the form based on Edit Creaded By access controls.
// [Interpretation 9008] 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')))
{
// [10390] Disable fields for display.
// [Interpretation 9020] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [10392] Disable fields for display.
// [Interpretation 9022] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [10394] Disable fields while saving.
// [Interpretation 9024] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [10397] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 9027] 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')))
{
// [10409] Disable fields for display.
// [Interpretation 9039] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [10411] Disable fields while saving.
// [Interpretation 9041] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [10444] Only load these values if no id is found
// [Interpretation 9074] Only load these values if no id is found
if (0 == $id)
{
// [10447] Set redirected field name
// [Interpretation 9077] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [10449] Set redirected field value
// [Interpretation 9079] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [10453] Now set the local-redirected field default value
// [Interpretation 9083] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -223,7 +223,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
$user = JFactory::getUser();
// [10575] The record has been set. Check the record permissions.
// [Interpretation 9205] The record has been set. Check the record permissions.
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
}
return false;
@ -245,14 +245,14 @@ class SermondistributorModelStatistic extends JModelAdmin
if ($recordId)
{
// [10662] The record has been set. Check the record permissions.
// [Interpretation 9292] 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;
}
}
// [10679] In the absense of better information, revert to the component permissions.
// [Interpretation 9309] In the absense of better information, revert to the component permissions.
return $user->authorise('statistic.edit.state', 'com_sermondistributor');
}
@ -267,7 +267,7 @@ class SermondistributorModelStatistic extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [10487] Check specific edit permission then general edit permission.
// [Interpretation 9117] 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');
@ -358,7 +358,7 @@ class SermondistributorModelStatistic extends JModelAdmin
*
* @since 3.0
*/
protected function getUniqeFields()
public function getUniqeFields()
{
return false;
}
@ -489,11 +489,11 @@ class SermondistributorModelStatistic extends JModelAdmin
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
public function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5552] Set some needed variables.
// [Interpretation 4182] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -507,12 +507,12 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [5572] get list of uniqe fields
// [Interpretation 4202] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [5574] remove move_copy from array
// [Interpretation 4204] remove move_copy from array
unset($values['move_copy']);
// [5577] make sure published is set
// [Interpretation 4207] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -524,21 +524,21 @@ class SermondistributorModelStatistic extends JModelAdmin
$newIds = array();
// [5614] Parent exists so let's proceed
// [Interpretation 4244] Parent exists so let's proceed
while (!empty($pks))
{
// [5617] Pop the first ID off the stack
// [Interpretation 4247] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [5622] only allow copy if user may edit this item.
// [Interpretation 4252] only allow copy if user may edit this item.
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
{
// [5632] Not fatal error
// [Interpretation 4262] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -546,19 +546,19 @@ class SermondistributorModelStatistic extends JModelAdmin
}
// [5637] Check that the row actually exists
// [Interpretation 4267] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5642] Fatal error
// [Interpretation 4272] Fatal error
$this->setError($error);
return false;
}
else
{
// [5649] Not fatal error
// [Interpretation 4279] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -566,7 +566,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->table->filename = $this->generateUniqe('filename',$this->table->filename);
// [5685] insert all set values
// [Interpretation 4315] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -578,7 +578,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5697] update all uniqe fields
// [Interpretation 4327] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -587,13 +587,13 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5706] Reset the ID because we are making a copy
// [Interpretation 4336] Reset the ID because we are making a copy
$this->table->id = 0;
// [5709] TODO: Deal with ordering?
// [5710] $this->table->ordering = 1;
// [Interpretation 4339] TODO: Deal with ordering?
// [Interpretation 4340] $this->table->ordering = 1;
// [5712] Check the row.
// [Interpretation 4342] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -606,7 +606,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5725] Store the row.
// [Interpretation 4355] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -614,14 +614,14 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [5733] Get the new item ID
// [Interpretation 4363] Get the new item ID
$newId = $this->table->get('id');
// [5736] Add the new ID to the array
// [Interpretation 4366] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5740] Clean the cache
// [Interpretation 4370] Clean the cache
$this->cleanCache();
return $newIds;
@ -638,11 +638,11 @@ class SermondistributorModelStatistic extends JModelAdmin
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
public function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// [5354] Set some needed variables.
// [Interpretation 3984] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -657,15 +657,15 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [5376] make sure published only updates if user has the permission.
// [Interpretation 4006] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('statistic.edit.state'))
{
unset($values['published']);
}
// [5389] remove move_copy from array
// [Interpretation 4019] remove move_copy from array
unset($values['move_copy']);
// [5410] Parent exists so we proceed
// [Interpretation 4040] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
@ -675,30 +675,30 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [5427] Check that the row actually exists
// [Interpretation 4057] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [5432] Fatal error
// [Interpretation 4062] Fatal error
$this->setError($error);
return false;
}
else
{
// [5439] Not fatal error
// [Interpretation 4069] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [5445] insert all set values.
// [Interpretation 4075] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [5450] Do special action for access.
// [Interpretation 4080] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -711,7 +711,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
// [5462] Check the row.
// [Interpretation 4092] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -724,7 +724,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5475] Store the row.
// [Interpretation 4105] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -733,7 +733,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5484] Clean the cache
// [Interpretation 4114] Clean the cache
$this->cleanCache();
return true;
@ -771,10 +771,10 @@ class SermondistributorModelStatistic extends JModelAdmin
$data['params'] = (string) $params;
}
// [5832] Alter the uniqe field for save as copy
// [Interpretation 4462] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5835] Automatic handling of other uniqe fields
// [Interpretation 4465] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -824,10 +824,10 @@ class SermondistributorModelStatistic extends JModelAdmin
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($title)
public function _generateNewTitle($title)
{
// [5890] Alter the title
// [Interpretation 4520] Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -113,16 +113,16 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getItems()
{
// [11248] check in items
// [Interpretation 9878] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -147,31 +147,31 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getListQuery()
{
// [8085] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [8087] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [8090] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [8097] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [8238] From the sermondistributor_sermon table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_preacher table.
// [Interpretation 6868] 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') . ')');
// [8238] From the sermondistributor_series table.
// [Interpretation 6868] 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') . ')');
// [8111] Filter by published state
// [Interpretation 6741] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -182,21 +182,21 @@ class SermondistributorModelStatistics extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [8123] Join over the asset groups.
// [Interpretation 6753] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [8126] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [8131] Implement View Level Access
// [Interpretation 6761] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [8208] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -211,23 +211,23 @@ class SermondistributorModelStatistics extends JModelList
}
}
// [8442] Filter by sermon.
// [Interpretation 7072] Filter by sermon.
if ($sermon = $this->getState('filter.sermon'))
{
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
}
// [8442] Filter by preacher.
// [Interpretation 7072] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [8442] Filter by series.
// [Interpretation 7072] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [8167] Add the list ordering clause.
// [Interpretation 6797] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -245,42 +245,42 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExportData($pks)
{
// [7875] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7878] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [7880] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7883] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [7885] From the sermondistributor_statistic table
// [Interpretation 6515] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7895] Implement View Level Access
// [Interpretation 6525] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7902] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [7904] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [11323] set values to display correctly.
// [Interpretation 9953] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [11326] get user object.
// [Interpretation 9956] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -291,13 +291,13 @@ class SermondistributorModelStatistics extends JModelList
continue;
}
// [11536] unset the values we don't want exported.
// [Interpretation 10166] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [11545] Add headers to items array.
// [Interpretation 10175] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -316,13 +316,13 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExImPortHeaders()
{
// [7924] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [7926] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_statistic");
if (SermondistributorHelper::checkArray($columns))
{
// [7930] remove the headers you don't import/export.
// [Interpretation 6560] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -344,7 +344,7 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getStoreId($id = '')
{
// [10871] Compile the store id.
// [Interpretation 9501] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -366,17 +366,17 @@ class SermondistributorModelStatistics extends JModelList
* @return a bool
*
*/
protected function checkInNow()
public function checkInNow()
{
// [11264] Get set check in time
// [Interpretation 9894] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [11269] Get a db connection.
// [Interpretation 9899] Get a db connection.
$db = JFactory::getDbo();
// [11271] reset query
// [Interpretation 9901] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_statistic'));
@ -384,24 +384,24 @@ class SermondistributorModelStatistics extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [11279] Get Yesterdays date
// [Interpretation 9909] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [11281] reset query
// [Interpretation 9911] reset query
$query = $db->getQuery(true);
// [11283] Fields to update.
// [Interpretation 9913] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [11288] Conditions for which records should be updated.
// [Interpretation 9918] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [11293] Check table
// [Interpretation 9923] Check table
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -53,7 +53,7 @@ class SermondistributorTableHelp_document extends JTable
{
parent::__construct('#__sermondistributor_help_document', 'id', $db);
// [4777] Adding History Options
// [Interpretation 3407] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.help_document'));
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -53,7 +53,7 @@ class SermondistributorTablePreacher extends JTable
{
parent::__construct('#__sermondistributor_preacher', 'id', $db);
// [4777] Adding History Options
// [Interpretation 3407] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.preacher'));
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.0
@build 21st February, 2016
@build 26th February, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -53,7 +53,7 @@ class SermondistributorTableSeries extends JTable
{
parent::__construct('#__sermondistributor_series', 'id', $db);
// [4777] Adding History Options
// [Interpretation 3407] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.series'));
}

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