resolves #14 We update the h tags on the single views of the related items.

This commit is contained in:
Llewellyn van der Merwe 2016-03-09 23:41:33 +02:00
parent f51e9289f2
commit 8eff008434
254 changed files with 1272 additions and 1251 deletions

View File

@ -1,4 +1,4 @@
# Sermon Distributor (1.3.1)
# Sermon Distributor (1.3.2)
![Sermon Distributor image] (https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor")
@ -23,8 +23,8 @@ 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*: 8th March, 2016
+ *Version*: 1.3.1
+ *Last Build*: 9th March, 2016
+ *Version*: 1.3.2
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -36,11 +36,11 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **48028**
+ *File count*: **350**
+ *Line count*: **48066**
+ *File count*: **351**
+ *Folder count*: **79**
**88 Hours** or **11 Eight Hour Days** (the actual time the author spent)
**89 Hours** or **11 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @34hours** = codingtime / 4;
@ -48,7 +48,7 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
> **mapping @13hours** = codingtime / 10;
> **office @22hours** = codingtime / 6;)
**222 Hours** or **28 Eight Hour Days**
**223 Hours** or **28 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

View File

@ -355,7 +355,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LOAD_DESC"
class="btn-group btn-group-yesno"
default="">
<!-- [Interpretation 11385] Option Set. -->
<!-- [Interpretation 11416] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LOAD</option>"
<option value="1">
@ -371,7 +371,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_DESC"
class="btn-group btn-group-yesno"
default="">
<!-- [Interpretation 11410] Option Set. -->
<!-- [Interpretation 11441] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>"
<option value=".min">
@ -383,7 +383,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_DESC"
class="btn-group btn-group-yesno"
default="">
<!-- [Interpretation 11431] Option Set. -->
<!-- [Interpretation 11462] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_CONFIG_FLAT_LOAD</option>"
<option value=".almost-flat">

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 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())
{
// [Interpretation 8488] Access check.
// [Interpretation 8519] Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [Interpretation 8499] In the absense of better information, revert to the component permissions.
// [Interpretation 8530] 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')
{
// [Interpretation 8642] get user object.
// [Interpretation 8673] get user object.
$user = JFactory::getUser();
// [Interpretation 8644] get record id.
// [Interpretation 8675] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 8651] Access check.
// [Interpretation 8682] 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)
{
// [Interpretation 8660] The record has been set. Check the record permissions.
// [Interpretation 8691] 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))
{
// [Interpretation 8682] Now test the owner is the user.
// [Interpretation 8713] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [Interpretation 8686] Need to do a lookup from the model.
// [Interpretation 8717] 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;
}
// [Interpretation 8694] If the owner matches 'me' then allow.
// [Interpretation 8725] 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;
}
}
// [Interpretation 8716] Since there is no permission, revert to the component permissions.
// [Interpretation 8747] Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option);
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -48,29 +48,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData()
{
// [Interpretation 6556] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6558] 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'))
{
// [Interpretation 6562] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6565] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [Interpretation 6567] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Help_documents');
// [Interpretation 6569] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [Interpretation 6573] 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');
}
}
// [Interpretation 6578] 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()
{
// [Interpretation 6587] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6589] 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'))
{
// [Interpretation 6593] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Help_documents');
// [Interpretation 6595] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [Interpretation 6599] 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');
// [Interpretation 6605] 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;
}
}
// [Interpretation 6617] 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

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -60,13 +60,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [Interpretation 8488] Access check.
// [Interpretation 8519] Access check.
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [Interpretation 8499] In the absense of better information, revert to the component permissions.
// [Interpretation 8530] 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')
{
// [Interpretation 8642] get user object.
// [Interpretation 8673] get user object.
$user = JFactory::getUser();
// [Interpretation 8644] get record id.
// [Interpretation 8675] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 8651] Access check.
// [Interpretation 8682] 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)
{
// [Interpretation 8660] The record has been set. Check the record permissions.
// [Interpretation 8691] 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))
{
// [Interpretation 8682] Now test the owner is the user.
// [Interpretation 8713] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [Interpretation 8686] Need to do a lookup from the model.
// [Interpretation 8717] 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;
}
// [Interpretation 8694] If the owner matches 'me' then allow.
// [Interpretation 8725] 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;
}
}
// [Interpretation 8716] Since there is no permission, revert to the component permissions.
// [Interpretation 8747] Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option);
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -48,29 +48,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData()
{
// [Interpretation 6556] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6558] 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'))
{
// [Interpretation 6562] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6565] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [Interpretation 6567] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Preachers');
// [Interpretation 6569] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [Interpretation 6573] 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');
}
}
// [Interpretation 6578] 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()
{
// [Interpretation 6587] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6589] 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'))
{
// [Interpretation 6593] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Preachers');
// [Interpretation 6595] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [Interpretation 6599] 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');
// [Interpretation 6605] 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;
}
}
// [Interpretation 6617] 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

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -60,13 +60,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [Interpretation 8488] Access check.
// [Interpretation 8519] Access check.
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [Interpretation 8499] In the absense of better information, revert to the component permissions.
// [Interpretation 8530] 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')
{
// [Interpretation 8642] get user object.
// [Interpretation 8673] get user object.
$user = JFactory::getUser();
// [Interpretation 8644] get record id.
// [Interpretation 8675] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 8651] Access check.
// [Interpretation 8682] 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)
{
// [Interpretation 8660] The record has been set. Check the record permissions.
// [Interpretation 8691] 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))
{
// [Interpretation 8682] Now test the owner is the user.
// [Interpretation 8713] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [Interpretation 8686] Need to do a lookup from the model.
// [Interpretation 8717] 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;
}
// [Interpretation 8694] If the owner matches 'me' then allow.
// [Interpretation 8725] 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;
}
}
// [Interpretation 8716] Since there is no permission, revert to the component permissions.
// [Interpretation 8747] Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option);
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -48,29 +48,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData()
{
// [Interpretation 6556] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6558] 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'))
{
// [Interpretation 6562] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6565] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [Interpretation 6567] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Series_list');
// [Interpretation 6569] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [Interpretation 6573] 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');
}
}
// [Interpretation 6578] 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()
{
// [Interpretation 6587] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6589] 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'))
{
// [Interpretation 6593] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Series_list');
// [Interpretation 6595] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [Interpretation 6599] 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');
// [Interpretation 6605] 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;
}
}
// [Interpretation 6617] 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

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -60,10 +60,10 @@ class SermondistributorControllerSermon extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [Interpretation 8443] get the user object
// [Interpretation 8474] get the user object
$user = JFactory::getUser();
// [Interpretation 8448] Access check.
// [Interpretation 8479] Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
{
@ -74,13 +74,13 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [Interpretation 8459] If the category has been passed in the URL check it.
// [Interpretation 8490] If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
}
if ($allow === null)
{
// [Interpretation 8468] In the absense of better information, revert to the component permissions.
// [Interpretation 8499] 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')
{ // [Interpretation 8546] get user object.
{ // [Interpretation 8577] get user object.
$user = JFactory::getUser();
// [Interpretation 8548] get record id.
// [Interpretation 8579] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 8555] Access check.
// [Interpretation 8586] 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)
{
// [Interpretation 8564] The record has been set. Check the record permissions.
// [Interpretation 8595] 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))
{
// [Interpretation 8586] Fallback on edit.own. Now test the owner is the user.
// [Interpretation 8617] Fallback on edit.own. Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [Interpretation 8590] Need to do a lookup from the model.
// [Interpretation 8621] 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;
}
// [Interpretation 8598] If the owner matches 'me' then do the test.
// [Interpretation 8629] 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)
{
// [Interpretation 8620] The category has been set. Check the category permissions.
// [Interpretation 8651] 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
}
}
}
// [Interpretation 8630] Since there is no permission, revert to the component permissions.
// [Interpretation 8661] Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option);
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -48,29 +48,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData()
{
// [Interpretation 6556] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6558] 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'))
{
// [Interpretation 6562] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6565] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [Interpretation 6567] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Sermons');
// [Interpretation 6569] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [Interpretation 6573] 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');
}
}
// [Interpretation 6578] 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()
{
// [Interpretation 6587] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6589] 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'))
{
// [Interpretation 6593] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Sermons');
// [Interpretation 6595] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [Interpretation 6599] 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');
// [Interpretation 6605] 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;
}
}
// [Interpretation 6617] 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

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -60,13 +60,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [Interpretation 8488] Access check.
// [Interpretation 8519] Access check.
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [Interpretation 8499] In the absense of better information, revert to the component permissions.
// [Interpretation 8530] 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')
{
// [Interpretation 8642] get user object.
// [Interpretation 8673] get user object.
$user = JFactory::getUser();
// [Interpretation 8644] get record id.
// [Interpretation 8675] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 8651] Access check.
// [Interpretation 8682] 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)
{
// [Interpretation 8660] The record has been set. Check the record permissions.
// [Interpretation 8691] 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))
{
// [Interpretation 8682] Now test the owner is the user.
// [Interpretation 8713] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [Interpretation 8686] Need to do a lookup from the model.
// [Interpretation 8717] 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;
}
// [Interpretation 8694] If the owner matches 'me' then allow.
// [Interpretation 8725] 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;
}
}
// [Interpretation 8716] Since there is no permission, revert to the component permissions.
// [Interpretation 8747] Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option);
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -48,29 +48,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData()
{
// [Interpretation 6556] Check for request forgeries
// [Interpretation 6587] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6558] 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'))
{
// [Interpretation 6562] Get the input
// [Interpretation 6593] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6565] Sanitize the input
// [Interpretation 6596] Sanitize the input
JArrayHelper::toInteger($pks);
// [Interpretation 6567] Get the model
// [Interpretation 6598] Get the model
$model = $this->getModel('Statistics');
// [Interpretation 6569] get the data to export
// [Interpretation 6600] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [Interpretation 6573] 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');
}
}
// [Interpretation 6578] 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()
{
// [Interpretation 6587] Check for request forgeries
// [Interpretation 6618] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6589] 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'))
{
// [Interpretation 6593] Get the import model
// [Interpretation 6624] Get the import model
$model = $this->getModel('Statistics');
// [Interpretation 6595] get the headers to import
// [Interpretation 6626] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [Interpretation 6599] 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');
// [Interpretation 6605] 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;
}
}
// [Interpretation 6617] 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

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batch_.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -1380,6 +1380,16 @@ abstract class SermondistributorHelper
return $button->input;
}
public static function checkJson($string)
{
if (self::checkString($string))
{
json_decode($string);
return (json_last_error() === JSON_ERROR_NONE);
}
return false;
}
public static function checkObject($object)
{

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage files_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.php
@ -43,7 +43,7 @@ class SermondistributorModelAjax extends JModelList
}
// [Interpretation 8085] Used in sermon
// [Interpretation 8116] Used in sermon
/**
* Check and Set Dropbox local listing
**/

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage articles.php
@ -50,36 +50,36 @@ class JFormFieldArticles extends JFormFieldList
*/
protected function getInput()
{
// [Interpretation 6860] see if we should add buttons
// [Interpretation 6891] see if we should add buttons
$setButton = $this->getAttribute('button');
// [Interpretation 6862] get html
// [Interpretation 6893] get html
$html = parent::getInput();
// [Interpretation 6864] if true set button
// [Interpretation 6895] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [Interpretation 6868] only add if user allowed to create article
// [Interpretation 6899] only add if user allowed to create article
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [Interpretation 6886] get the input from url
// [Interpretation 6917] get the input from url
$jinput = JFactory::getApplication()->input;
// [Interpretation 6888] get the view name & id
// [Interpretation 6919] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [Interpretation 6893] check if new item
// [Interpretation 6924] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [Interpretation 6897] only load referal if not new item.
// [Interpretation 6928] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [Interpretation 6900] build the button
// [Interpretation 6931] 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>';
// [Interpretation 6904] return the button attached to input field
// [Interpretation 6935] return the button attached to input field
return $html . $button;
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dropboxfiles.php
@ -50,36 +50,36 @@ class JFormFieldDropboxfiles extends JFormFieldList
*/
protected function getInput()
{
// [Interpretation 6860] see if we should add buttons
// [Interpretation 6891] see if we should add buttons
$setButton = $this->getAttribute('button');
// [Interpretation 6862] get html
// [Interpretation 6893] get html
$html = parent::getInput();
// [Interpretation 6864] if true set button
// [Interpretation 6895] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [Interpretation 6868] only add if user allowed to create
// [Interpretation 6899] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [Interpretation 6886] get the input from url
// [Interpretation 6917] get the input from url
$jinput = JFactory::getApplication()->input;
// [Interpretation 6888] get the view name & id
// [Interpretation 6919] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [Interpretation 6893] check if new item
// [Interpretation 6924] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [Interpretation 6897] only load referal if not new item.
// [Interpretation 6928] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [Interpretation 6900] build the button
// [Interpretation 6931] 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>';
// [Interpretation 6904] return the button attached to input field
// [Interpretation 6935] return the button attached to input field
return $html . $button;
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage localfiles.php
@ -50,36 +50,36 @@ class JFormFieldLocalfiles extends JFormFieldList
*/
protected function getInput()
{
// [Interpretation 6860] see if we should add buttons
// [Interpretation 6891] see if we should add buttons
$setButton = $this->getAttribute('button');
// [Interpretation 6862] get html
// [Interpretation 6893] get html
$html = parent::getInput();
// [Interpretation 6864] if true set button
// [Interpretation 6895] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [Interpretation 6868] only add if user allowed to create
// [Interpretation 6899] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [Interpretation 6886] get the input from url
// [Interpretation 6917] get the input from url
$jinput = JFactory::getApplication()->input;
// [Interpretation 6888] get the view name & id
// [Interpretation 6919] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [Interpretation 6893] check if new item
// [Interpretation 6924] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [Interpretation 6897] only load referal if not new item.
// [Interpretation 6928] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [Interpretation 6900] build the button
// [Interpretation 6931] 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>';
// [Interpretation 6904] return the button attached to input field
// [Interpretation 6935] return the button attached to input field
return $html . $button;
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -50,36 +50,36 @@ class JFormFieldPreachers extends JFormFieldList
*/
protected function getInput()
{
// [Interpretation 6860] see if we should add buttons
// [Interpretation 6891] see if we should add buttons
$setButton = $this->getAttribute('button');
// [Interpretation 6862] get html
// [Interpretation 6893] get html
$html = parent::getInput();
// [Interpretation 6864] if true set button
// [Interpretation 6895] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [Interpretation 6868] only add if user allowed to create preacher
// [Interpretation 6899] only add if user allowed to create preacher
if ($user->authorise('preacher.create', 'com_sermondistributor'))
{
// [Interpretation 6886] get the input from url
// [Interpretation 6917] get the input from url
$jinput = JFactory::getApplication()->input;
// [Interpretation 6888] get the view name & id
// [Interpretation 6919] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [Interpretation 6893] check if new item
// [Interpretation 6924] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [Interpretation 6897] only load referal if not new item.
// [Interpretation 6928] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [Interpretation 6900] build the button
// [Interpretation 6931] 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>';
// [Interpretation 6904] return the button attached to input field
// [Interpretation 6935] return the button attached to input field
return $html . $button;
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -50,36 +50,36 @@ class JFormFieldSeries extends JFormFieldList
*/
protected function getInput()
{
// [Interpretation 6860] see if we should add buttons
// [Interpretation 6891] see if we should add buttons
$setButton = $this->getAttribute('button');
// [Interpretation 6862] get html
// [Interpretation 6893] get html
$html = parent::getInput();
// [Interpretation 6864] if true set button
// [Interpretation 6895] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [Interpretation 6868] only add if user allowed to create series
// [Interpretation 6899] only add if user allowed to create series
if ($user->authorise('series.create', 'com_sermondistributor'))
{
// [Interpretation 6886] get the input from url
// [Interpretation 6917] get the input from url
$jinput = JFactory::getApplication()->input;
// [Interpretation 6888] get the view name & id
// [Interpretation 6919] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [Interpretation 6893] check if new item
// [Interpretation 6924] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [Interpretation 6897] only load referal if not new item.
// [Interpretation 6928] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [Interpretation 6900] build the button
// [Interpretation 6931] 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>';
// [Interpretation 6904] return the button attached to input field
// [Interpretation 6935] return the button attached to input field
return $html . $button;
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -50,36 +50,36 @@ class JFormFieldSermon extends JFormFieldList
*/
protected function getInput()
{
// [Interpretation 6860] see if we should add buttons
// [Interpretation 6891] see if we should add buttons
$setButton = $this->getAttribute('button');
// [Interpretation 6862] get html
// [Interpretation 6893] get html
$html = parent::getInput();
// [Interpretation 6864] if true set button
// [Interpretation 6895] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [Interpretation 6868] only add if user allowed to create sermon
// [Interpretation 6899] only add if user allowed to create sermon
if ($user->authorise('sermon.create', 'com_sermondistributor'))
{
// [Interpretation 6886] get the input from url
// [Interpretation 6917] get the input from url
$jinput = JFactory::getApplication()->input;
// [Interpretation 6888] get the view name & id
// [Interpretation 6919] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [Interpretation 6893] check if new item
// [Interpretation 6924] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [Interpretation 6897] only load referal if not new item.
// [Interpretation 6928] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [Interpretation 6900] build the button
// [Interpretation 6931] 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>';
// [Interpretation 6904] return the button attached to input field
// [Interpretation 6935] return the button attached to input field
return $html . $button;
}
}

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.js
@ -53,7 +53,7 @@ jQuery(document).ready(function()
// the vvvvvwe function
function vvvvvwe(location_vvvvvwe)
{
// [Interpretation 7177] set the function logic
// [Interpretation 7208] set the function logic
if (location_vvvvvwe == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
@ -67,7 +67,7 @@ function vvvvvwe(location_vvvvvwe)
// the vvvvvwf function
function vvvvvwf(location_vvvvvwf)
{
// [Interpretation 7177] set the function logic
// [Interpretation 7208] set the function logic
if (location_vvvvvwf == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
@ -94,7 +94,7 @@ function vvvvvwg(type_vvvvvwg)
var type = type_vvvvvwg.some(type_vvvvvwg_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
@ -125,7 +125,7 @@ function vvvvvwg(type_vvvvvwg)
// the vvvvvwg Some function
function type_vvvvvwg_SomeFunc(type_vvvvvwg)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (type_vvvvvwg == 3)
{
return true;
@ -149,7 +149,7 @@ function vvvvvwh(type_vvvvvwh)
var type = type_vvvvvwh.some(type_vvvvvwh_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
@ -180,7 +180,7 @@ function vvvvvwh(type_vvvvvwh)
// the vvvvvwh Some function
function type_vvvvvwh_SomeFunc(type_vvvvvwh)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (type_vvvvvwh == 1)
{
return true;
@ -204,7 +204,7 @@ function vvvvvwi(type_vvvvvwi)
var type = type_vvvvvwi.some(type_vvvvvwi_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
@ -235,7 +235,7 @@ function vvvvvwi(type_vvvvvwi)
// the vvvvvwi Some function
function type_vvvvvwi_SomeFunc(type_vvvvvwi)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (type_vvvvvwi == 2)
{
return true;
@ -246,7 +246,7 @@ function type_vvvvvwi_SomeFunc(type_vvvvvwi)
// the vvvvvwj function
function vvvvvwj(target_vvvvvwj)
{
// [Interpretation 7177] set the function logic
// [Interpretation 7208] set the function logic
if (target_vvvvvwj == 1)
{
jQuery('#jform_groups').closest('.control-group').show();

View File

@ -276,15 +276,15 @@
</fieldset>
</fields>
<!-- [Interpretation 9245] Access Control Fields. -->
<!-- [Interpretation 9276] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [Interpretation 9247] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9278] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [Interpretation 9253] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9284] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.js

View File

@ -207,15 +207,15 @@
</fieldset>
</fields>
<!-- [Interpretation 9245] Access Control Fields. -->
<!-- [Interpretation 9276] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [Interpretation 9247] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9278] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [Interpretation 9253] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9284] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.js

View File

@ -194,15 +194,15 @@
</fieldset>
</fields>
<!-- [Interpretation 9245] Access Control Fields. -->
<!-- [Interpretation 9276] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [Interpretation 9247] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9278] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [Interpretation 9253] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9284] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.js
@ -76,7 +76,7 @@ function vvvvvvv(source_vvvvvvv)
var source = source_vvvvvvv.some(source_vvvvvvv_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (source)
{
jQuery('#jform_build').closest('.control-group').show();
@ -107,7 +107,7 @@ function vvvvvvv(source_vvvvvvv)
// the vvvvvvv Some function
function source_vvvvvvv_SomeFunc(source_vvvvvvv)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (source_vvvvvvv == 2)
{
return true;
@ -143,7 +143,7 @@ function vvvvvvw(source_vvvvvvw,build_vvvvvvw)
var build = build_vvvvvvw.some(build_vvvvvvw_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (source && build)
{
jQuery('.note_auto_dropbox').closest('.control-group').show();
@ -157,7 +157,7 @@ function vvvvvvw(source_vvvvvvw,build_vvvvvvw)
// the vvvvvvw Some function
function source_vvvvvvw_SomeFunc(source_vvvvvvw)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (source_vvvvvvw == 2)
{
return true;
@ -168,7 +168,7 @@ function source_vvvvvvw_SomeFunc(source_vvvvvvw)
// the vvvvvvw Some function
function build_vvvvvvw_SomeFunc(build_vvvvvvw)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (build_vvvvvvw == 2)
{
return true;
@ -204,7 +204,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
var build = build_vvvvvvy.some(build_vvvvvvy_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (source && build)
{
jQuery('#jform_manual_files').closest('.control-group').show();
@ -237,7 +237,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
// the vvvvvvy Some function
function source_vvvvvvy_SomeFunc(source_vvvvvvy)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (source_vvvvvvy == 2)
{
return true;
@ -248,7 +248,7 @@ function source_vvvvvvy_SomeFunc(source_vvvvvvy)
// the vvvvvvy Some function
function build_vvvvvvy_SomeFunc(build_vvvvvvy)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (build_vvvvvvy == 1)
{
return true;
@ -284,7 +284,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
var source = source_vvvvvvz.some(source_vvvvvvz_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (build && source)
{
jQuery('#jform_manual_files').closest('.control-group').show();
@ -317,7 +317,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
// the vvvvvvz Some function
function build_vvvvvvz_SomeFunc(build_vvvvvvz)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (build_vvvvvvz == 1)
{
return true;
@ -328,7 +328,7 @@ function build_vvvvvvz_SomeFunc(build_vvvvvvz)
// the vvvvvvz Some function
function source_vvvvvvz_SomeFunc(source_vvvvvvz)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (source_vvvvvvz == 2)
{
return true;
@ -352,7 +352,7 @@ function vvvvvwa(source_vvvvvwa)
var source = source_vvvvvwa.some(source_vvvvvwa_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (source)
{
jQuery('#jform_local_files').closest('.control-group').show();
@ -383,7 +383,7 @@ function vvvvvwa(source_vvvvvwa)
// the vvvvvwa Some function
function source_vvvvvwa_SomeFunc(source_vvvvvwa)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (source_vvvvvwa == 1)
{
return true;
@ -407,7 +407,7 @@ function vvvvvwb(source_vvvvvwb)
var source = source_vvvvvwb.some(source_vvvvvwb_SomeFunc);
// [Interpretation 7155] set this function logic
// [Interpretation 7186] set this function logic
if (source)
{
jQuery('#jform_url').closest('.control-group').show();
@ -438,7 +438,7 @@ function vvvvvwb(source_vvvvvwb)
// the vvvvvwb Some function
function source_vvvvvwb_SomeFunc(source_vvvvvwb)
{
// [Interpretation 7142] set the function logic
// [Interpretation 7173] set the function logic
if (source_vvvvvwb == 3)
{
return true;
@ -449,7 +449,7 @@ function source_vvvvvwb_SomeFunc(source_vvvvvwb)
// the vvvvvwc function
function vvvvvwc(link_type_vvvvvwc)
{
// [Interpretation 7177] set the function logic
// [Interpretation 7208] set the function logic
if (link_type_vvvvvwc == 2)
{
jQuery('.note_link_directed').closest('.control-group').show();
@ -463,7 +463,7 @@ function vvvvvwc(link_type_vvvvvwc)
// the vvvvvwd function
function vvvvvwd(link_type_vvvvvwd)
{
// [Interpretation 7177] set the function logic
// [Interpretation 7208] set the function logic
if (link_type_vvvvvwd == 1)
{
jQuery('.note_link_encrypted').closest('.control-group').show();

View File

@ -360,15 +360,15 @@
</fieldset>
</fields>
<!-- [Interpretation 9245] Access Control Fields. -->
<!-- [Interpretation 9276] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [Interpretation 9247] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9278] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [Interpretation 9253] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9284] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.js

View File

@ -194,15 +194,15 @@
</fieldset>
</fields>
<!-- [Interpretation 9245] Access Control Fields. -->
<!-- [Interpretation 9276] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [Interpretation 9247] Asset Id Field. Type: Hidden (joomla) -->
<!-- [Interpretation 9278] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [Interpretation 9253] Rules Field. Type: Rules (joomla) -->
<!-- [Interpretation 9284] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -122,7 +122,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [Interpretation 8735] Get the form.
{ // [Interpretation 8766] 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;
// [Interpretation 8820] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8851] 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');
}
// [Interpretation 8825] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8856] 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();
// [Interpretation 8831] Check for existing item.
// [Interpretation 8832] Modify the form based on Edit State access controls.
// [Interpretation 8862] Check for existing item.
// [Interpretation 8863] 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')))
{
// [Interpretation 8845] Disable fields for display.
// [Interpretation 8876] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 8848] Disable fields while saving.
// [Interpretation 8879] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [Interpretation 8853] If this is a new item insure the greated by is set.
// [Interpretation 8884] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [Interpretation 8856] Set the created_by to this user
// [Interpretation 8887] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [Interpretation 8859] Modify the form based on Edit Creaded By access controls.
// [Interpretation 8890] Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
{
// [Interpretation 8871] Disable fields for display.
// [Interpretation 8902] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 8873] Disable fields for display.
// [Interpretation 8904] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 8875] Disable fields while saving.
// [Interpretation 8906] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [Interpretation 8878] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 8909] Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
{
// [Interpretation 8890] Disable fields for display.
// [Interpretation 8921] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 8892] Disable fields while saving.
// [Interpretation 8923] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [Interpretation 8925] Only load these values if no id is found
// [Interpretation 8956] Only load these values if no id is found
if (0 == $id)
{
// [Interpretation 8928] Set redirected field name
// [Interpretation 8959] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 8930] Set redirected field value
// [Interpretation 8961] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [Interpretation 8934] Now set the local-redirected field default value
// [Interpretation 8965] 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();
// [Interpretation 9056] The record has been set. Check the record permissions.
// [Interpretation 9087] 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)
{
// [Interpretation 9143] The record has been set. Check the record permissions.
// [Interpretation 9174] 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;
}
}
// [Interpretation 9160] In the absense of better information, revert to the component permissions.
// [Interpretation 9191] 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')
{
// [Interpretation 8968] Check specific edit permission then general edit permission.
// [Interpretation 8999] 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)
{
// [Interpretation 7939] check if the not_required field is set
// [Interpretation 7970] 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);
// [Interpretation 7944] now change the required field attributes value
// [Interpretation 7975] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [Interpretation 7947] make sure there is a string value
// [Interpretation 7978] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [Interpretation 7950] change to false
// [Interpretation 7981] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [Interpretation 7952] also clear the data set
// [Interpretation 7983] also clear the data set
$data[$requiredField] = '';
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -113,16 +113,16 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getItems()
{
// [Interpretation 9729] check in items
// [Interpretation 9760] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -133,7 +133,7 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [Interpretation 9875] decode groups
// [Interpretation 9906] decode groups
$groupsArray = json_decode($item->groups, true);
if (SermondistributorHelper::checkArray($groupsArray))
{
@ -156,14 +156,14 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [Interpretation 10070] set selection value to a translatable value
// [Interpretation 10101] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [Interpretation 10077] convert type
// [Interpretation 10108] convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// [Interpretation 10077] convert location
// [Interpretation 10108] convert location
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
@ -180,7 +180,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [Interpretation 10103] Array of type language strings
// [Interpretation 10134] 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'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] Now check if value is found in this array
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// [Interpretation 10103] Array of location language strings
// [Interpretation 10134] Array of location language strings
if ($name == 'location')
{
$locationArray = array(
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] 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()
{
// [Interpretation 6684] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6686] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6689] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [Interpretation 6696] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
// [Interpretation 6710] 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)');
}
// [Interpretation 6722] 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');
// [Interpretation 6725] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [Interpretation 6730] 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 . ')');
}
// [Interpretation 6807] 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
}
}
// [Interpretation 6932] Filter by Type.
// [Interpretation 6963] Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
}
// [Interpretation 6932] Filter by Location.
// [Interpretation 6963] Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
// [Interpretation 6932] Filter by Admin_view.
// [Interpretation 6963] Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
}
// [Interpretation 6932] Filter by Site_view.
// [Interpretation 6963] Filter by Site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
}
// [Interpretation 6766] 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)
{
// [Interpretation 6474] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [Interpretation 6477] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6479] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6482] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [Interpretation 6484] 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) . ')');
// [Interpretation 6494] 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 . ')');
}
// [Interpretation 6501] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [Interpretation 6503] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -355,13 +355,13 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [Interpretation 10017] unset the values we don't want exported.
// [Interpretation 10048] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [Interpretation 10026] Add headers to items array.
// [Interpretation 10057] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -380,13 +380,13 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExImPortHeaders()
{
// [Interpretation 6523] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 6525] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_help_document");
if (SermondistributorHelper::checkArray($columns))
{
// [Interpretation 6529] 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 = '')
{
// [Interpretation 9352] Compile the store id.
// [Interpretation 9383] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -432,15 +432,15 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function checkInNow()
{
// [Interpretation 9745] Get set check in time
// [Interpretation 9776] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [Interpretation 9750] Get a db connection.
// [Interpretation 9781] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 9752] reset query
// [Interpretation 9783] 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())
{
// [Interpretation 9760] Get Yesterdays date
// [Interpretation 9791] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 9762] reset query
// [Interpretation 9793] reset query
$query = $db->getQuery(true);
// [Interpretation 9764] Fields to update.
// [Interpretation 9795] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [Interpretation 9769] Conditions for which records should be updated.
// [Interpretation 9800] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [Interpretation 9774] Check table
// [Interpretation 9805] Check table
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -127,11 +127,11 @@ class SermondistributorModelPreacher extends JModelAdmin
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
@ -175,10 +175,10 @@ class SermondistributorModelPreacher extends JModelAdmin
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -192,14 +192,14 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [Interpretation 10070] set selection value to a translatable value
// [Interpretation 10101] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [Interpretation 10077] convert link_type
// [Interpretation 10108] convert link_type
$item->link_type = $this->selectionTranslationVvvsermons($item->link_type, 'link_type');
// [Interpretation 10077] convert source
// [Interpretation 10108] convert source
$item->source = $this->selectionTranslationVvvsermons($item->source, 'source');
}
}
@ -216,20 +216,20 @@ class SermondistributorModelPreacher extends JModelAdmin
*/
public function selectionTranslationVvvsermons($value,$name)
{
// [Interpretation 10103] Array of link_type language strings
// [Interpretation 10134] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [Interpretation 10103] Array of source language strings
// [Interpretation 10134] 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'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] 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)
{ // [Interpretation 8735] Get the form.
{ // [Interpretation 8766] 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;
// [Interpretation 8820] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8851] 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');
}
// [Interpretation 8825] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8856] 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();
// [Interpretation 8831] Check for existing item.
// [Interpretation 8832] Modify the form based on Edit State access controls.
// [Interpretation 8862] Check for existing item.
// [Interpretation 8863] 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')))
{
// [Interpretation 8845] Disable fields for display.
// [Interpretation 8876] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 8848] Disable fields while saving.
// [Interpretation 8879] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [Interpretation 8853] If this is a new item insure the greated by is set.
// [Interpretation 8884] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [Interpretation 8856] Set the created_by to this user
// [Interpretation 8887] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [Interpretation 8859] Modify the form based on Edit Creaded By access controls.
// [Interpretation 8890] 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')))
{
// [Interpretation 8871] Disable fields for display.
// [Interpretation 8902] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 8873] Disable fields for display.
// [Interpretation 8904] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 8875] Disable fields while saving.
// [Interpretation 8906] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [Interpretation 8878] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 8909] 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')))
{
// [Interpretation 8890] Disable fields for display.
// [Interpretation 8921] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 8892] Disable fields while saving.
// [Interpretation 8923] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [Interpretation 8925] Only load these values if no id is found
// [Interpretation 8956] Only load these values if no id is found
if (0 == $id)
{
// [Interpretation 8928] Set redirected field name
// [Interpretation 8959] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 8930] Set redirected field value
// [Interpretation 8961] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [Interpretation 8934] Now set the local-redirected field default value
// [Interpretation 8965] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -365,7 +365,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
$user = JFactory::getUser();
// [Interpretation 9056] The record has been set. Check the record permissions.
// [Interpretation 9087] 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)
{
// [Interpretation 9143] The record has been set. Check the record permissions.
// [Interpretation 9174] 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;
}
}
// [Interpretation 9160] In the absense of better information, revert to the component permissions.
// [Interpretation 9191] 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')
{
// [Interpretation 8968] Check specific edit permission then general edit permission.
// [Interpretation 8999] 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');

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -101,16 +101,16 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getItems()
{
// [Interpretation 9729] check in items
// [Interpretation 9760] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -135,19 +135,19 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getListQuery()
{
// [Interpretation 6684] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6686] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6689] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [Interpretation 6696] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
// [Interpretation 6710] 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)');
}
// [Interpretation 6722] 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');
// [Interpretation 6725] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [Interpretation 6730] 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 . ')');
}
// [Interpretation 6807] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -188,7 +188,7 @@ class SermondistributorModelPreachers extends JModelList
}
// [Interpretation 6766] 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)
{
// [Interpretation 6474] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [Interpretation 6477] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6479] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6482] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [Interpretation 6484] 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) . ')');
// [Interpretation 6494] 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 . ')');
}
// [Interpretation 6501] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [Interpretation 6503] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -252,13 +252,13 @@ class SermondistributorModelPreachers extends JModelList
continue;
}
// [Interpretation 10017] unset the values we don't want exported.
// [Interpretation 10048] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [Interpretation 10026] Add headers to items array.
// [Interpretation 10057] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -277,13 +277,13 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExImPortHeaders()
{
// [Interpretation 6523] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 6525] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_preacher");
if (SermondistributorHelper::checkArray($columns))
{
// [Interpretation 6529] 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 = '')
{
// [Interpretation 9352] Compile the store id.
// [Interpretation 9383] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -326,15 +326,15 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function checkInNow()
{
// [Interpretation 9745] Get set check in time
// [Interpretation 9776] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [Interpretation 9750] Get a db connection.
// [Interpretation 9781] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 9752] reset query
// [Interpretation 9783] 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())
{
// [Interpretation 9760] Get Yesterdays date
// [Interpretation 9791] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 9762] reset query
// [Interpretation 9793] reset query
$query = $db->getQuery(true);
// [Interpretation 9764] Fields to update.
// [Interpretation 9795] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [Interpretation 9769] Conditions for which records should be updated.
// [Interpretation 9800] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [Interpretation 9774] Check table
// [Interpretation 9805] Check table
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -127,11 +127,11 @@ class SermondistributorModelSeries extends JModelAdmin
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
@ -175,10 +175,10 @@ class SermondistributorModelSeries extends JModelAdmin
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -192,14 +192,14 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [Interpretation 10070] set selection value to a translatable value
// [Interpretation 10101] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [Interpretation 10077] convert link_type
// [Interpretation 10108] convert link_type
$item->link_type = $this->selectionTranslationVwcsermons($item->link_type, 'link_type');
// [Interpretation 10077] convert source
// [Interpretation 10108] convert source
$item->source = $this->selectionTranslationVwcsermons($item->source, 'source');
}
}
@ -216,20 +216,20 @@ class SermondistributorModelSeries extends JModelAdmin
*/
public function selectionTranslationVwcsermons($value,$name)
{
// [Interpretation 10103] Array of link_type language strings
// [Interpretation 10134] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [Interpretation 10103] Array of source language strings
// [Interpretation 10134] 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'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] 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)
{ // [Interpretation 8735] Get the form.
{ // [Interpretation 8766] 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;
// [Interpretation 8820] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8851] 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');
}
// [Interpretation 8825] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8856] 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();
// [Interpretation 8831] Check for existing item.
// [Interpretation 8832] Modify the form based on Edit State access controls.
// [Interpretation 8862] Check for existing item.
// [Interpretation 8863] 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')))
{
// [Interpretation 8845] Disable fields for display.
// [Interpretation 8876] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 8848] Disable fields while saving.
// [Interpretation 8879] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [Interpretation 8853] If this is a new item insure the greated by is set.
// [Interpretation 8884] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [Interpretation 8856] Set the created_by to this user
// [Interpretation 8887] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [Interpretation 8859] Modify the form based on Edit Creaded By access controls.
// [Interpretation 8890] 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')))
{
// [Interpretation 8871] Disable fields for display.
// [Interpretation 8902] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 8873] Disable fields for display.
// [Interpretation 8904] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 8875] Disable fields while saving.
// [Interpretation 8906] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [Interpretation 8878] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 8909] 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')))
{
// [Interpretation 8890] Disable fields for display.
// [Interpretation 8921] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 8892] Disable fields while saving.
// [Interpretation 8923] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [Interpretation 8925] Only load these values if no id is found
// [Interpretation 8956] Only load these values if no id is found
if (0 == $id)
{
// [Interpretation 8928] Set redirected field name
// [Interpretation 8959] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 8930] Set redirected field value
// [Interpretation 8961] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [Interpretation 8934] Now set the local-redirected field default value
// [Interpretation 8965] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -365,7 +365,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
$user = JFactory::getUser();
// [Interpretation 9056] The record has been set. Check the record permissions.
// [Interpretation 9087] 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)
{
// [Interpretation 9143] The record has been set. Check the record permissions.
// [Interpretation 9174] 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;
}
}
// [Interpretation 9160] In the absense of better information, revert to the component permissions.
// [Interpretation 9191] 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')
{
// [Interpretation 8968] Check specific edit permission then general edit permission.
// [Interpretation 8999] 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');

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -97,16 +97,16 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getItems()
{
// [Interpretation 9729] check in items
// [Interpretation 9760] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -131,19 +131,19 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getListQuery()
{
// [Interpretation 6684] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6686] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6689] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [Interpretation 6696] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
// [Interpretation 6710] 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)');
}
// [Interpretation 6722] 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');
// [Interpretation 6725] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [Interpretation 6730] 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 . ')');
}
// [Interpretation 6807] 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
}
// [Interpretation 6766] 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)
{
// [Interpretation 6474] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [Interpretation 6477] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6479] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6482] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [Interpretation 6484] 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) . ')');
// [Interpretation 6494] 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 . ')');
}
// [Interpretation 6501] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [Interpretation 6503] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -248,13 +248,13 @@ class SermondistributorModelSeries_list extends JModelList
continue;
}
// [Interpretation 10017] unset the values we don't want exported.
// [Interpretation 10048] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [Interpretation 10026] Add headers to items array.
// [Interpretation 10057] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -273,13 +273,13 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExImPortHeaders()
{
// [Interpretation 6523] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 6525] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_series");
if (SermondistributorHelper::checkArray($columns))
{
// [Interpretation 6529] 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 = '')
{
// [Interpretation 9352] Compile the store id.
// [Interpretation 9383] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -321,15 +321,15 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function checkInNow()
{
// [Interpretation 9745] Get set check in time
// [Interpretation 9776] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [Interpretation 9750] Get a db connection.
// [Interpretation 9781] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 9752] reset query
// [Interpretation 9783] 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())
{
// [Interpretation 9760] Get Yesterdays date
// [Interpretation 9791] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 9762] reset query
// [Interpretation 9793] reset query
$query = $db->getQuery(true);
// [Interpretation 9764] Fields to update.
// [Interpretation 9795] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [Interpretation 9769] Conditions for which records should be updated.
// [Interpretation 9800] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [Interpretation 9774] Check table
// [Interpretation 9805] Check table
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -137,15 +137,15 @@ class SermondistributorModelSermon extends JModelAdmin
// [Interpretation 6244] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
@ -189,10 +189,10 @@ class SermondistributorModelSermon extends JModelAdmin
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] 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)
{ // [Interpretation 8735] Get the form.
{ // [Interpretation 8766] 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;
// [Interpretation 8762] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8793] 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');
}
// [Interpretation 8767] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8798] 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');
}
// [Interpretation 8772] Determine correct permissions to check.
// [Interpretation 8803] 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))
{
// [Interpretation 8779] set catagory id
// [Interpretation 8810] set catagory id
$catid = $this->getItem($id)->catid;
// [Interpretation 8781] Existing record. Can only edit in selected categories.
// [Interpretation 8812] Existing record. Can only edit in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit');
// [Interpretation 8783] Existing record. Can only edit own items in selected categories.
// [Interpretation 8814] Existing record. Can only edit own items in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
}
}
else
{
// [Interpretation 8789] New record. Can only create in selected categories.
// [Interpretation 8820] New record. Can only create in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.create');
}
$user = JFactory::getUser();
// [Interpretation 8793] Check for existing item.
// [Interpretation 8794] Modify the form based on Edit State access controls.
// [Interpretation 8824] Check for existing item.
// [Interpretation 8825] 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')))
{
// [Interpretation 8809] Disable fields for display.
// [Interpretation 8840] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 8812] Disable fields while saving.
// [Interpretation 8843] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [Interpretation 8853] If this is a new item insure the greated by is set.
// [Interpretation 8884] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [Interpretation 8856] Set the created_by to this user
// [Interpretation 8887] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [Interpretation 8859] Modify the form based on Edit Creaded By access controls.
// [Interpretation 8890] 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')))
{
// [Interpretation 8871] Disable fields for display.
// [Interpretation 8902] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 8873] Disable fields for display.
// [Interpretation 8904] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 8875] Disable fields while saving.
// [Interpretation 8906] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [Interpretation 8878] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 8909] 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')))
{
// [Interpretation 8890] Disable fields for display.
// [Interpretation 8921] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 8892] Disable fields while saving.
// [Interpretation 8923] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [Interpretation 8925] Only load these values if no id is found
// [Interpretation 8956] Only load these values if no id is found
if (0 == $id)
{
// [Interpretation 8928] Set redirected field name
// [Interpretation 8959] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 8930] Set redirected field value
// [Interpretation 8961] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [Interpretation 8934] Now set the local-redirected field default value
// [Interpretation 8965] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -357,7 +357,7 @@ class SermondistributorModelSermon extends JModelAdmin
if ($allow)
{
// [Interpretation 9027] The record has been set. Check the record permissions.
// [Interpretation 9058] 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)
{
// [Interpretation 9100] The record has been set. Check the record permissions.
// [Interpretation 9131] 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;
}
}
// [Interpretation 9116] Check against the category.
// [Interpretation 9147] 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;
}
}
// [Interpretation 9127] In the absense of better information, revert to the component permissions.
// [Interpretation 9158] 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')
{
// [Interpretation 8968] Check specific edit permission then general edit permission.
// [Interpretation 8999] 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)
{
// [Interpretation 7939] check if the not_required field is set
// [Interpretation 7970] 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);
// [Interpretation 7944] now change the required field attributes value
// [Interpretation 7975] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [Interpretation 7947] make sure there is a string value
// [Interpretation 7978] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [Interpretation 7950] change to false
// [Interpretation 7981] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [Interpretation 7952] also clear the data set
// [Interpretation 7983] also clear the data set
$data[$requiredField] = '';
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 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')
);
// [Interpretation 10186] view access array
// [Interpretation 10217] view access array
$viewAccess = array(
'preacher.create' => 'preacher.create',
'preachers.access' => 'preacher.access',

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -129,16 +129,16 @@ class SermondistributorModelSermons extends JModelList
*/
public function getItems()
{
// [Interpretation 9729] check in items
// [Interpretation 9760] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -152,14 +152,14 @@ class SermondistributorModelSermons extends JModelList
}
}
// [Interpretation 10070] set selection value to a translatable value
// [Interpretation 10101] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [Interpretation 10077] convert link_type
// [Interpretation 10108] convert link_type
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
// [Interpretation 10077] convert source
// [Interpretation 10108] convert source
$item->source = $this->selectionTranslation($item->source, 'source');
}
}
@ -176,20 +176,20 @@ class SermondistributorModelSermons extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [Interpretation 10103] Array of link_type language strings
// [Interpretation 10134] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [Interpretation 10103] Array of source language strings
// [Interpretation 10134] 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'
);
// [Interpretation 10134] Now check if value is found in this array
// [Interpretation 10165] 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()
{
// [Interpretation 6684] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6686] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6689] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [Interpretation 6696] 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') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6710] 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)');
}
// [Interpretation 6722] 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');
// [Interpretation 6725] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [Interpretation 6730] 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 . ')');
}
// [Interpretation 6807] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -276,28 +276,28 @@ class SermondistributorModelSermons extends JModelList
}
}
// [Interpretation 6923] Filter by preacher.
// [Interpretation 6954] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [Interpretation 6923] Filter by series.
// [Interpretation 6954] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [Interpretation 6932] Filter by Link_type.
// [Interpretation 6963] Filter by Link_type.
if ($link_type = $this->getState('filter.link_type'))
{
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
}
// [Interpretation 6932] Filter by Source.
// [Interpretation 6963] Filter by Source.
if ($source = $this->getState('filter.source'))
{
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
}
// [Interpretation 6744] 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
}
// [Interpretation 6766] 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)
{
// [Interpretation 6474] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [Interpretation 6477] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6479] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6482] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [Interpretation 6484] 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) . ')');
// [Interpretation 6494] 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 . ')');
}
// [Interpretation 6501] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [Interpretation 6503] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -383,13 +383,13 @@ class SermondistributorModelSermons extends JModelList
continue;
}
// [Interpretation 10017] unset the values we don't want exported.
// [Interpretation 10048] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [Interpretation 10026] Add headers to items array.
// [Interpretation 10057] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -408,13 +408,13 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExImPortHeaders()
{
// [Interpretation 6523] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 6525] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_sermon");
if (SermondistributorHelper::checkArray($columns))
{
// [Interpretation 6529] 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 = '')
{
// [Interpretation 9352] Compile the store id.
// [Interpretation 9383] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -464,15 +464,15 @@ class SermondistributorModelSermons extends JModelList
*/
protected function checkInNow()
{
// [Interpretation 9745] Get set check in time
// [Interpretation 9776] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [Interpretation 9750] Get a db connection.
// [Interpretation 9781] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 9752] reset query
// [Interpretation 9783] 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())
{
// [Interpretation 9760] Get Yesterdays date
// [Interpretation 9791] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 9762] reset query
// [Interpretation 9793] reset query
$query = $db->getQuery(true);
// [Interpretation 9764] Fields to update.
// [Interpretation 9795] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [Interpretation 9769] Conditions for which records should be updated.
// [Interpretation 9800] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [Interpretation 9774] Check table
// [Interpretation 9805] Check table
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 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)
{ // [Interpretation 8735] Get the form.
{ // [Interpretation 8766] 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;
// [Interpretation 8820] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [Interpretation 8851] 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');
}
// [Interpretation 8825] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [Interpretation 8856] 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();
// [Interpretation 8831] Check for existing item.
// [Interpretation 8832] Modify the form based on Edit State access controls.
// [Interpretation 8862] Check for existing item.
// [Interpretation 8863] 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')))
{
// [Interpretation 8845] Disable fields for display.
// [Interpretation 8876] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 8848] Disable fields while saving.
// [Interpretation 8879] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [Interpretation 8853] If this is a new item insure the greated by is set.
// [Interpretation 8884] If this is a new item insure the greated by is set.
if (0 == $id)
{
// [Interpretation 8856] Set the created_by to this user
// [Interpretation 8887] Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// [Interpretation 8859] Modify the form based on Edit Creaded By access controls.
// [Interpretation 8890] 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')))
{
// [Interpretation 8871] Disable fields for display.
// [Interpretation 8902] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 8873] Disable fields for display.
// [Interpretation 8904] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 8875] Disable fields while saving.
// [Interpretation 8906] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [Interpretation 8878] Modify the form based on Edit Creaded Date access controls.
// [Interpretation 8909] 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')))
{
// [Interpretation 8890] Disable fields for display.
// [Interpretation 8921] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 8892] Disable fields while saving.
// [Interpretation 8923] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// [Interpretation 8925] Only load these values if no id is found
// [Interpretation 8956] Only load these values if no id is found
if (0 == $id)
{
// [Interpretation 8928] Set redirected field name
// [Interpretation 8959] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 8930] Set redirected field value
// [Interpretation 8961] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// [Interpretation 8934] Now set the local-redirected field default value
// [Interpretation 8965] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
@ -223,7 +223,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
$user = JFactory::getUser();
// [Interpretation 9056] The record has been set. Check the record permissions.
// [Interpretation 9087] 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)
{
// [Interpretation 9143] The record has been set. Check the record permissions.
// [Interpretation 9174] 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;
}
}
// [Interpretation 9160] In the absense of better information, revert to the component permissions.
// [Interpretation 9191] 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')
{
// [Interpretation 8968] Check specific edit permission then general edit permission.
// [Interpretation 8999] 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');

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -113,16 +113,16 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getItems()
{
// [Interpretation 9729] check in items
// [Interpretation 9760] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -147,31 +147,31 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getListQuery()
{
// [Interpretation 6684] Get the user object.
// [Interpretation 6715] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6686] Create a new query object.
// [Interpretation 6717] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6689] Select some fields
// [Interpretation 6720] Select some fields
$query->select('a.*');
// [Interpretation 6696] From the sermondistributor_item table
// [Interpretation 6727] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6837] 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') . ')');
// [Interpretation 6710] 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)');
}
// [Interpretation 6722] 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');
// [Interpretation 6725] Filter by access level.
// [Interpretation 6756] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [Interpretation 6730] 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 . ')');
}
// [Interpretation 6807] Filter by search.
// [Interpretation 6838] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -211,23 +211,23 @@ class SermondistributorModelStatistics extends JModelList
}
}
// [Interpretation 6923] Filter by sermon.
// [Interpretation 6954] Filter by sermon.
if ($sermon = $this->getState('filter.sermon'))
{
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
}
// [Interpretation 6923] Filter by preacher.
// [Interpretation 6954] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [Interpretation 6923] Filter by series.
// [Interpretation 6954] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [Interpretation 6766] 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)
{
// [Interpretation 6474] setup the query
// [Interpretation 6505] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [Interpretation 6477] Get the user object.
// [Interpretation 6508] Get the user object.
$user = JFactory::getUser();
// [Interpretation 6479] Create a new query object.
// [Interpretation 6510] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [Interpretation 6482] Select some fields
// [Interpretation 6513] Select some fields
$query->select('a.*');
// [Interpretation 6484] 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) . ')');
// [Interpretation 6494] 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 . ')');
}
// [Interpretation 6501] Order the results by ordering
// [Interpretation 6532] Order the results by ordering
$query->order('a.ordering ASC');
// [Interpretation 6503] Load the items
// [Interpretation 6534] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [Interpretation 9804] set values to display correctly.
// [Interpretation 9835] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [Interpretation 9807] get user object.
// [Interpretation 9838] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -291,13 +291,13 @@ class SermondistributorModelStatistics extends JModelList
continue;
}
// [Interpretation 10017] unset the values we don't want exported.
// [Interpretation 10048] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [Interpretation 10026] Add headers to items array.
// [Interpretation 10057] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -316,13 +316,13 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExImPortHeaders()
{
// [Interpretation 6523] Get a db connection.
// [Interpretation 6554] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 6525] get the columns
// [Interpretation 6556] get the columns
$columns = $db->getTableColumns("#__sermondistributor_statistic");
if (SermondistributorHelper::checkArray($columns))
{
// [Interpretation 6529] 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 = '')
{
// [Interpretation 9352] Compile the store id.
// [Interpretation 9383] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -368,15 +368,15 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function checkInNow()
{
// [Interpretation 9745] Get set check in time
// [Interpretation 9776] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [Interpretation 9750] Get a db connection.
// [Interpretation 9781] Get a db connection.
$db = JFactory::getDbo();
// [Interpretation 9752] reset query
// [Interpretation 9783] 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())
{
// [Interpretation 9760] Get Yesterdays date
// [Interpretation 9791] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 9762] reset query
// [Interpretation 9793] reset query
$query = $db->getQuery(true);
// [Interpretation 9764] Fields to update.
// [Interpretation 9795] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [Interpretation 9769] Conditions for which records should be updated.
// [Interpretation 9800] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [Interpretation 9774] Check table
// [Interpretation 9805] Check table
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -0,0 +1 @@

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.1
@build 8th March, 2016
@version 1.3.2
@build 9th March, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php

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