Staging #21

Merged
Llewellyn merged 3 commits from staging into master 2016-07-02 17:52:48 +00:00
264 changed files with 1889 additions and 1724 deletions
Showing only changes of commit f6cde40d97 - Show all commits

View File

@ -23,20 +23,20 @@ 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) + *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor] (https://www.vdm.io/) + *Name*: [Sermon Distributor] (https://www.vdm.io/)
+ *First Build*: 22nd October, 2015 + *First Build*: 22nd October, 2015
+ *Last Build*: 26th May, 2016 + *Last Build*: 24th June, 2016
+ *Version*: 1.3.2 + *Version*: 1.3.2
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass: ## Build Time :hourglass:
**136 Hours** or **17 Eight Hour Days** (actual time the author saved - **137 Hours** or **17 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder)) due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **48865** + *Line count*: **49030**
+ *File count*: **354** + *File count*: **354**
+ *Folder count*: **80** + *Folder count*: **80**
@ -44,11 +44,11 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
> (with the following break down: > (with the following break down:
> **debugging @34hours** = codingtime / 4; > **debugging @34hours** = codingtime / 4;
> **planning @19hours** = codingtime / 7; > **planning @20hours** = codingtime / 7;
> **mapping @14hours** = codingtime / 10; > **mapping @14hours** = codingtime / 10;
> **office @23hours** = codingtime / 6;) > **office @23hours** = codingtime / 6;)
**226 Hours** or **28 Eight Hour Days** **227 Hours** or **28 Eight Hour Days**
(a total of the realistic time frame for this project) (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**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage admin.css @subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage dashboard.css @subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.css @subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_documents.css @subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preacher.css @subpackage preacher.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preachers.css @subpackage preachers.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.css @subpackage series.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series_list.css @subpackage series_list.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermon.css @subpackage sermon.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons.css @subpackage sermons.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistic.css @subpackage statistic.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistics.css @subpackage statistics.css

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage controller.php @subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage ajax.json.php @subpackage ajax.json.php
@ -72,9 +72,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
{ {
$result = false; $result = false;
} }
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback'] . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
elseif($returnRaw) elseif($returnRaw)
{ {
@ -87,9 +87,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
} }
catch(Exception $e) catch(Exception $e)
{ {
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback']."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
else else
{ {
@ -110,9 +110,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
{ {
$result = false; $result = false;
} }
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback'] . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
elseif($returnRaw) elseif($returnRaw)
{ {
@ -125,9 +125,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
} }
catch(Exception $e) catch(Exception $e)
{ {
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback']."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
else else
{ {
@ -148,9 +148,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
{ {
$result = false; $result = false;
} }
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback'] . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
elseif($returnRaw) elseif($returnRaw)
{ {
@ -163,9 +163,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
} }
catch(Exception $e) catch(Exception $e)
{ {
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback']."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
else else
{ {
@ -177,9 +177,9 @@ class SermondistributorControllerAjax extends JControllerLegacy
} }
else else
{ {
if(array_key_exists('callback',$_GET)) if($callback = $jinput->get('callback', null, 'CMD'))
{ {
echo $_GET['callback']."(".json_encode(false).");"; echo $callback."(".json_encode(false).");";
} }
else else
{ {

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help.php @subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.php @subpackage help_document.php
@ -60,13 +60,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = array())
{ {
// [Interpretation 8855] Access check. // [Interpretation 9081] Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor'); $access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
if (!$access) if (!$access)
{ {
return false; return false;
} }
// [Interpretation 8866] In the absense of better information, revert to the component permissions. // [Interpretation 9092] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('help_document.create', $this->option); 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') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9009] get user object. // [Interpretation 9235] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9011] get record id. // [Interpretation 9237] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 9018] Access check. // [Interpretation 9244] Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor')); $access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
@ -97,17 +97,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
if ($recordId) if ($recordId)
{ {
// [Interpretation 9027] The record has been set. Check the record permissions. // [Interpretation 9253] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit', 'com_sermondistributor.help_document.' . (int) $recordId); $permission = $user->authorise('help_document.edit', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
if ($user->authorise('help_document.edit.own', 'com_sermondistributor.help_document.' . $recordId)) if ($user->authorise('help_document.edit.own', 'com_sermondistributor.help_document.' . $recordId))
{ {
// [Interpretation 9049] Now test the owner is the user. // [Interpretation 9275] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId)) if (empty($ownerId))
{ {
// [Interpretation 9053] Need to do a lookup from the model. // [Interpretation 9279] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId); $record = $this->getModel()->getItem($recordId);
if (empty($record)) if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
$ownerId = $record->created_by; $ownerId = $record->created_by;
} }
// [Interpretation 9061] If the owner matches 'me' then allow. // [Interpretation 9287] If the owner matches 'me' then allow.
if ($ownerId == $user->id) if ($ownerId == $user->id)
{ {
if ($user->authorise('help_document.edit.own', 'com_sermondistributor')) if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false; return false;
} }
} }
// [Interpretation 9083] Since there is no permission, revert to the component permissions. // [Interpretation 9309] Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option); return $user->authorise('help_document.edit', $this->option);
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_documents.php @subpackage help_documents.php
@ -48,29 +48,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData() public function exportData()
{ {
// [Interpretation 6800] Check for request forgeries // [Interpretation 7013] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6802] check if export is allowed for this user. // [Interpretation 7015] check if export is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// [Interpretation 6806] Get the input // [Interpretation 7019] Get the input
$input = JFactory::getApplication()->input; $input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6809] Sanitize the input // [Interpretation 7022] Sanitize the input
JArrayHelper::toInteger($pks); JArrayHelper::toInteger($pks);
// [Interpretation 6811] Get the model // [Interpretation 7024] Get the model
$model = $this->getModel('Help_documents'); $model = $this->getModel('Help_documents');
// [Interpretation 6813] get the data to export // [Interpretation 7026] get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (SermondistributorHelper::checkArray($data))
{ {
// [Interpretation 6817] now set the data to the spreadsheet // [Interpretation 7030] now set the data to the spreadsheet
$date = JFactory::getDate(); $date = JFactory::getDate();
SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents'); SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
} }
} }
// [Interpretation 6822] Redirect to the list screen with error. // [Interpretation 7035] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return; return;
@ -79,31 +79,31 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData() public function importData()
{ {
// [Interpretation 6831] Check for request forgeries // [Interpretation 7044] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6833] check if import is allowed for this user. // [Interpretation 7046] check if import is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// [Interpretation 6837] Get the import model // [Interpretation 7050] Get the import model
$model = $this->getModel('Help_documents'); $model = $this->getModel('Help_documents');
// [Interpretation 6839] get the headers to import // [Interpretation 7052] get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
// [Interpretation 6843] Load headers to session. // [Interpretation 7056] Load headers to session.
$session = JFactory::getSession(); $session = JFactory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('help_document_VDM_IMPORTHEADERS', $headers); $session->set('help_document_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'help_documents'); $session->set('backto_VDM_IMPORT', 'help_documents');
$session->set('dataType_VDM_IMPORTINTO', 'help_document'); $session->set('dataType_VDM_IMPORTINTO', 'help_document');
// [Interpretation 6849] Redirect to import view. // [Interpretation 7062] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// [Interpretation 6869] Redirect to the list screen with error. // [Interpretation 7082] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return; return;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage import.php @subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preacher.php @subpackage preacher.php
@ -60,13 +60,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = array())
{ {
// [Interpretation 8855] Access check. // [Interpretation 9081] Access check.
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor'); $access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
if (!$access) if (!$access)
{ {
return false; return false;
} }
// [Interpretation 8866] In the absense of better information, revert to the component permissions. // [Interpretation 9092] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('preacher.create', $this->option); return JFactory::getUser()->authorise('preacher.create', $this->option);
} }
@ -82,13 +82,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9009] get user object. // [Interpretation 9235] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9011] get record id. // [Interpretation 9237] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 9018] Access check. // [Interpretation 9244] Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor')); $access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
@ -97,17 +97,17 @@ class SermondistributorControllerPreacher extends JControllerForm
if ($recordId) if ($recordId)
{ {
// [Interpretation 9027] The record has been set. Check the record permissions. // [Interpretation 9253] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $recordId); $permission = $user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
if ($user->authorise('preacher.edit.own', 'com_sermondistributor.preacher.' . $recordId)) if ($user->authorise('preacher.edit.own', 'com_sermondistributor.preacher.' . $recordId))
{ {
// [Interpretation 9049] Now test the owner is the user. // [Interpretation 9275] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId)) if (empty($ownerId))
{ {
// [Interpretation 9053] Need to do a lookup from the model. // [Interpretation 9279] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId); $record = $this->getModel()->getItem($recordId);
if (empty($record)) if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerPreacher extends JControllerForm
$ownerId = $record->created_by; $ownerId = $record->created_by;
} }
// [Interpretation 9061] If the owner matches 'me' then allow. // [Interpretation 9287] If the owner matches 'me' then allow.
if ($ownerId == $user->id) if ($ownerId == $user->id)
{ {
if ($user->authorise('preacher.edit.own', 'com_sermondistributor')) if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerPreacher extends JControllerForm
return false; return false;
} }
} }
// [Interpretation 9083] Since there is no permission, revert to the component permissions. // [Interpretation 9309] Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option); return $user->authorise('preacher.edit', $this->option);
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preachers.php @subpackage preachers.php
@ -48,29 +48,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData() public function exportData()
{ {
// [Interpretation 6800] Check for request forgeries // [Interpretation 7013] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6802] check if export is allowed for this user. // [Interpretation 7015] check if export is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// [Interpretation 6806] Get the input // [Interpretation 7019] Get the input
$input = JFactory::getApplication()->input; $input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6809] Sanitize the input // [Interpretation 7022] Sanitize the input
JArrayHelper::toInteger($pks); JArrayHelper::toInteger($pks);
// [Interpretation 6811] Get the model // [Interpretation 7024] Get the model
$model = $this->getModel('Preachers'); $model = $this->getModel('Preachers');
// [Interpretation 6813] get the data to export // [Interpretation 7026] get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (SermondistributorHelper::checkArray($data))
{ {
// [Interpretation 6817] now set the data to the spreadsheet // [Interpretation 7030] now set the data to the spreadsheet
$date = JFactory::getDate(); $date = JFactory::getDate();
SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers'); SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers');
} }
} }
// [Interpretation 6822] Redirect to the list screen with error. // [Interpretation 7035] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return; return;
@ -79,31 +79,31 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData() public function importData()
{ {
// [Interpretation 6831] Check for request forgeries // [Interpretation 7044] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6833] check if import is allowed for this user. // [Interpretation 7046] check if import is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// [Interpretation 6837] Get the import model // [Interpretation 7050] Get the import model
$model = $this->getModel('Preachers'); $model = $this->getModel('Preachers');
// [Interpretation 6839] get the headers to import // [Interpretation 7052] get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
// [Interpretation 6843] Load headers to session. // [Interpretation 7056] Load headers to session.
$session = JFactory::getSession(); $session = JFactory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('preacher_VDM_IMPORTHEADERS', $headers); $session->set('preacher_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'preachers'); $session->set('backto_VDM_IMPORT', 'preachers');
$session->set('dataType_VDM_IMPORTINTO', 'preacher'); $session->set('dataType_VDM_IMPORTINTO', 'preacher');
// [Interpretation 6849] Redirect to import view. // [Interpretation 7062] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// [Interpretation 6869] Redirect to the list screen with error. // [Interpretation 7082] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return; return;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.php @subpackage series.php
@ -60,13 +60,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = array())
{ {
// [Interpretation 8855] Access check. // [Interpretation 9081] Access check.
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor'); $access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
if (!$access) if (!$access)
{ {
return false; return false;
} }
// [Interpretation 8866] In the absense of better information, revert to the component permissions. // [Interpretation 9092] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('series.create', $this->option); return JFactory::getUser()->authorise('series.create', $this->option);
} }
@ -82,13 +82,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9009] get user object. // [Interpretation 9235] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9011] get record id. // [Interpretation 9237] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 9018] Access check. // [Interpretation 9244] Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor')); $access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
@ -97,17 +97,17 @@ class SermondistributorControllerSeries extends JControllerForm
if ($recordId) if ($recordId)
{ {
// [Interpretation 9027] The record has been set. Check the record permissions. // [Interpretation 9253] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $recordId); $permission = $user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
if ($user->authorise('series.edit.own', 'com_sermondistributor.series.' . $recordId)) if ($user->authorise('series.edit.own', 'com_sermondistributor.series.' . $recordId))
{ {
// [Interpretation 9049] Now test the owner is the user. // [Interpretation 9275] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId)) if (empty($ownerId))
{ {
// [Interpretation 9053] Need to do a lookup from the model. // [Interpretation 9279] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId); $record = $this->getModel()->getItem($recordId);
if (empty($record)) if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerSeries extends JControllerForm
$ownerId = $record->created_by; $ownerId = $record->created_by;
} }
// [Interpretation 9061] If the owner matches 'me' then allow. // [Interpretation 9287] If the owner matches 'me' then allow.
if ($ownerId == $user->id) if ($ownerId == $user->id)
{ {
if ($user->authorise('series.edit.own', 'com_sermondistributor')) if ($user->authorise('series.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerSeries extends JControllerForm
return false; return false;
} }
} }
// [Interpretation 9083] Since there is no permission, revert to the component permissions. // [Interpretation 9309] Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option); return $user->authorise('series.edit', $this->option);
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series_list.php @subpackage series_list.php
@ -48,29 +48,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData() public function exportData()
{ {
// [Interpretation 6800] Check for request forgeries // [Interpretation 7013] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6802] check if export is allowed for this user. // [Interpretation 7015] check if export is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// [Interpretation 6806] Get the input // [Interpretation 7019] Get the input
$input = JFactory::getApplication()->input; $input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6809] Sanitize the input // [Interpretation 7022] Sanitize the input
JArrayHelper::toInteger($pks); JArrayHelper::toInteger($pks);
// [Interpretation 6811] Get the model // [Interpretation 7024] Get the model
$model = $this->getModel('Series_list'); $model = $this->getModel('Series_list');
// [Interpretation 6813] get the data to export // [Interpretation 7026] get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (SermondistributorHelper::checkArray($data))
{ {
// [Interpretation 6817] now set the data to the spreadsheet // [Interpretation 7030] now set the data to the spreadsheet
$date = JFactory::getDate(); $date = JFactory::getDate();
SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list'); SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list');
} }
} }
// [Interpretation 6822] Redirect to the list screen with error. // [Interpretation 7035] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return; return;
@ -79,31 +79,31 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData() public function importData()
{ {
// [Interpretation 6831] Check for request forgeries // [Interpretation 7044] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6833] check if import is allowed for this user. // [Interpretation 7046] check if import is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// [Interpretation 6837] Get the import model // [Interpretation 7050] Get the import model
$model = $this->getModel('Series_list'); $model = $this->getModel('Series_list');
// [Interpretation 6839] get the headers to import // [Interpretation 7052] get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
// [Interpretation 6843] Load headers to session. // [Interpretation 7056] Load headers to session.
$session = JFactory::getSession(); $session = JFactory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('series_VDM_IMPORTHEADERS', $headers); $session->set('series_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'series_list'); $session->set('backto_VDM_IMPORT', 'series_list');
$session->set('dataType_VDM_IMPORTINTO', 'series'); $session->set('dataType_VDM_IMPORTINTO', 'series');
// [Interpretation 6849] Redirect to import view. // [Interpretation 7062] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// [Interpretation 6869] Redirect to the list screen with error. // [Interpretation 7082] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return; return;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermon.php @subpackage sermon.php
@ -60,10 +60,10 @@ class SermondistributorControllerSermon extends JControllerForm
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = array())
{ {
// [Interpretation 8810] get the user object // [Interpretation 9036] get the user object
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 8815] Access check. // [Interpretation 9041] Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor'); $access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access) if (!$access)
{ {
@ -74,13 +74,13 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId) if ($categoryId)
{ {
// [Interpretation 8826] If the category has been passed in the URL check it. // [Interpretation 9052] If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId); $allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
} }
if ($allow === null) if ($allow === null)
{ {
// [Interpretation 8835] In the absense of better information, revert to the component permissions. // [Interpretation 9061] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option); return $user->authorise('sermon.create', $this->option);
} }
else else
@ -100,13 +100,13 @@ class SermondistributorControllerSermon extends JControllerForm
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ // [Interpretation 8913] get user object. { // [Interpretation 9139] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 8915] get record id. // [Interpretation 9141] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 8922] Access check. // [Interpretation 9148] Access check.
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor')); $access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
@ -115,17 +115,17 @@ class SermondistributorControllerSermon extends JControllerForm
if ($recordId) if ($recordId)
{ {
// [Interpretation 8931] The record has been set. Check the record permissions. // [Interpretation 9157] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int) $recordId); $permission = $user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
if ($user->authorise('sermon.edit.own', 'com_sermondistributor.sermon.' . $recordId)) if ($user->authorise('sermon.edit.own', 'com_sermondistributor.sermon.' . $recordId))
{ {
// [Interpretation 8953] Fallback on edit.own. Now test the owner is the user. // [Interpretation 9179] Fallback on edit.own. Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId)) if (empty($ownerId))
{ {
// [Interpretation 8957] Need to do a lookup from the model. // [Interpretation 9183] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId); $record = $this->getModel()->getItem($recordId);
if (empty($record)) if (empty($record))
@ -135,7 +135,7 @@ class SermondistributorControllerSermon extends JControllerForm
$ownerId = $record->created_by; $ownerId = $record->created_by;
} }
// [Interpretation 8965] If the owner matches 'me' then do the test. // [Interpretation 9191] If the owner matches 'me' then do the test.
if ($ownerId == $user->id) if ($ownerId == $user->id)
{ {
if ($user->authorise('sermon.edit.own', 'com_sermondistributor')) if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
@ -151,7 +151,7 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId) if ($categoryId)
{ {
// [Interpretation 8987] The category has been set. Check the category permissions. // [Interpretation 9213] The category has been set. Check the category permissions.
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId); $catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
if (!$catpermission && !is_null($catpermission)) if (!$catpermission && !is_null($catpermission))
{ {
@ -159,7 +159,7 @@ class SermondistributorControllerSermon extends JControllerForm
} }
} }
} }
// [Interpretation 8997] Since there is no permission, revert to the component permissions. // [Interpretation 9223] Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option); return $user->authorise('sermon.edit', $this->option);
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermondistributor.php @subpackage sermondistributor.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons.php @subpackage sermons.php
@ -48,29 +48,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData() public function exportData()
{ {
// [Interpretation 6800] Check for request forgeries // [Interpretation 7013] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6802] check if export is allowed for this user. // [Interpretation 7015] check if export is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// [Interpretation 6806] Get the input // [Interpretation 7019] Get the input
$input = JFactory::getApplication()->input; $input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6809] Sanitize the input // [Interpretation 7022] Sanitize the input
JArrayHelper::toInteger($pks); JArrayHelper::toInteger($pks);
// [Interpretation 6811] Get the model // [Interpretation 7024] Get the model
$model = $this->getModel('Sermons'); $model = $this->getModel('Sermons');
// [Interpretation 6813] get the data to export // [Interpretation 7026] get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (SermondistributorHelper::checkArray($data))
{ {
// [Interpretation 6817] now set the data to the spreadsheet // [Interpretation 7030] now set the data to the spreadsheet
$date = JFactory::getDate(); $date = JFactory::getDate();
SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons'); SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons');
} }
} }
// [Interpretation 6822] Redirect to the list screen with error. // [Interpretation 7035] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return; return;
@ -79,31 +79,31 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData() public function importData()
{ {
// [Interpretation 6831] Check for request forgeries // [Interpretation 7044] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6833] check if import is allowed for this user. // [Interpretation 7046] check if import is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// [Interpretation 6837] Get the import model // [Interpretation 7050] Get the import model
$model = $this->getModel('Sermons'); $model = $this->getModel('Sermons');
// [Interpretation 6839] get the headers to import // [Interpretation 7052] get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
// [Interpretation 6843] Load headers to session. // [Interpretation 7056] Load headers to session.
$session = JFactory::getSession(); $session = JFactory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('sermon_VDM_IMPORTHEADERS', $headers); $session->set('sermon_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'sermons'); $session->set('backto_VDM_IMPORT', 'sermons');
$session->set('dataType_VDM_IMPORTINTO', 'sermon'); $session->set('dataType_VDM_IMPORTINTO', 'sermon');
// [Interpretation 6849] Redirect to import view. // [Interpretation 7062] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// [Interpretation 6869] Redirect to the list screen with error. // [Interpretation 7082] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return; return;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistic.php @subpackage statistic.php
@ -60,13 +60,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = array())
{ {
// [Interpretation 8855] Access check. // [Interpretation 9081] Access check.
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor'); $access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
if (!$access) if (!$access)
{ {
return false; return false;
} }
// [Interpretation 8866] In the absense of better information, revert to the component permissions. // [Interpretation 9092] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('statistic.create', $this->option); return JFactory::getUser()->authorise('statistic.create', $this->option);
} }
@ -82,13 +82,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9009] get user object. // [Interpretation 9235] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9011] get record id. // [Interpretation 9237] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [Interpretation 9018] Access check. // [Interpretation 9244] Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor')); $access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
@ -97,17 +97,17 @@ class SermondistributorControllerStatistic extends JControllerForm
if ($recordId) if ($recordId)
{ {
// [Interpretation 9027] The record has been set. Check the record permissions. // [Interpretation 9253] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit', 'com_sermondistributor.statistic.' . (int) $recordId); $permission = $user->authorise('statistic.edit', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
if ($user->authorise('statistic.edit.own', 'com_sermondistributor.statistic.' . $recordId)) if ($user->authorise('statistic.edit.own', 'com_sermondistributor.statistic.' . $recordId))
{ {
// [Interpretation 9049] Now test the owner is the user. // [Interpretation 9275] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId)) if (empty($ownerId))
{ {
// [Interpretation 9053] Need to do a lookup from the model. // [Interpretation 9279] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId); $record = $this->getModel()->getItem($recordId);
if (empty($record)) if (empty($record))
@ -117,7 +117,7 @@ class SermondistributorControllerStatistic extends JControllerForm
$ownerId = $record->created_by; $ownerId = $record->created_by;
} }
// [Interpretation 9061] If the owner matches 'me' then allow. // [Interpretation 9287] If the owner matches 'me' then allow.
if ($ownerId == $user->id) if ($ownerId == $user->id)
{ {
if ($user->authorise('statistic.edit.own', 'com_sermondistributor')) if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
@ -129,7 +129,7 @@ class SermondistributorControllerStatistic extends JControllerForm
return false; return false;
} }
} }
// [Interpretation 9083] Since there is no permission, revert to the component permissions. // [Interpretation 9309] Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option); return $user->authorise('statistic.edit', $this->option);
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistics.php @subpackage statistics.php
@ -48,29 +48,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData() public function exportData()
{ {
// [Interpretation 6800] Check for request forgeries // [Interpretation 7013] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6802] check if export is allowed for this user. // [Interpretation 7015] check if export is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// [Interpretation 6806] Get the input // [Interpretation 7019] Get the input
$input = JFactory::getApplication()->input; $input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// [Interpretation 6809] Sanitize the input // [Interpretation 7022] Sanitize the input
JArrayHelper::toInteger($pks); JArrayHelper::toInteger($pks);
// [Interpretation 6811] Get the model // [Interpretation 7024] Get the model
$model = $this->getModel('Statistics'); $model = $this->getModel('Statistics');
// [Interpretation 6813] get the data to export // [Interpretation 7026] get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (SermondistributorHelper::checkArray($data))
{ {
// [Interpretation 6817] now set the data to the spreadsheet // [Interpretation 7030] now set the data to the spreadsheet
$date = JFactory::getDate(); $date = JFactory::getDate();
SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics'); SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics');
} }
} }
// [Interpretation 6822] Redirect to the list screen with error. // [Interpretation 7035] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return; return;
@ -79,31 +79,31 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData() public function importData()
{ {
// [Interpretation 6831] Check for request forgeries // [Interpretation 7044] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [Interpretation 6833] check if import is allowed for this user. // [Interpretation 7046] check if import is allowed for this user.
$user = JFactory::getUser(); $user = JFactory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// [Interpretation 6837] Get the import model // [Interpretation 7050] Get the import model
$model = $this->getModel('Statistics'); $model = $this->getModel('Statistics');
// [Interpretation 6839] get the headers to import // [Interpretation 7052] get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
// [Interpretation 6843] Load headers to session. // [Interpretation 7056] Load headers to session.
$session = JFactory::getSession(); $session = JFactory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('statistic_VDM_IMPORTHEADERS', $headers); $session->set('statistic_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'statistics'); $session->set('backto_VDM_IMPORT', 'statistics');
$session->set('dataType_VDM_IMPORTINTO', 'statistic'); $session->set('dataType_VDM_IMPORTINTO', 'statistic');
// [Interpretation 6849] Redirect to import view. // [Interpretation 7062] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// [Interpretation 6869] Redirect to the list screen with error. // [Interpretation 7082] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return; return;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage batch_.php @subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermondistributor.php @subpackage sermondistributor.php
@ -919,9 +919,15 @@ abstract class SermondistributorHelper
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array($what))); $query->select($db->quoteName(array($what)));
$query->from($db->quoteName('#__'.$main.'_'.$table)); if (empty($table))
{
$query->from($db->quoteName('#__'.$main));
}
else
{
$query->from($db->quoteName('#__'.$main.'_'.$table));
}
if (is_numeric($where)) if (is_numeric($where))
{ {
$query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where); $query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where);

View File

@ -754,10 +754,10 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ARTICLE="Article"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ARTICLE_LABEL="Article" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ARTICLE_LABEL="Article"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CONTENT="Content" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CONTENT="Content"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CONTENT_LABEL="Content" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CONTENT_LABEL="Content"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_DESC="The user that created the Help Document." COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_DESC="The user that created this Help Document."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_LABEL="Created by" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_LABEL="Created By"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_DESC="The date Help Document was created." COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_DESC="The date this Help Document was created."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_LABEL="Created date" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_LABEL="Created Date"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_DETAILS="Details" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_DETAILS="Details"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_EDIT="Editing the Help Document" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_EDIT="Editing the Help Document"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ERROR_UNIQUE_ALIAS="Another Help Document has the same alias." COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ERROR_UNIQUE_ALIAS="Another Help Document has the same alias."
@ -769,6 +769,10 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_JOOMLA_ARTICLE="Joomla Article"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION="Location" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION="Location"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION="Select the help target location." COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION="Select the help target location."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL="Location" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL="Location"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_BY_DESC="The last user that modified this Help Document."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_BY_LABEL="Modified By"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_DATE_DESC="The date this Help Document was modified."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_DATE_LABEL="Modified Date"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_NEW="A New Help Document" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_NEW="A New Help Document"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_NOT_REQUIRED="Not Required" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_NOT_REQUIRED="Not Required"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ORDERING_LABEL="Ordering" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ORDERING_LABEL="Ordering"
@ -906,10 +910,10 @@ COM_SERMONDISTRIBUTOR_PREACHER_ACCESS_SITE_DESC=" Allows the users in this group
COM_SERMONDISTRIBUTOR_PREACHER_ALIAS="Alias" COM_SERMONDISTRIBUTOR_PREACHER_ALIAS="Alias"
COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT="Auto-generated from name" COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT="Auto-generated from name"
COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_LABEL="Alias" COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_LABEL="Alias"
COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_DESC="The user that created the Preacher." COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_DESC="The user that created this Preacher."
COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_LABEL="Created by" COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_LABEL="Created By"
COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_DESC="The date Preacher was created." COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_DESC="The date this Preacher was created."
COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_LABEL="Created date" COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_LABEL="Created Date"
COM_SERMONDISTRIBUTOR_PREACHER_DESCRIPTION="Description" COM_SERMONDISTRIBUTOR_PREACHER_DESCRIPTION="Description"
COM_SERMONDISTRIBUTOR_PREACHER_DESCRIPTION_LABEL="Description" COM_SERMONDISTRIBUTOR_PREACHER_DESCRIPTION_LABEL="Description"
COM_SERMONDISTRIBUTOR_PREACHER_DETAILS="Details" COM_SERMONDISTRIBUTOR_PREACHER_DETAILS="Details"
@ -923,6 +927,10 @@ COM_SERMONDISTRIBUTOR_PREACHER_ICON="Icon"
COM_SERMONDISTRIBUTOR_PREACHER_ICON_DESCRIPTION="Must be 358px x 358px" COM_SERMONDISTRIBUTOR_PREACHER_ICON_DESCRIPTION="Must be 358px x 358px"
COM_SERMONDISTRIBUTOR_PREACHER_ICON_LABEL="Icon" COM_SERMONDISTRIBUTOR_PREACHER_ICON_LABEL="Icon"
COM_SERMONDISTRIBUTOR_PREACHER_ID="Id" COM_SERMONDISTRIBUTOR_PREACHER_ID="Id"
COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_BY_DESC="The last user that modified this Preacher."
COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_BY_LABEL="Modified By"
COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_DATE_DESC="The date this Preacher was modified."
COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_DATE_LABEL="Modified Date"
COM_SERMONDISTRIBUTOR_PREACHER_NAME="Name" COM_SERMONDISTRIBUTOR_PREACHER_NAME="Name"
COM_SERMONDISTRIBUTOR_PREACHER_NAME_DESCRIPTION="Enter Name Here" COM_SERMONDISTRIBUTOR_PREACHER_NAME_DESCRIPTION="Enter Name Here"
COM_SERMONDISTRIBUTOR_PREACHER_NAME_HINT="Name Here" COM_SERMONDISTRIBUTOR_PREACHER_NAME_HINT="Name Here"
@ -948,10 +956,10 @@ COM_SERMONDISTRIBUTOR_SERIES_ACCESS_SITE_DESC=" Allows the users in this group t
COM_SERMONDISTRIBUTOR_SERIES_ALIAS="Alias" COM_SERMONDISTRIBUTOR_SERIES_ALIAS="Alias"
COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT="Auto-generated from name" COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT="Auto-generated from name"
COM_SERMONDISTRIBUTOR_SERIES_ALIAS_LABEL="Alias" COM_SERMONDISTRIBUTOR_SERIES_ALIAS_LABEL="Alias"
COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_DESC="The user that created the Series." COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_DESC="The user that created this Series."
COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_LABEL="Created by" COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_LABEL="Created By"
COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_DESC="The date Series was created." COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_DESC="The date this Series was created."
COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_LABEL="Created date" COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_LABEL="Created Date"
COM_SERMONDISTRIBUTOR_SERIES_DESCRIPTION="Description" COM_SERMONDISTRIBUTOR_SERIES_DESCRIPTION="Description"
COM_SERMONDISTRIBUTOR_SERIES_DESCRIPTION_LABEL="Description" COM_SERMONDISTRIBUTOR_SERIES_DESCRIPTION_LABEL="Description"
COM_SERMONDISTRIBUTOR_SERIES_DETAILS="Details" COM_SERMONDISTRIBUTOR_SERIES_DETAILS="Details"
@ -1013,6 +1021,10 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_UNPUBLISHED="%s Series List unpublishe
COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_UNPUBLISHED_1="%s Series unpublished." COM_SERMONDISTRIBUTOR_SERIES_LIST_N_ITEMS_UNPUBLISHED_1="%s Series unpublished."
COM_SERMONDISTRIBUTOR_SERIES_LIST_SUBMENU="Series List Submenu" COM_SERMONDISTRIBUTOR_SERIES_LIST_SUBMENU="Series List Submenu"
COM_SERMONDISTRIBUTOR_SERIES_LIST_SUBMENU_DESC="Allows the users in this group to update the submenu of the series" COM_SERMONDISTRIBUTOR_SERIES_LIST_SUBMENU_DESC="Allows the users in this group to update the submenu of the series"
COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_BY_DESC="The last user that modified this Series."
COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_BY_LABEL="Modified By"
COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_DATE_DESC="The date this Series was modified."
COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_DATE_LABEL="Modified Date"
COM_SERMONDISTRIBUTOR_SERIES_NAME="Name" COM_SERMONDISTRIBUTOR_SERIES_NAME="Name"
COM_SERMONDISTRIBUTOR_SERIES_NAME_DESCRIPTION="Enter Name Here" COM_SERMONDISTRIBUTOR_SERIES_NAME_DESCRIPTION="Enter Name Here"
COM_SERMONDISTRIBUTOR_SERIES_NAME_HINT="Name Here" COM_SERMONDISTRIBUTOR_SERIES_NAME_HINT="Name Here"
@ -1093,10 +1105,10 @@ COM_SERMONDISTRIBUTOR_SERMON_BUILD_DESCRIPTION="Set the method used to add files
COM_SERMONDISTRIBUTOR_SERMON_BUILD_LABEL="Build Option" COM_SERMONDISTRIBUTOR_SERMON_BUILD_LABEL="Build Option"
COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION="select one of the following categories" COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION="select one of the following categories"
COM_SERMONDISTRIBUTOR_SERMON_CATID_LABEL="Category" COM_SERMONDISTRIBUTOR_SERMON_CATID_LABEL="Category"
COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_DESC="The user that created the Sermon." COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_DESC="The user that created this Sermon."
COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_LABEL="Created by" COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_LABEL="Created By"
COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_DESC="The date Sermon was created." COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_DESC="The date this Sermon was created."
COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_LABEL="Created date" COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_LABEL="Created Date"
COM_SERMONDISTRIBUTOR_SERMON_DESCRIPTION="Description" COM_SERMONDISTRIBUTOR_SERMON_DESCRIPTION="Description"
COM_SERMONDISTRIBUTOR_SERMON_DESCRIPTION_LABEL="Description" COM_SERMONDISTRIBUTOR_SERMON_DESCRIPTION_LABEL="Description"
COM_SERMONDISTRIBUTOR_SERMON_DETAILS="Details" COM_SERMONDISTRIBUTOR_SERMON_DETAILS="Details"
@ -1121,6 +1133,10 @@ COM_SERMONDISTRIBUTOR_SERMON_MANUAL="Manual"
COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES="Manual Files" COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES="Manual Files"
COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES_DESCRIPTION="Select the files you would like to add to this sermon." COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES_DESCRIPTION="Select the files you would like to add to this sermon."
COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES_LABEL="Files" COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES_LABEL="Files"
COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_BY_DESC="The last user that modified this Sermon."
COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_BY_LABEL="Modified By"
COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_DATE_DESC="The date this Sermon was modified."
COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_DATE_LABEL="Modified Date"
COM_SERMONDISTRIBUTOR_SERMON_NAME="Name" COM_SERMONDISTRIBUTOR_SERMON_NAME="Name"
COM_SERMONDISTRIBUTOR_SERMON_NAME_DESCRIPTION="Enter Name Here" COM_SERMONDISTRIBUTOR_SERMON_NAME_DESCRIPTION="Enter Name Here"
COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT="Name Here" COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT="Name Here"
@ -1298,10 +1314,10 @@ COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER="Counter"
COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_DESCRIPTION="Enter number." COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_DESCRIPTION="Enter number."
COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_HINT="Number Here." COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_HINT="Number Here."
COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL="Counter" COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL="Counter"
COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_DESC="The user that created the Statistic." COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_DESC="The user that created this Statistic."
COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_LABEL="Created by" COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_LABEL="Created By"
COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_DESC="The date Statistic was created." COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_DESC="The date this Statistic was created."
COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_LABEL="Created date" COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_LABEL="Created Date"
COM_SERMONDISTRIBUTOR_STATISTIC_DETAILS="Details" COM_SERMONDISTRIBUTOR_STATISTIC_DETAILS="Details"
COM_SERMONDISTRIBUTOR_STATISTIC_EDIT="Editing the Statistic" COM_SERMONDISTRIBUTOR_STATISTIC_EDIT="Editing the Statistic"
COM_SERMONDISTRIBUTOR_STATISTIC_ERROR_UNIQUE_ALIAS="Another Statistic has the same alias." COM_SERMONDISTRIBUTOR_STATISTIC_ERROR_UNIQUE_ALIAS="Another Statistic has the same alias."
@ -1310,6 +1326,10 @@ COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_DESCRIPTION="Enter the file name."
COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_HINT="the_file_name.mp3" COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_HINT="the_file_name.mp3"
COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL="File Name" COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL="File Name"
COM_SERMONDISTRIBUTOR_STATISTIC_ID="Id" COM_SERMONDISTRIBUTOR_STATISTIC_ID="Id"
COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_BY_DESC="The last user that modified this Statistic."
COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_BY_LABEL="Modified By"
COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_DATE_DESC="The date this Statistic was modified."
COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_DATE_LABEL="Modified Date"
COM_SERMONDISTRIBUTOR_STATISTIC_NEW="A New Statistic" COM_SERMONDISTRIBUTOR_STATISTIC_NEW="A New Statistic"
COM_SERMONDISTRIBUTOR_STATISTIC_ORDERING_LABEL="Ordering" COM_SERMONDISTRIBUTOR_STATISTIC_ORDERING_LABEL="Ordering"
COM_SERMONDISTRIBUTOR_STATISTIC_PERMISSION="Permissions" COM_SERMONDISTRIBUTOR_STATISTIC_PERMISSION="Permissions"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage batchselection.php @subpackage batchselection.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_under.php @subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons_fullwidth.php @subpackage sermons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons_fullwidth.php @subpackage sermons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_under.php @subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage files_fullwidth.php @subpackage files_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage stastics_fullwidth.php @subpackage stastics_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage ajax.php @subpackage ajax.php
@ -43,7 +43,7 @@ class SermondistributorModelAjax extends JModelList
} }
// [Interpretation 8452] Used in sermon // [Interpretation 8673] Used in sermon
/** /**
* Check and Set Dropbox local listing * Check and Set Dropbox local listing
**/ **/

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage articles.php @subpackage articles.php
@ -50,48 +50,58 @@ class JFormFieldArticles extends JFormFieldList
*/ */
protected function getInput() protected function getInput()
{ {
// [Interpretation 7157] see if we should add buttons // [Interpretation 7370] see if we should add buttons
$setButton = $this->getAttribute('button'); $setButton = $this->getAttribute('button');
// [Interpretation 7159] get html // [Interpretation 7372] get html
$html = parent::getInput(); $html = parent::getInput();
// [Interpretation 7161] if true set button // [Interpretation 7374] if true set button
if ($setButton === 'true') if ($setButton === 'true')
{ {
$button = array(); $button = array();
$script = array(); $script = array();
$buttonName = $this->getAttribute('name'); $buttonName = $this->getAttribute('name');
// [Interpretation 7167] get the input from url // [Interpretation 7380] get the input from url
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 7169] get the view name & id // [Interpretation 7382] get the view name & id
$values = $jinput->getArray(array( $values = $jinput->getArray(array(
'id' => 'int', 'id' => 'int',
'view' => 'word' 'view' => 'word'
)); ));
// [Interpretation 7174] check if new item // [Interpretation 7387] check if new item
$ref = ''; $ref = '';
$refJ = ''; $refJ = '';
if (!is_null($values['id']) && strlen($values['view'])) if (!is_null($values['id']) && strlen($values['view']))
{ {
// [Interpretation 7179] only load referal if not new item. // [Interpretation 7392] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 7184] only add if user allowed to create article // [Interpretation 7397] only add if user allowed to create article
if ($user->authorise('core.create', 'com_sermondistributor')) if ($user->authorise('core.create', 'com_sermondistributor'))
{ {
// [Interpretation 7202] build Create button // [Interpretation 7415] build Create button
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;" $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_sermondistributor&amp;view=article&amp;layout=edit'.$ref.'" > href="index.php?option=com_sermondistributor&amp;view=article&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>'; <span class="icon-new icon-white"></span></a>';
} }
// [Interpretation 7207] only add if user allowed to edit article // [Interpretation 7425] only add if user allowed to edit article
if (($buttonName == 'article' || $buttonName == 'articles') && $user->authorise('core.edit', 'com_sermondistributor')) if (($buttonName == 'article' || $buttonName == 'articles') && $user->authorise('core.edit', 'com_sermondistributor'))
{ {
// [Interpretation 7218] build edit button // [Interpretation 7436] build edit button
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" > $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>'; <span class="icon-edit"></span></a>';
// [Interpretation 7221] build script // [Interpretation 7444] build script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
@ -118,18 +128,18 @@ class JFormFieldArticles extends JFormFieldList
} }
}"; }";
} }
// [Interpretation 7248] check if button was created for article field. // [Interpretation 7471] check if button was created for article field.
if (SermondistributorHelper::checkArray($button)) if (is_array($button) && count($button) > 0)
{ {
// [Interpretation 7251] Add some final script // [Interpretation 7474] Add some final script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append'); jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});"; });";
// [Interpretation 7256] Load the needed script. // [Interpretation 7479] Load the needed script.
$document = JFactory::getDocument(); $document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script)); $document->addScriptDeclaration(implode(' ',$script));
// [Interpretation 7259] return the button attached to input field. // [Interpretation 7482] return the button attached to input field.
return $html . implode('',$button); return $html . implode('',$button);
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage dropboxfiles.php @subpackage dropboxfiles.php
@ -50,48 +50,58 @@ class JFormFieldDropboxfiles extends JFormFieldList
*/ */
protected function getInput() protected function getInput()
{ {
// [Interpretation 7157] see if we should add buttons // [Interpretation 7370] see if we should add buttons
$setButton = $this->getAttribute('button'); $setButton = $this->getAttribute('button');
// [Interpretation 7159] get html // [Interpretation 7372] get html
$html = parent::getInput(); $html = parent::getInput();
// [Interpretation 7161] if true set button // [Interpretation 7374] if true set button
if ($setButton === 'true') if ($setButton === 'true')
{ {
$button = array(); $button = array();
$script = array(); $script = array();
$buttonName = $this->getAttribute('name'); $buttonName = $this->getAttribute('name');
// [Interpretation 7167] get the input from url // [Interpretation 7380] get the input from url
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 7169] get the view name & id // [Interpretation 7382] get the view name & id
$values = $jinput->getArray(array( $values = $jinput->getArray(array(
'id' => 'int', 'id' => 'int',
'view' => 'word' 'view' => 'word'
)); ));
// [Interpretation 7174] check if new item // [Interpretation 7387] check if new item
$ref = ''; $ref = '';
$refJ = ''; $refJ = '';
if (!is_null($values['id']) && strlen($values['view'])) if (!is_null($values['id']) && strlen($values['view']))
{ {
// [Interpretation 7179] only load referal if not new item. // [Interpretation 7392] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id']; $ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 7184] only add if user allowed to create // [Interpretation 7397] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor')) if ($user->authorise('core.create', 'com_sermondistributor'))
{ {
// [Interpretation 7202] build Create button // [Interpretation 7415] build Create button
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;" $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" > href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>'; <span class="icon-new icon-white"></span></a>';
} }
// [Interpretation 7207] only add if user allowed to edit // [Interpretation 7425] only add if user allowed to edit
if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_sermondistributor')) if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_sermondistributor'))
{ {
// [Interpretation 7218] build edit button // [Interpretation 7436] build edit button
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" > $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>'; <span class="icon-edit"></span></a>';
// [Interpretation 7221] build script // [Interpretation 7444] build script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
@ -118,18 +128,18 @@ class JFormFieldDropboxfiles extends JFormFieldList
} }
}"; }";
} }
// [Interpretation 7248] check if button was created for field. // [Interpretation 7471] check if button was created for field.
if (SermondistributorHelper::checkArray($button)) if (is_array($button) && count($button) > 0)
{ {
// [Interpretation 7251] Add some final script // [Interpretation 7474] Add some final script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append'); jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});"; });";
// [Interpretation 7256] Load the needed script. // [Interpretation 7479] Load the needed script.
$document = JFactory::getDocument(); $document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script)); $document->addScriptDeclaration(implode(' ',$script));
// [Interpretation 7259] return the button attached to input field. // [Interpretation 7482] return the button attached to input field.
return $html . implode('',$button); return $html . implode('',$button);
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage localfiles.php @subpackage localfiles.php
@ -50,48 +50,58 @@ class JFormFieldLocalfiles extends JFormFieldList
*/ */
protected function getInput() protected function getInput()
{ {
// [Interpretation 7157] see if we should add buttons // [Interpretation 7370] see if we should add buttons
$setButton = $this->getAttribute('button'); $setButton = $this->getAttribute('button');
// [Interpretation 7159] get html // [Interpretation 7372] get html
$html = parent::getInput(); $html = parent::getInput();
// [Interpretation 7161] if true set button // [Interpretation 7374] if true set button
if ($setButton === 'true') if ($setButton === 'true')
{ {
$button = array(); $button = array();
$script = array(); $script = array();
$buttonName = $this->getAttribute('name'); $buttonName = $this->getAttribute('name');
// [Interpretation 7167] get the input from url // [Interpretation 7380] get the input from url
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 7169] get the view name & id // [Interpretation 7382] get the view name & id
$values = $jinput->getArray(array( $values = $jinput->getArray(array(
'id' => 'int', 'id' => 'int',
'view' => 'word' 'view' => 'word'
)); ));
// [Interpretation 7174] check if new item // [Interpretation 7387] check if new item
$ref = ''; $ref = '';
$refJ = ''; $refJ = '';
if (!is_null($values['id']) && strlen($values['view'])) if (!is_null($values['id']) && strlen($values['view']))
{ {
// [Interpretation 7179] only load referal if not new item. // [Interpretation 7392] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id']; $ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 7184] only add if user allowed to create // [Interpretation 7397] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor')) if ($user->authorise('core.create', 'com_sermondistributor'))
{ {
// [Interpretation 7202] build Create button // [Interpretation 7415] build Create button
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;" $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" > href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>'; <span class="icon-new icon-white"></span></a>';
} }
// [Interpretation 7207] only add if user allowed to edit // [Interpretation 7425] only add if user allowed to edit
if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_sermondistributor')) if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_sermondistributor'))
{ {
// [Interpretation 7218] build edit button // [Interpretation 7436] build edit button
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" > $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>'; <span class="icon-edit"></span></a>';
// [Interpretation 7221] build script // [Interpretation 7444] build script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
@ -118,18 +128,18 @@ class JFormFieldLocalfiles extends JFormFieldList
} }
}"; }";
} }
// [Interpretation 7248] check if button was created for field. // [Interpretation 7471] check if button was created for field.
if (SermondistributorHelper::checkArray($button)) if (is_array($button) && count($button) > 0)
{ {
// [Interpretation 7251] Add some final script // [Interpretation 7474] Add some final script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append'); jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});"; });";
// [Interpretation 7256] Load the needed script. // [Interpretation 7479] Load the needed script.
$document = JFactory::getDocument(); $document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script)); $document->addScriptDeclaration(implode(' ',$script));
// [Interpretation 7259] return the button attached to input field. // [Interpretation 7482] return the button attached to input field.
return $html . implode('',$button); return $html . implode('',$button);
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preachers.php @subpackage preachers.php
@ -50,48 +50,58 @@ class JFormFieldPreachers extends JFormFieldList
*/ */
protected function getInput() protected function getInput()
{ {
// [Interpretation 7157] see if we should add buttons // [Interpretation 7370] see if we should add buttons
$setButton = $this->getAttribute('button'); $setButton = $this->getAttribute('button');
// [Interpretation 7159] get html // [Interpretation 7372] get html
$html = parent::getInput(); $html = parent::getInput();
// [Interpretation 7161] if true set button // [Interpretation 7374] if true set button
if ($setButton === 'true') if ($setButton === 'true')
{ {
$button = array(); $button = array();
$script = array(); $script = array();
$buttonName = $this->getAttribute('name'); $buttonName = $this->getAttribute('name');
// [Interpretation 7167] get the input from url // [Interpretation 7380] get the input from url
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 7169] get the view name & id // [Interpretation 7382] get the view name & id
$values = $jinput->getArray(array( $values = $jinput->getArray(array(
'id' => 'int', 'id' => 'int',
'view' => 'word' 'view' => 'word'
)); ));
// [Interpretation 7174] check if new item // [Interpretation 7387] check if new item
$ref = ''; $ref = '';
$refJ = ''; $refJ = '';
if (!is_null($values['id']) && strlen($values['view'])) if (!is_null($values['id']) && strlen($values['view']))
{ {
// [Interpretation 7179] only load referal if not new item. // [Interpretation 7392] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id']; $ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 7184] only add if user allowed to create preacher // [Interpretation 7397] only add if user allowed to create preacher
if ($user->authorise('preacher.create', 'com_sermondistributor')) if ($user->authorise('preacher.create', 'com_sermondistributor'))
{ {
// [Interpretation 7202] build Create button // [Interpretation 7415] build Create button
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;" $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_sermondistributor&amp;view=preacher&amp;layout=edit'.$ref.'" > href="index.php?option=com_sermondistributor&amp;view=preacher&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>'; <span class="icon-new icon-white"></span></a>';
} }
// [Interpretation 7207] only add if user allowed to edit preacher // [Interpretation 7425] only add if user allowed to edit preacher
if (($buttonName == 'preacher' || $buttonName == 'preachers') && $user->authorise('preacher.edit', 'com_sermondistributor')) if (($buttonName == 'preacher' || $buttonName == 'preachers') && $user->authorise('preacher.edit', 'com_sermondistributor'))
{ {
// [Interpretation 7218] build edit button // [Interpretation 7436] build edit button
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" > $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>'; <span class="icon-edit"></span></a>';
// [Interpretation 7221] build script // [Interpretation 7444] build script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
@ -118,18 +128,18 @@ class JFormFieldPreachers extends JFormFieldList
} }
}"; }";
} }
// [Interpretation 7248] check if button was created for preacher field. // [Interpretation 7471] check if button was created for preacher field.
if (SermondistributorHelper::checkArray($button)) if (is_array($button) && count($button) > 0)
{ {
// [Interpretation 7251] Add some final script // [Interpretation 7474] Add some final script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append'); jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});"; });";
// [Interpretation 7256] Load the needed script. // [Interpretation 7479] Load the needed script.
$document = JFactory::getDocument(); $document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script)); $document->addScriptDeclaration(implode(' ',$script));
// [Interpretation 7259] return the button attached to input field. // [Interpretation 7482] return the button attached to input field.
return $html . implode('',$button); return $html . implode('',$button);
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.php @subpackage series.php
@ -50,48 +50,58 @@ class JFormFieldSeries extends JFormFieldList
*/ */
protected function getInput() protected function getInput()
{ {
// [Interpretation 7157] see if we should add buttons // [Interpretation 7370] see if we should add buttons
$setButton = $this->getAttribute('button'); $setButton = $this->getAttribute('button');
// [Interpretation 7159] get html // [Interpretation 7372] get html
$html = parent::getInput(); $html = parent::getInput();
// [Interpretation 7161] if true set button // [Interpretation 7374] if true set button
if ($setButton === 'true') if ($setButton === 'true')
{ {
$button = array(); $button = array();
$script = array(); $script = array();
$buttonName = $this->getAttribute('name'); $buttonName = $this->getAttribute('name');
// [Interpretation 7167] get the input from url // [Interpretation 7380] get the input from url
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 7169] get the view name & id // [Interpretation 7382] get the view name & id
$values = $jinput->getArray(array( $values = $jinput->getArray(array(
'id' => 'int', 'id' => 'int',
'view' => 'word' 'view' => 'word'
)); ));
// [Interpretation 7174] check if new item // [Interpretation 7387] check if new item
$ref = ''; $ref = '';
$refJ = ''; $refJ = '';
if (!is_null($values['id']) && strlen($values['view'])) if (!is_null($values['id']) && strlen($values['view']))
{ {
// [Interpretation 7179] only load referal if not new item. // [Interpretation 7392] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id']; $ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 7184] only add if user allowed to create series // [Interpretation 7397] only add if user allowed to create series
if ($user->authorise('series.create', 'com_sermondistributor')) if ($user->authorise('series.create', 'com_sermondistributor'))
{ {
// [Interpretation 7202] build Create button // [Interpretation 7415] build Create button
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;" $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_sermondistributor&amp;view=series&amp;layout=edit'.$ref.'" > href="index.php?option=com_sermondistributor&amp;view=series&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>'; <span class="icon-new icon-white"></span></a>';
} }
// [Interpretation 7207] only add if user allowed to edit series // [Interpretation 7425] only add if user allowed to edit series
if (($buttonName == 'series' || $buttonName == 'all_series') && $user->authorise('series.edit', 'com_sermondistributor')) if (($buttonName == 'series' || $buttonName == 'all_series') && $user->authorise('series.edit', 'com_sermondistributor'))
{ {
// [Interpretation 7218] build edit button // [Interpretation 7436] build edit button
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" > $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>'; <span class="icon-edit"></span></a>';
// [Interpretation 7221] build script // [Interpretation 7444] build script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
@ -118,18 +128,18 @@ class JFormFieldSeries extends JFormFieldList
} }
}"; }";
} }
// [Interpretation 7248] check if button was created for series field. // [Interpretation 7471] check if button was created for series field.
if (SermondistributorHelper::checkArray($button)) if (is_array($button) && count($button) > 0)
{ {
// [Interpretation 7251] Add some final script // [Interpretation 7474] Add some final script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append'); jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});"; });";
// [Interpretation 7256] Load the needed script. // [Interpretation 7479] Load the needed script.
$document = JFactory::getDocument(); $document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script)); $document->addScriptDeclaration(implode(' ',$script));
// [Interpretation 7259] return the button attached to input field. // [Interpretation 7482] return the button attached to input field.
return $html . implode('',$button); return $html . implode('',$button);
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermon.php @subpackage sermon.php
@ -50,48 +50,58 @@ class JFormFieldSermon extends JFormFieldList
*/ */
protected function getInput() protected function getInput()
{ {
// [Interpretation 7157] see if we should add buttons // [Interpretation 7370] see if we should add buttons
$setButton = $this->getAttribute('button'); $setButton = $this->getAttribute('button');
// [Interpretation 7159] get html // [Interpretation 7372] get html
$html = parent::getInput(); $html = parent::getInput();
// [Interpretation 7161] if true set button // [Interpretation 7374] if true set button
if ($setButton === 'true') if ($setButton === 'true')
{ {
$button = array(); $button = array();
$script = array(); $script = array();
$buttonName = $this->getAttribute('name'); $buttonName = $this->getAttribute('name');
// [Interpretation 7167] get the input from url // [Interpretation 7380] get the input from url
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 7169] get the view name & id // [Interpretation 7382] get the view name & id
$values = $jinput->getArray(array( $values = $jinput->getArray(array(
'id' => 'int', 'id' => 'int',
'view' => 'word' 'view' => 'word'
)); ));
// [Interpretation 7174] check if new item // [Interpretation 7387] check if new item
$ref = ''; $ref = '';
$refJ = ''; $refJ = '';
if (!is_null($values['id']) && strlen($values['view'])) if (!is_null($values['id']) && strlen($values['view']))
{ {
// [Interpretation 7179] only load referal if not new item. // [Interpretation 7392] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id']; $ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 7184] only add if user allowed to create sermon // [Interpretation 7397] only add if user allowed to create sermon
if ($user->authorise('sermon.create', 'com_sermondistributor')) if ($user->authorise('sermon.create', 'com_sermondistributor'))
{ {
// [Interpretation 7202] build Create button // [Interpretation 7415] build Create button
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;" $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_sermondistributor&amp;view=sermon&amp;layout=edit'.$ref.'" > href="index.php?option=com_sermondistributor&amp;view=sermon&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>'; <span class="icon-new icon-white"></span></a>';
} }
// [Interpretation 7207] only add if user allowed to edit sermon // [Interpretation 7425] only add if user allowed to edit sermon
if (($buttonName == 'sermon' || $buttonName == 'sermons') && $user->authorise('sermon.edit', 'com_sermondistributor')) if (($buttonName == 'sermon' || $buttonName == 'sermons') && $user->authorise('sermon.edit', 'com_sermondistributor'))
{ {
// [Interpretation 7218] build edit button // [Interpretation 7436] build edit button
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', SermondistributorHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" > $buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_SERMONDISTRIBUTOR_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>'; <span class="icon-edit"></span></a>';
// [Interpretation 7221] build script // [Interpretation 7444] build script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
@ -118,18 +128,18 @@ class JFormFieldSermon extends JFormFieldList
} }
}"; }";
} }
// [Interpretation 7248] check if button was created for sermon field. // [Interpretation 7471] check if button was created for sermon field.
if (SermondistributorHelper::checkArray($button)) if (is_array($button) && count($button) > 0)
{ {
// [Interpretation 7251] Add some final script // [Interpretation 7474] Add some final script
$script[] = " $script[] = "
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append'); jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});"; });";
// [Interpretation 7256] Load the needed script. // [Interpretation 7479] Load the needed script.
$document = JFactory::getDocument(); $document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script)); $document->addScriptDeclaration(implode(' ',$script));
// [Interpretation 7259] return the button attached to input field. // [Interpretation 7482] return the button attached to input field.
return $html . implode('',$button); return $html . implode('',$button);
} }
} }

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.js @subpackage help_document.js
@ -53,7 +53,7 @@ jQuery(document).ready(function()
// the vvvvvwe function // the vvvvvwe function
function vvvvvwe(location_vvvvvwe) function vvvvvwe(location_vvvvvwe)
{ {
// [Interpretation 7534] set the function logic // [Interpretation 7755] set the function logic
if (location_vvvvvwe == 1) if (location_vvvvvwe == 1)
{ {
jQuery('#jform_admin_view').closest('.control-group').show(); jQuery('#jform_admin_view').closest('.control-group').show();
@ -67,7 +67,7 @@ function vvvvvwe(location_vvvvvwe)
// the vvvvvwf function // the vvvvvwf function
function vvvvvwf(location_vvvvvwf) function vvvvvwf(location_vvvvvwf)
{ {
// [Interpretation 7534] set the function logic // [Interpretation 7755] set the function logic
if (location_vvvvvwf == 2) if (location_vvvvvwf == 2)
{ {
jQuery('#jform_site_view').closest('.control-group').show(); jQuery('#jform_site_view').closest('.control-group').show();
@ -94,7 +94,7 @@ function vvvvvwg(type_vvvvvwg)
var type = type_vvvvvwg.some(type_vvvvvwg_SomeFunc); var type = type_vvvvvwg.some(type_vvvvvwg_SomeFunc);
// [Interpretation 7512] set this function logic // [Interpretation 7733] set this function logic
if (type) if (type)
{ {
jQuery('#jform_url').closest('.control-group').show(); jQuery('#jform_url').closest('.control-group').show();
@ -125,7 +125,7 @@ function vvvvvwg(type_vvvvvwg)
// the vvvvvwg Some function // the vvvvvwg Some function
function type_vvvvvwg_SomeFunc(type_vvvvvwg) function type_vvvvvwg_SomeFunc(type_vvvvvwg)
{ {
// [Interpretation 7499] set the function logic // [Interpretation 7720] set the function logic
if (type_vvvvvwg == 3) if (type_vvvvvwg == 3)
{ {
return true; return true;
@ -149,7 +149,7 @@ function vvvvvwh(type_vvvvvwh)
var type = type_vvvvvwh.some(type_vvvvvwh_SomeFunc); var type = type_vvvvvwh.some(type_vvvvvwh_SomeFunc);
// [Interpretation 7512] set this function logic // [Interpretation 7733] set this function logic
if (type) if (type)
{ {
jQuery('#jform_article').closest('.control-group').show(); jQuery('#jform_article').closest('.control-group').show();
@ -180,7 +180,7 @@ function vvvvvwh(type_vvvvvwh)
// the vvvvvwh Some function // the vvvvvwh Some function
function type_vvvvvwh_SomeFunc(type_vvvvvwh) function type_vvvvvwh_SomeFunc(type_vvvvvwh)
{ {
// [Interpretation 7499] set the function logic // [Interpretation 7720] set the function logic
if (type_vvvvvwh == 1) if (type_vvvvvwh == 1)
{ {
return true; return true;
@ -204,7 +204,7 @@ function vvvvvwi(type_vvvvvwi)
var type = type_vvvvvwi.some(type_vvvvvwi_SomeFunc); var type = type_vvvvvwi.some(type_vvvvvwi_SomeFunc);
// [Interpretation 7512] set this function logic // [Interpretation 7733] set this function logic
if (type) if (type)
{ {
jQuery('#jform_content-lbl').closest('.control-group').show(); jQuery('#jform_content-lbl').closest('.control-group').show();
@ -235,7 +235,7 @@ function vvvvvwi(type_vvvvvwi)
// the vvvvvwi Some function // the vvvvvwi Some function
function type_vvvvvwi_SomeFunc(type_vvvvvwi) function type_vvvvvwi_SomeFunc(type_vvvvvwi)
{ {
// [Interpretation 7499] set the function logic // [Interpretation 7720] set the function logic
if (type_vvvvvwi == 2) if (type_vvvvvwi == 2)
{ {
return true; return true;
@ -246,7 +246,7 @@ function type_vvvvvwi_SomeFunc(type_vvvvvwi)
// the vvvvvwj function // the vvvvvwj function
function vvvvvwj(target_vvvvvwj) function vvvvvwj(target_vvvvvwj)
{ {
// [Interpretation 7534] set the function logic // [Interpretation 7755] set the function logic
if (target_vvvvvwj == 1) if (target_vvvvvwj == 1)
{ {
jQuery('#jform_groups').closest('.control-group').show(); jQuery('#jform_groups').closest('.control-group').show();

View File

@ -4,34 +4,37 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields" addfieldpath="/administrator/components/com_sermondistributor/models/fields"
> >
<fieldset name="details"> <fieldset name="details">
<!-- [Interpretation 383] Default Fields. --> <!-- [Interpretation 433] Default Fields. -->
<!-- [Interpretation 384] Id Field. Type: Text (joomla) --> <!-- [Interpretation 434] Id Field. Type: Text (joomla) -->
<field <field
name="id" name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL" type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0" description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true" readonly="true"
/> />
<!-- [Interpretation 391] Date Created Field. Type: Calendar (joomla) --> <!-- [Interpretation 448] Date Created Field. Type: Calendar (joomla) -->
<field <field
name="created" name="created"
type="calendar" type="calendar"
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_LABEL" label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_DESC" description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_DATE_DESC"
size="22" size="22"
format="%Y-%m-%d %H:%M:%S" format="%Y-%m-%d %H:%M:%S"
filter="user_utc" filter="user_utc"
/> />
<!-- [Interpretation 402] User Created Field. Type: User (joomla) --> <!-- [Interpretation 463] User Created Field. Type: User (joomla) -->
<field <field
name="created_by" name="created_by"
type="user" type="user"
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_DESC" description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_DESC"
/> />
<!-- [Interpretation 410] Published Field. Type: List (joomla) --> <!-- [Interpretation 475] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS" <field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state" description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" > filter="intval" size="1" default="1" >
<option value="1"> <option value="1">
JPUBLISHED</option> JPUBLISHED</option>
@ -42,26 +45,28 @@
<option value="-2"> <option value="-2">
JTRASHED</option> JTRASHED</option>
</field> </field>
<!-- [Interpretation 425] Date Modified Field. Type: Calendar (joomla) --> <!-- [Interpretation 493] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly" <field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC" label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_DATE_LABEL" description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [Interpretation 429] User Modified Field. Type: User (joomla) --> <!-- [Interpretation 501] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user" <field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_MODIFIED_BY_DESC"
class="readonly" class="readonly"
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 439] Access Field. Type: Accesslevel (joomla) --> <!-- [Interpretation 513] Access Field. Type: Accesslevel (joomla) -->
<field name="access" <field name="access"
type="accesslevel" type="accesslevel"
label="JFIELD_ACCESS_LABEL" label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC" description="JFIELD_ACCESS_DESC"
default="1" default="1"
required="false" required="false"
/> />
<!-- [Interpretation 449] Ordering Field. Type: Numbers (joomla) --> <!-- [Interpretation 526] Ordering Field. Type: Numbers (joomla) -->
<field <field
name="ordering" name="ordering"
type="number" type="number"
@ -70,9 +75,10 @@
description="" description=""
default="0" default="0"
size="6" size="6"
required="false" required="false"
/> />
<!-- [Interpretation 461] Version Field. Type: Text (joomla) --> <!-- [Interpretation 542] Version Field. Type: Text (joomla) -->
<field <field
name="version" name="version"
type="text" type="text"
@ -83,7 +89,7 @@
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 475] Metakey Field. Type: Textarea (joomla) --> <!-- [Interpretation 558] Metakey Field. Type: Textarea (joomla) -->
<field <field
name="metakey" name="metakey"
type="textarea" type="textarea"
@ -92,7 +98,7 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 484] Metadesc Field. Type: Textarea (joomla) --> <!-- [Interpretation 568] Metadesc Field. Type: Textarea (joomla) -->
<field <field
name="metadesc" name="metadesc"
type="textarea" type="textarea"
@ -101,8 +107,8 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 494] Dynamic Fields. --> <!-- [Interpretation 581] Dynamic Fields. -->
<!-- [Interpretation 763] Title Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Title Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="title" name="title"
@ -118,7 +124,7 @@
message="Error! Please add title here." message="Error! Please add title here."
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TITLE_HINT" hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TITLE_HINT"
/> />
<!-- [Interpretation 678] Type Field. Type: List. (joomla) --> <!-- [Interpretation 781] Type Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
name="type" name="type"
@ -127,7 +133,7 @@
class="list_class" class="list_class"
multiple="false" multiple="false"
required="true"> required="true">
<!-- [Interpretation 749] Option Set. --> <!-- [Interpretation 852] Option Set. -->
<option value=""> <option value="">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION</option> COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION</option>
<option value="1"> <option value="1">
@ -137,7 +143,7 @@
<option value="3"> <option value="3">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL</option> COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL</option>
</field> </field>
<!-- [Interpretation 763] Groups Field. Type: Usergroup. (joomla) --> <!-- [Interpretation 866] Groups Field. Type: Usergroup. (joomla) -->
<field <field
type="usergroup" type="usergroup"
name="groups" name="groups"
@ -146,7 +152,7 @@
required="true" required="true"
multiple="true" multiple="true"
/> />
<!-- [Interpretation 678] Location Field. Type: Radio. (joomla) --> <!-- [Interpretation 781] Location Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="location" name="location"
@ -154,13 +160,13 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION" description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION"
class="btn-group" class="btn-group"
required="true"> required="true">
<!-- [Interpretation 749] Option Set. --> <!-- [Interpretation 852] Option Set. -->
<option value="1"> <option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN</option> COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN</option>
<option value="2"> <option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option> COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option>
</field> </field>
<!-- [Interpretation 763] Admin_view Field. Type: Folderlist. (joomla) --> <!-- [Interpretation 866] Admin_view Field. Type: Folderlist. (joomla) -->
<field <field
type="folderlist" type="folderlist"
name="admin_view" name="admin_view"
@ -170,7 +176,7 @@
hide_none="true" hide_none="true"
hide_default="true" hide_default="true"
/> />
<!-- [Interpretation 763] Site_view Field. Type: Folderlist. (joomla) --> <!-- [Interpretation 866] Site_view Field. Type: Folderlist. (joomla) -->
<field <field
type="folderlist" type="folderlist"
name="site_view" name="site_view"
@ -180,7 +186,7 @@
hide_none="true" hide_none="true"
hide_default="true" hide_default="true"
/> />
<!-- [Interpretation 678] Target Field. Type: Radio. (joomla) --> <!-- [Interpretation 781] Target Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="target" name="target"
@ -188,13 +194,13 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_DESCRIPTION" description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_DESCRIPTION"
class="btn-group" class="btn-group"
required="true"> required="true">
<!-- [Interpretation 749] Option Set. --> <!-- [Interpretation 852] Option Set. -->
<option value="1"> <option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME</option> COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME</option>
<option value="2"> <option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL</option> COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL</option>
</field> </field>
<!-- [Interpretation 763] Content Field. Type: Editor. (joomla) --> <!-- [Interpretation 866] Content Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="content" name="content"
@ -205,7 +211,7 @@
filter="safehtml" filter="safehtml"
required="true" required="true"
/> />
<!-- [Interpretation 763] Alias Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Alias Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="alias" name="alias"
@ -214,7 +220,7 @@
filter="STRING" filter="STRING"
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT" hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT"
/> />
<!-- [Interpretation 884] Article Field. Type: Articles. (custom) --> <!-- [Interpretation 987] Article Field. Type: Articles. (custom) -->
<field <field
type="articles" type="articles"
name="article" name="article"
@ -224,7 +230,7 @@
default="0" default="0"
required="true" required="true"
/> />
<!-- [Interpretation 763] Url Field. Type: Url. (joomla) --> <!-- [Interpretation 866] Url Field. Type: Url. (joomla) -->
<field <field
type="url" type="url"
name="url" name="url"
@ -239,7 +245,7 @@
message="Error! Please add url here." message="Error! Please add url here."
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_HINT" hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_HINT"
/> />
<!-- [Interpretation 763] Not_required Field. Type: Hidden. (joomla) --> <!-- [Interpretation 866] Not_required Field. Type: Hidden. (joomla) -->
<field <field
type="hidden" type="hidden"
name="not_required" name="not_required"
@ -247,11 +253,11 @@
/> />
</fieldset> </fieldset>
<!-- [Interpretation 513] Metadata Fields. --> <!-- [Interpretation 588] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> <fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata" <fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [Interpretation 517] Robots Field. Type: List (joomla) --> <!-- [Interpretation 593] Robots Field. Type: List (joomla) -->
<field name="robots" <field name="robots"
type="list" type="list"
label="JFIELD_METADATA_ROBOTS_LABEL" label="JFIELD_METADATA_ROBOTS_LABEL"
@ -262,13 +268,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option> <option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option> <option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field> </field>
<!-- [Interpretation 528] Author Field. Type: Text (joomla) --> <!-- [Interpretation 605] Author Field. Type: Text (joomla) -->
<field name="author" <field name="author"
type="text" type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC" label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20" size="20"
/> />
<!-- [Interpretation 534] Rights Field. Type: Textarea (joomla) --> <!-- [Interpretation 612] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL" <field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string" description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2" cols="30" rows="2"
@ -276,15 +282,15 @@
</fieldset> </fieldset>
</fields> </fields>
<!-- [Interpretation 9612] Access Control Fields. --> <!-- [Interpretation 9838] Access Control Fields. -->
<fieldset name="accesscontrol"> <fieldset name="accesscontrol">
<!-- [Interpretation 9614] Asset Id Field. Type: Hidden (joomla) --> <!-- [Interpretation 9840] Asset Id Field. Type: Hidden (joomla) -->
<field <field
name="asset_id" name="asset_id"
type="hidden" type="hidden"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 9620] Rules Field. Type: Rules (joomla) --> <!-- [Interpretation 9846] Rules Field. Type: Rules (joomla) -->
<field <field
name="rules" name="rules"
type="rules" type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preacher.js @subpackage preacher.js

View File

@ -4,34 +4,37 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields" addfieldpath="/administrator/components/com_sermondistributor/models/fields"
> >
<fieldset name="details"> <fieldset name="details">
<!-- [Interpretation 383] Default Fields. --> <!-- [Interpretation 433] Default Fields. -->
<!-- [Interpretation 384] Id Field. Type: Text (joomla) --> <!-- [Interpretation 434] Id Field. Type: Text (joomla) -->
<field <field
name="id" name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL" type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0" description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true" readonly="true"
/> />
<!-- [Interpretation 391] Date Created Field. Type: Calendar (joomla) --> <!-- [Interpretation 448] Date Created Field. Type: Calendar (joomla) -->
<field <field
name="created" name="created"
type="calendar" type="calendar"
label="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_LABEL" label="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_LABEL"
description="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_DESC" description="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_DATE_DESC"
size="22" size="22"
format="%Y-%m-%d %H:%M:%S" format="%Y-%m-%d %H:%M:%S"
filter="user_utc" filter="user_utc"
/> />
<!-- [Interpretation 402] User Created Field. Type: User (joomla) --> <!-- [Interpretation 463] User Created Field. Type: User (joomla) -->
<field <field
name="created_by" name="created_by"
type="user" type="user"
label="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_DESC" description="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_DESC"
/> />
<!-- [Interpretation 410] Published Field. Type: List (joomla) --> <!-- [Interpretation 475] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS" <field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state" description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" > filter="intval" size="1" default="1" >
<option value="1"> <option value="1">
JPUBLISHED</option> JPUBLISHED</option>
@ -42,26 +45,28 @@
<option value="-2"> <option value="-2">
JTRASHED</option> JTRASHED</option>
</field> </field>
<!-- [Interpretation 425] Date Modified Field. Type: Calendar (joomla) --> <!-- [Interpretation 493] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly" <field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC" label="COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_DATE_LABEL" description="COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [Interpretation 429] User Modified Field. Type: User (joomla) --> <!-- [Interpretation 501] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user" <field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_PREACHER_MODIFIED_BY_DESC"
class="readonly" class="readonly"
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 439] Access Field. Type: Accesslevel (joomla) --> <!-- [Interpretation 513] Access Field. Type: Accesslevel (joomla) -->
<field name="access" <field name="access"
type="accesslevel" type="accesslevel"
label="JFIELD_ACCESS_LABEL" label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC" description="JFIELD_ACCESS_DESC"
default="1" default="1"
required="false" required="false"
/> />
<!-- [Interpretation 449] Ordering Field. Type: Numbers (joomla) --> <!-- [Interpretation 526] Ordering Field. Type: Numbers (joomla) -->
<field <field
name="ordering" name="ordering"
type="number" type="number"
@ -70,9 +75,10 @@
description="" description=""
default="0" default="0"
size="6" size="6"
required="false" required="false"
/> />
<!-- [Interpretation 461] Version Field. Type: Text (joomla) --> <!-- [Interpretation 542] Version Field. Type: Text (joomla) -->
<field <field
name="version" name="version"
type="text" type="text"
@ -83,7 +89,7 @@
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 475] Metakey Field. Type: Textarea (joomla) --> <!-- [Interpretation 558] Metakey Field. Type: Textarea (joomla) -->
<field <field
name="metakey" name="metakey"
type="textarea" type="textarea"
@ -92,7 +98,7 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 484] Metadesc Field. Type: Textarea (joomla) --> <!-- [Interpretation 568] Metadesc Field. Type: Textarea (joomla) -->
<field <field
name="metadesc" name="metadesc"
type="textarea" type="textarea"
@ -101,8 +107,8 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 494] Dynamic Fields. --> <!-- [Interpretation 581] Dynamic Fields. -->
<!-- [Interpretation 763] Name Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Name Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="name" name="name"
@ -118,7 +124,7 @@
message="Error! Please add name here." message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_NAME_HINT" hint="COM_SERMONDISTRIBUTOR_PREACHER_NAME_HINT"
/> />
<!-- [Interpretation 763] Description Field. Type: Editor. (joomla) --> <!-- [Interpretation 866] Description Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="description" name="description"
@ -130,7 +136,7 @@
buttons="false" buttons="false"
filter="safehtml" filter="safehtml"
/> />
<!-- [Interpretation 763] Alias Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Alias Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="alias" name="alias"
@ -139,7 +145,7 @@
filter="STRING" filter="STRING"
hint="COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT" hint="COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT"
/> />
<!-- [Interpretation 763] Email Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Email Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="email" name="email"
@ -154,7 +160,7 @@
message="Error! Please add email address here." message="Error! Please add email address here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_EMAIL_HINT" hint="COM_SERMONDISTRIBUTOR_PREACHER_EMAIL_HINT"
/> />
<!-- [Interpretation 763] Website Field. Type: Url. (joomla) --> <!-- [Interpretation 866] Website Field. Type: Url. (joomla) -->
<field <field
type="url" type="url"
name="website" name="website"
@ -168,7 +174,7 @@
message="Error! Please add website here." message="Error! Please add website here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT" hint="COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT"
/> />
<!-- [Interpretation 763] Icon Field. Type: Media. (joomla) --> <!-- [Interpretation 866] Icon Field. Type: Media. (joomla) -->
<field <field
type="media" type="media"
name="icon" name="icon"
@ -178,11 +184,11 @@
/> />
</fieldset> </fieldset>
<!-- [Interpretation 513] Metadata Fields. --> <!-- [Interpretation 588] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> <fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata" <fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [Interpretation 517] Robots Field. Type: List (joomla) --> <!-- [Interpretation 593] Robots Field. Type: List (joomla) -->
<field name="robots" <field name="robots"
type="list" type="list"
label="JFIELD_METADATA_ROBOTS_LABEL" label="JFIELD_METADATA_ROBOTS_LABEL"
@ -193,13 +199,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option> <option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option> <option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field> </field>
<!-- [Interpretation 528] Author Field. Type: Text (joomla) --> <!-- [Interpretation 605] Author Field. Type: Text (joomla) -->
<field name="author" <field name="author"
type="text" type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC" label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20" size="20"
/> />
<!-- [Interpretation 534] Rights Field. Type: Textarea (joomla) --> <!-- [Interpretation 612] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL" <field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string" description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2" cols="30" rows="2"
@ -207,15 +213,15 @@
</fieldset> </fieldset>
</fields> </fields>
<!-- [Interpretation 9612] Access Control Fields. --> <!-- [Interpretation 9838] Access Control Fields. -->
<fieldset name="accesscontrol"> <fieldset name="accesscontrol">
<!-- [Interpretation 9614] Asset Id Field. Type: Hidden (joomla) --> <!-- [Interpretation 9840] Asset Id Field. Type: Hidden (joomla) -->
<field <field
name="asset_id" name="asset_id"
type="hidden" type="hidden"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 9620] Rules Field. Type: Rules (joomla) --> <!-- [Interpretation 9846] Rules Field. Type: Rules (joomla) -->
<field <field
name="rules" name="rules"
type="rules" type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.js @subpackage series.js

View File

@ -4,34 +4,37 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields" addfieldpath="/administrator/components/com_sermondistributor/models/fields"
> >
<fieldset name="details"> <fieldset name="details">
<!-- [Interpretation 383] Default Fields. --> <!-- [Interpretation 433] Default Fields. -->
<!-- [Interpretation 384] Id Field. Type: Text (joomla) --> <!-- [Interpretation 434] Id Field. Type: Text (joomla) -->
<field <field
name="id" name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL" type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0" description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true" readonly="true"
/> />
<!-- [Interpretation 391] Date Created Field. Type: Calendar (joomla) --> <!-- [Interpretation 448] Date Created Field. Type: Calendar (joomla) -->
<field <field
name="created" name="created"
type="calendar" type="calendar"
label="COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_LABEL" label="COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_LABEL"
description="COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_DESC" description="COM_SERMONDISTRIBUTOR_SERIES_CREATED_DATE_DESC"
size="22" size="22"
format="%Y-%m-%d %H:%M:%S" format="%Y-%m-%d %H:%M:%S"
filter="user_utc" filter="user_utc"
/> />
<!-- [Interpretation 402] User Created Field. Type: User (joomla) --> <!-- [Interpretation 463] User Created Field. Type: User (joomla) -->
<field <field
name="created_by" name="created_by"
type="user" type="user"
label="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_DESC" description="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_DESC"
/> />
<!-- [Interpretation 410] Published Field. Type: List (joomla) --> <!-- [Interpretation 475] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS" <field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state" description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" > filter="intval" size="1" default="1" >
<option value="1"> <option value="1">
JPUBLISHED</option> JPUBLISHED</option>
@ -42,26 +45,28 @@
<option value="-2"> <option value="-2">
JTRASHED</option> JTRASHED</option>
</field> </field>
<!-- [Interpretation 425] Date Modified Field. Type: Calendar (joomla) --> <!-- [Interpretation 493] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly" <field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC" label="COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_DATE_LABEL" description="COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [Interpretation 429] User Modified Field. Type: User (joomla) --> <!-- [Interpretation 501] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user" <field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERIES_MODIFIED_BY_DESC"
class="readonly" class="readonly"
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 439] Access Field. Type: Accesslevel (joomla) --> <!-- [Interpretation 513] Access Field. Type: Accesslevel (joomla) -->
<field name="access" <field name="access"
type="accesslevel" type="accesslevel"
label="JFIELD_ACCESS_LABEL" label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC" description="JFIELD_ACCESS_DESC"
default="1" default="1"
required="false" required="false"
/> />
<!-- [Interpretation 449] Ordering Field. Type: Numbers (joomla) --> <!-- [Interpretation 526] Ordering Field. Type: Numbers (joomla) -->
<field <field
name="ordering" name="ordering"
type="number" type="number"
@ -70,9 +75,10 @@
description="" description=""
default="0" default="0"
size="6" size="6"
required="false" required="false"
/> />
<!-- [Interpretation 461] Version Field. Type: Text (joomla) --> <!-- [Interpretation 542] Version Field. Type: Text (joomla) -->
<field <field
name="version" name="version"
type="text" type="text"
@ -83,7 +89,7 @@
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 475] Metakey Field. Type: Textarea (joomla) --> <!-- [Interpretation 558] Metakey Field. Type: Textarea (joomla) -->
<field <field
name="metakey" name="metakey"
type="textarea" type="textarea"
@ -92,7 +98,7 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 484] Metadesc Field. Type: Textarea (joomla) --> <!-- [Interpretation 568] Metadesc Field. Type: Textarea (joomla) -->
<field <field
name="metadesc" name="metadesc"
type="textarea" type="textarea"
@ -101,8 +107,8 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 494] Dynamic Fields. --> <!-- [Interpretation 581] Dynamic Fields. -->
<!-- [Interpretation 763] Name Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Name Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="name" name="name"
@ -118,7 +124,7 @@
message="Error! Please add name here." message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_SERIES_NAME_HINT" hint="COM_SERMONDISTRIBUTOR_SERIES_NAME_HINT"
/> />
<!-- [Interpretation 763] Description Field. Type: Editor. (joomla) --> <!-- [Interpretation 866] Description Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="description" name="description"
@ -130,7 +136,7 @@
buttons="false" buttons="false"
filter="safehtml" filter="safehtml"
/> />
<!-- [Interpretation 763] Alias Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Alias Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="alias" name="alias"
@ -139,7 +145,7 @@
filter="STRING" filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT" hint="COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT"
/> />
<!-- [Interpretation 763] Icon Field. Type: Media. (joomla) --> <!-- [Interpretation 866] Icon Field. Type: Media. (joomla) -->
<field <field
type="media" type="media"
name="icon" name="icon"
@ -147,7 +153,7 @@
description="COM_SERMONDISTRIBUTOR_SERIES_ICON_DESCRIPTION" description="COM_SERMONDISTRIBUTOR_SERIES_ICON_DESCRIPTION"
directory="" directory=""
/> />
<!-- [Interpretation 763] Scripture Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Scripture Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="scripture" name="scripture"
@ -165,11 +171,11 @@
/> />
</fieldset> </fieldset>
<!-- [Interpretation 513] Metadata Fields. --> <!-- [Interpretation 588] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> <fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata" <fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [Interpretation 517] Robots Field. Type: List (joomla) --> <!-- [Interpretation 593] Robots Field. Type: List (joomla) -->
<field name="robots" <field name="robots"
type="list" type="list"
label="JFIELD_METADATA_ROBOTS_LABEL" label="JFIELD_METADATA_ROBOTS_LABEL"
@ -180,13 +186,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option> <option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option> <option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field> </field>
<!-- [Interpretation 528] Author Field. Type: Text (joomla) --> <!-- [Interpretation 605] Author Field. Type: Text (joomla) -->
<field name="author" <field name="author"
type="text" type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC" label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20" size="20"
/> />
<!-- [Interpretation 534] Rights Field. Type: Textarea (joomla) --> <!-- [Interpretation 612] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL" <field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string" description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2" cols="30" rows="2"
@ -194,15 +200,15 @@
</fieldset> </fieldset>
</fields> </fields>
<!-- [Interpretation 9612] Access Control Fields. --> <!-- [Interpretation 9838] Access Control Fields. -->
<fieldset name="accesscontrol"> <fieldset name="accesscontrol">
<!-- [Interpretation 9614] Asset Id Field. Type: Hidden (joomla) --> <!-- [Interpretation 9840] Asset Id Field. Type: Hidden (joomla) -->
<field <field
name="asset_id" name="asset_id"
type="hidden" type="hidden"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 9620] Rules Field. Type: Rules (joomla) --> <!-- [Interpretation 9846] Rules Field. Type: Rules (joomla) -->
<field <field
name="rules" name="rules"
type="rules" type="rules"

View File

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

View File

@ -4,34 +4,37 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields" addfieldpath="/administrator/components/com_sermondistributor/models/fields"
> >
<fieldset name="details"> <fieldset name="details">
<!-- [Interpretation 383] Default Fields. --> <!-- [Interpretation 433] Default Fields. -->
<!-- [Interpretation 384] Id Field. Type: Text (joomla) --> <!-- [Interpretation 434] Id Field. Type: Text (joomla) -->
<field <field
name="id" name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL" type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0" description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true" readonly="true"
/> />
<!-- [Interpretation 391] Date Created Field. Type: Calendar (joomla) --> <!-- [Interpretation 448] Date Created Field. Type: Calendar (joomla) -->
<field <field
name="created" name="created"
type="calendar" type="calendar"
label="COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_LABEL" label="COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_LABEL"
description="COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_DESC" description="COM_SERMONDISTRIBUTOR_SERMON_CREATED_DATE_DESC"
size="22" size="22"
format="%Y-%m-%d %H:%M:%S" format="%Y-%m-%d %H:%M:%S"
filter="user_utc" filter="user_utc"
/> />
<!-- [Interpretation 402] User Created Field. Type: User (joomla) --> <!-- [Interpretation 463] User Created Field. Type: User (joomla) -->
<field <field
name="created_by" name="created_by"
type="user" type="user"
label="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_DESC" description="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_DESC"
/> />
<!-- [Interpretation 410] Published Field. Type: List (joomla) --> <!-- [Interpretation 475] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS" <field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state" description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" > filter="intval" size="1" default="1" >
<option value="1"> <option value="1">
JPUBLISHED</option> JPUBLISHED</option>
@ -42,26 +45,28 @@
<option value="-2"> <option value="-2">
JTRASHED</option> JTRASHED</option>
</field> </field>
<!-- [Interpretation 425] Date Modified Field. Type: Calendar (joomla) --> <!-- [Interpretation 493] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly" <field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC" label="COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_DATE_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [Interpretation 429] User Modified Field. Type: User (joomla) --> <!-- [Interpretation 501] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user" <field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_BY_DESC"
class="readonly" class="readonly"
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 439] Access Field. Type: Accesslevel (joomla) --> <!-- [Interpretation 513] Access Field. Type: Accesslevel (joomla) -->
<field name="access" <field name="access"
type="accesslevel" type="accesslevel"
label="JFIELD_ACCESS_LABEL" label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC" description="JFIELD_ACCESS_DESC"
default="1" default="1"
required="false" required="false"
/> />
<!-- [Interpretation 449] Ordering Field. Type: Numbers (joomla) --> <!-- [Interpretation 526] Ordering Field. Type: Numbers (joomla) -->
<field <field
name="ordering" name="ordering"
type="number" type="number"
@ -70,9 +75,10 @@
description="" description=""
default="0" default="0"
size="6" size="6"
required="false" required="false"
/> />
<!-- [Interpretation 461] Version Field. Type: Text (joomla) --> <!-- [Interpretation 542] Version Field. Type: Text (joomla) -->
<field <field
name="version" name="version"
type="text" type="text"
@ -83,7 +89,7 @@
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 475] Metakey Field. Type: Textarea (joomla) --> <!-- [Interpretation 558] Metakey Field. Type: Textarea (joomla) -->
<field <field
name="metakey" name="metakey"
type="textarea" type="textarea"
@ -92,7 +98,7 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 484] Metadesc Field. Type: Textarea (joomla) --> <!-- [Interpretation 568] Metadesc Field. Type: Textarea (joomla) -->
<field <field
name="metadesc" name="metadesc"
type="textarea" type="textarea"
@ -101,8 +107,8 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 494] Dynamic Fields. --> <!-- [Interpretation 581] Dynamic Fields. -->
<!-- [Interpretation 763] Name Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Name Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="name" name="name"
@ -118,7 +124,7 @@
message="Error! Please add name here." message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT" hint="COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT"
/> />
<!-- [Interpretation 884] Preacher Field. Type: Preachers. (custom) --> <!-- [Interpretation 987] Preacher Field. Type: Preachers. (custom) -->
<field <field
type="preachers" type="preachers"
name="preacher" name="preacher"
@ -129,7 +135,7 @@
default="0" default="0"
button="true" button="true"
/> />
<!-- [Interpretation 884] Series Field. Type: Series. (custom) --> <!-- [Interpretation 987] Series Field. Type: Series. (custom) -->
<field <field
type="series" type="series"
name="series" name="series"
@ -140,7 +146,7 @@
default="0" default="0"
button="true" button="true"
/> />
<!-- [Interpretation 763] Short_description Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Short_description Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="short_description" name="short_description"
@ -154,7 +160,7 @@
message="Error! Please add some short description here." message="Error! Please add some short description here."
hint="COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_HINT" hint="COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_HINT"
/> />
<!-- [Interpretation 763] Catid Field. Type: Category. (joomla) --> <!-- [Interpretation 866] Catid Field. Type: Category. (joomla) -->
<field <field
type="category" type="category"
name="catid" name="catid"
@ -164,7 +170,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION" description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
class="inputbox" class="inputbox"
/> />
<!-- [Interpretation 678] Link_type Field. Type: Radio. (joomla) --> <!-- [Interpretation 781] Link_type Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="link_type" name="link_type"
@ -173,13 +179,13 @@
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="1" default="1"
required="true"> required="true">
<!-- [Interpretation 749] Option Set. --> <!-- [Interpretation 852] Option Set. -->
<option value="1"> <option value="1">
COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED</option> COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED</option>
<option value="2"> <option value="2">
COM_SERMONDISTRIBUTOR_SERMON_DIRECT</option> COM_SERMONDISTRIBUTOR_SERMON_DIRECT</option>
</field> </field>
<!-- [Interpretation 678] Source Field. Type: List. (joomla) --> <!-- [Interpretation 781] Source Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
name="source" name="source"
@ -189,7 +195,7 @@
multiple="false" multiple="false"
filter="INT" filter="INT"
required="true"> required="true">
<!-- [Interpretation 749] Option Set. --> <!-- [Interpretation 852] Option Set. -->
<option value=""> <option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE</option> COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE</option>
<option value="1"> <option value="1">
@ -199,7 +205,7 @@
<option value="3"> <option value="3">
COM_SERMONDISTRIBUTOR_SERMON_URL</option> COM_SERMONDISTRIBUTOR_SERMON_URL</option>
</field> </field>
<!-- [Interpretation 763] Icon Field. Type: Media. (joomla) --> <!-- [Interpretation 866] Icon Field. Type: Media. (joomla) -->
<field <field
type="media" type="media"
name="icon" name="icon"
@ -207,7 +213,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION" description="COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION"
directory="" directory=""
/> />
<!-- [Interpretation 763] Tags Field. Type: Tag. (joomla) --> <!-- [Interpretation 866] Tags Field. Type: Tag. (joomla) -->
<field <field
type="tag" type="tag"
name="tags" name="tags"
@ -218,7 +224,7 @@
published="true" published="true"
multiple="true" multiple="true"
/> />
<!-- [Interpretation 884] Local_files Field. Type: Localfiles. (custom) --> <!-- [Interpretation 987] Local_files Field. Type: Localfiles. (custom) -->
<field <field
type="localfiles" type="localfiles"
name="local_files" name="local_files"
@ -230,7 +236,7 @@
required="true" required="true"
button="false" button="false"
/> />
<!-- [Interpretation 763] Description Field. Type: Editor. (joomla) --> <!-- [Interpretation 866] Description Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="description" name="description"
@ -242,9 +248,9 @@
buttons="false" buttons="false"
filter="safehtml" filter="safehtml"
/> />
<!-- [Interpretation 777] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) --> <!-- [Interpretation 880] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_auto_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_auto_dropbox" /> <field type="note" name="note_auto_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_auto_dropbox" />
<!-- [Interpretation 763] Alias Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Alias Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="alias" name="alias"
@ -253,19 +259,19 @@
filter="STRING" filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT" hint="COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT"
/> />
<!-- [Interpretation 763] Not_required Field. Type: Hidden. (joomla) --> <!-- [Interpretation 866] Not_required Field. Type: Hidden. (joomla) -->
<field <field
type="hidden" type="hidden"
name="not_required" name="not_required"
default="[]" default="[]"
/> />
<!-- [Interpretation 777] Note_link_directed Field. Type: Note. A None Database Field. (joomla) --> <!-- [Interpretation 880] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_link_directed" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_directed" close="true" /> <field type="note" name="note_link_directed" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_directed" close="true" />
<!-- [Interpretation 777] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) --> <!-- [Interpretation 880] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_manual_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_manual_dropbox" /> <field type="note" name="note_manual_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_manual_dropbox" />
<!-- [Interpretation 777] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) --> <!-- [Interpretation 880] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_link_encrypted" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_encrypted" close="true" /> <field type="note" name="note_link_encrypted" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_encrypted" close="true" />
<!-- [Interpretation 884] Manual_files Field. Type: Dropboxfiles. (custom) --> <!-- [Interpretation 987] Manual_files Field. Type: Dropboxfiles. (custom) -->
<field <field
type="dropboxfiles" type="dropboxfiles"
name="manual_files" name="manual_files"
@ -277,7 +283,7 @@
required="true" required="true"
button="false" button="false"
/> />
<!-- [Interpretation 763] Scripture Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Scripture Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="scripture" name="scripture"
@ -293,7 +299,7 @@
message="Error! Please add some scripture reference here." message="Error! Please add some scripture reference here."
hint="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_HINT" hint="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_HINT"
/> />
<!-- [Interpretation 763] Url Field. Type: Url. (joomla) --> <!-- [Interpretation 866] Url Field. Type: Url. (joomla) -->
<field <field
type="url" type="url"
name="url" name="url"
@ -308,7 +314,7 @@
message="Error! Please add sermon url here." message="Error! Please add sermon url here."
hint="COM_SERMONDISTRIBUTOR_SERMON_URL_HINT" hint="COM_SERMONDISTRIBUTOR_SERMON_URL_HINT"
/> />
<!-- [Interpretation 678] Build Field. Type: Radio. (joomla) --> <!-- [Interpretation 781] Build Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="build" name="build"
@ -317,13 +323,13 @@
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="1" default="1"
required="true"> required="true">
<!-- [Interpretation 749] Option Set. --> <!-- [Interpretation 852] Option Set. -->
<option value="1"> <option value="1">
COM_SERMONDISTRIBUTOR_SERMON_MANUAL</option> COM_SERMONDISTRIBUTOR_SERMON_MANUAL</option>
<option value="2"> <option value="2">
COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC</option> COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC</option>
</field> </field>
<!-- [Interpretation 763] Auto_sermons Field. Type: Hidden. (joomla) --> <!-- [Interpretation 866] Auto_sermons Field. Type: Hidden. (joomla) -->
<field <field
type="hidden" type="hidden"
name="auto_sermons" name="auto_sermons"
@ -331,11 +337,11 @@
/> />
</fieldset> </fieldset>
<!-- [Interpretation 513] Metadata Fields. --> <!-- [Interpretation 588] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> <fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata" <fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [Interpretation 517] Robots Field. Type: List (joomla) --> <!-- [Interpretation 593] Robots Field. Type: List (joomla) -->
<field name="robots" <field name="robots"
type="list" type="list"
label="JFIELD_METADATA_ROBOTS_LABEL" label="JFIELD_METADATA_ROBOTS_LABEL"
@ -346,13 +352,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option> <option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option> <option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field> </field>
<!-- [Interpretation 528] Author Field. Type: Text (joomla) --> <!-- [Interpretation 605] Author Field. Type: Text (joomla) -->
<field name="author" <field name="author"
type="text" type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC" label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20" size="20"
/> />
<!-- [Interpretation 534] Rights Field. Type: Textarea (joomla) --> <!-- [Interpretation 612] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL" <field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string" description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2" cols="30" rows="2"
@ -360,15 +366,15 @@
</fieldset> </fieldset>
</fields> </fields>
<!-- [Interpretation 9612] Access Control Fields. --> <!-- [Interpretation 9838] Access Control Fields. -->
<fieldset name="accesscontrol"> <fieldset name="accesscontrol">
<!-- [Interpretation 9614] Asset Id Field. Type: Hidden (joomla) --> <!-- [Interpretation 9840] Asset Id Field. Type: Hidden (joomla) -->
<field <field
name="asset_id" name="asset_id"
type="hidden" type="hidden"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 9620] Rules Field. Type: Rules (joomla) --> <!-- [Interpretation 9846] Rules Field. Type: Rules (joomla) -->
<field <field
name="rules" name="rules"
type="rules" type="rules"

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistic.js @subpackage statistic.js

View File

@ -4,34 +4,37 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields" addfieldpath="/administrator/components/com_sermondistributor/models/fields"
> >
<fieldset name="details"> <fieldset name="details">
<!-- [Interpretation 383] Default Fields. --> <!-- [Interpretation 433] Default Fields. -->
<!-- [Interpretation 384] Id Field. Type: Text (joomla) --> <!-- [Interpretation 434] Id Field. Type: Text (joomla) -->
<field <field
name="id" name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL" type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0" description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true" readonly="true"
/> />
<!-- [Interpretation 391] Date Created Field. Type: Calendar (joomla) --> <!-- [Interpretation 448] Date Created Field. Type: Calendar (joomla) -->
<field <field
name="created" name="created"
type="calendar" type="calendar"
label="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_LABEL" label="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_LABEL"
description="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_DESC" description="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_DATE_DESC"
size="22" size="22"
format="%Y-%m-%d %H:%M:%S" format="%Y-%m-%d %H:%M:%S"
filter="user_utc" filter="user_utc"
/> />
<!-- [Interpretation 402] User Created Field. Type: User (joomla) --> <!-- [Interpretation 463] User Created Field. Type: User (joomla) -->
<field <field
name="created_by" name="created_by"
type="user" type="user"
label="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_DESC" description="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_DESC"
/> />
<!-- [Interpretation 410] Published Field. Type: List (joomla) --> <!-- [Interpretation 475] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS" <field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state" description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" > filter="intval" size="1" default="1" >
<option value="1"> <option value="1">
JPUBLISHED</option> JPUBLISHED</option>
@ -42,26 +45,28 @@
<option value="-2"> <option value="-2">
JTRASHED</option> JTRASHED</option>
</field> </field>
<!-- [Interpretation 425] Date Modified Field. Type: Calendar (joomla) --> <!-- [Interpretation 493] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly" <field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC" label="COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_DATE_LABEL" description="COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" /> size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [Interpretation 429] User Modified Field. Type: User (joomla) --> <!-- [Interpretation 501] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user" <field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" label="COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_STATISTIC_MODIFIED_BY_DESC"
class="readonly" class="readonly"
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 439] Access Field. Type: Accesslevel (joomla) --> <!-- [Interpretation 513] Access Field. Type: Accesslevel (joomla) -->
<field name="access" <field name="access"
type="accesslevel" type="accesslevel"
label="JFIELD_ACCESS_LABEL" label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC" description="JFIELD_ACCESS_DESC"
default="1" default="1"
required="false" required="false"
/> />
<!-- [Interpretation 449] Ordering Field. Type: Numbers (joomla) --> <!-- [Interpretation 526] Ordering Field. Type: Numbers (joomla) -->
<field <field
name="ordering" name="ordering"
type="number" type="number"
@ -70,9 +75,10 @@
description="" description=""
default="0" default="0"
size="6" size="6"
required="false" required="false"
/> />
<!-- [Interpretation 461] Version Field. Type: Text (joomla) --> <!-- [Interpretation 542] Version Field. Type: Text (joomla) -->
<field <field
name="version" name="version"
type="text" type="text"
@ -83,7 +89,7 @@
readonly="true" readonly="true"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 475] Metakey Field. Type: Textarea (joomla) --> <!-- [Interpretation 558] Metakey Field. Type: Textarea (joomla) -->
<field <field
name="metakey" name="metakey"
type="textarea" type="textarea"
@ -92,7 +98,7 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 484] Metadesc Field. Type: Textarea (joomla) --> <!-- [Interpretation 568] Metadesc Field. Type: Textarea (joomla) -->
<field <field
name="metadesc" name="metadesc"
type="textarea" type="textarea"
@ -101,8 +107,8 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- [Interpretation 494] Dynamic Fields. --> <!-- [Interpretation 581] Dynamic Fields. -->
<!-- [Interpretation 763] Filename Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Filename Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="filename" name="filename"
@ -116,7 +122,7 @@
message="Error! Please add file name here." message="Error! Please add file name here."
hint="COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_HINT" hint="COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_HINT"
/> />
<!-- [Interpretation 884] Sermon Field. Type: Sermon. (custom) --> <!-- [Interpretation 987] Sermon Field. Type: Sermon. (custom) -->
<field <field
type="sermon" type="sermon"
name="sermon" name="sermon"
@ -127,7 +133,7 @@
required="true" required="true"
button="true" button="true"
/> />
<!-- [Interpretation 884] Preacher Field. Type: Preachers. (custom) --> <!-- [Interpretation 987] Preacher Field. Type: Preachers. (custom) -->
<field <field
type="preachers" type="preachers"
name="preacher" name="preacher"
@ -138,7 +144,7 @@
default="0" default="0"
button="true" button="true"
/> />
<!-- [Interpretation 884] Series Field. Type: Series. (custom) --> <!-- [Interpretation 987] Series Field. Type: Series. (custom) -->
<field <field
type="series" type="series"
name="series" name="series"
@ -149,7 +155,7 @@
default="0" default="0"
button="true" button="true"
/> />
<!-- [Interpretation 763] Counter Field. Type: Text. (joomla) --> <!-- [Interpretation 866] Counter Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
name="counter" name="counter"
@ -165,11 +171,11 @@
/> />
</fieldset> </fieldset>
<!-- [Interpretation 513] Metadata Fields. --> <!-- [Interpretation 588] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> <fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata" <fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [Interpretation 517] Robots Field. Type: List (joomla) --> <!-- [Interpretation 593] Robots Field. Type: List (joomla) -->
<field name="robots" <field name="robots"
type="list" type="list"
label="JFIELD_METADATA_ROBOTS_LABEL" label="JFIELD_METADATA_ROBOTS_LABEL"
@ -180,13 +186,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option> <option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option> <option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field> </field>
<!-- [Interpretation 528] Author Field. Type: Text (joomla) --> <!-- [Interpretation 605] Author Field. Type: Text (joomla) -->
<field name="author" <field name="author"
type="text" type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC" label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20" size="20"
/> />
<!-- [Interpretation 534] Rights Field. Type: Textarea (joomla) --> <!-- [Interpretation 612] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL" <field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string" description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2" cols="30" rows="2"
@ -194,15 +200,15 @@
</fieldset> </fieldset>
</fields> </fields>
<!-- [Interpretation 9612] Access Control Fields. --> <!-- [Interpretation 9838] Access Control Fields. -->
<fieldset name="accesscontrol"> <fieldset name="accesscontrol">
<!-- [Interpretation 9614] Asset Id Field. Type: Hidden (joomla) --> <!-- [Interpretation 9840] Asset Id Field. Type: Hidden (joomla) -->
<field <field
name="asset_id" name="asset_id"
type="hidden" type="hidden"
filter="unset" filter="unset"
/> />
<!-- [Interpretation 9620] Rules Field. Type: Rules (joomla) --> <!-- [Interpretation 9846] Rules Field. Type: Rules (joomla) -->
<field <field
name="rules" name="rules"
type="rules" type="rules"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.php @subpackage help_document.php
@ -122,7 +122,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
* @since 1.6 * @since 1.6
*/ */
public function getForm($data = array(), $loadData = true) public function getForm($data = array(), $loadData = true)
{ // [Interpretation 9102] Get the form. { // [Interpretation 9328] Get the form.
$form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData)); $form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) if (empty($form))
@ -132,12 +132,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 9187] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. // [Interpretation 9413] 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')) if ($jinput->get('a_id'))
{ {
$id = $jinput->get('a_id', 0, 'INT'); $id = $jinput->get('a_id', 0, 'INT');
} }
// [Interpretation 9192] The back end uses id so we use that the rest of the time and set it to 0 by default. // [Interpretation 9418] The back end uses id so we use that the rest of the time and set it to 0 by default.
else else
{ {
$id = $jinput->get('id', 0, 'INT'); $id = $jinput->get('id', 0, 'INT');
@ -145,52 +145,52 @@ class SermondistributorModelHelp_document extends JModelAdmin
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9198] Check for existing item. // [Interpretation 9424] Check for existing item.
// [Interpretation 9199] Modify the form based on Edit State access controls. // [Interpretation 9425] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $id)) 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'))) || ($id == 0 && !$user->authorise('help_document.edit.state', 'com_sermondistributor')))
{ {
// [Interpretation 9212] Disable fields for display. // [Interpretation 9438] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true'); $form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true'); $form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 9215] Disable fields while saving. // [Interpretation 9441] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset'); $form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset'); $form->setFieldAttribute('published', 'filter', 'unset');
} }
// [Interpretation 9220] If this is a new item insure the greated by is set. // [Interpretation 9446] If this is a new item insure the greated by is set.
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9223] Set the created_by to this user // [Interpretation 9449] Set the created_by to this user
$form->setValue('created_by', null, $user->id); $form->setValue('created_by', null, $user->id);
} }
// [Interpretation 9226] Modify the form based on Edit Creaded By access controls. // [Interpretation 9452] Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor')) if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
{ {
// [Interpretation 9238] Disable fields for display. // [Interpretation 9464] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true'); $form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 9240] Disable fields for display. // [Interpretation 9466] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true'); $form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 9242] Disable fields while saving. // [Interpretation 9468] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset'); $form->setFieldAttribute('created_by', 'filter', 'unset');
} }
// [Interpretation 9245] Modify the form based on Edit Creaded Date access controls. // [Interpretation 9471] Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_sermondistributor')) if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
{ {
// [Interpretation 9257] Disable fields for display. // [Interpretation 9483] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true'); $form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 9259] Disable fields while saving. // [Interpretation 9485] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// [Interpretation 9292] Only load these values if no id is found // [Interpretation 9518] Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9295] Set redirected field name // [Interpretation 9521] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING'); $redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 9297] Set redirected field value // [Interpretation 9523] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT'); $redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField) if (0 != $redirectedValue && $redirectedField)
{ {
// [Interpretation 9301] Now set the local-redirected field default value // [Interpretation 9527] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue); $form->setValue($redirectedField, null, $redirectedValue);
} }
} }
@ -227,7 +227,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9423] The record has been set. Check the record permissions. // [Interpretation 9649] The record has been set. Check the record permissions.
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id); return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
} }
return false; return false;
@ -249,14 +249,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
if ($recordId) if ($recordId)
{ {
// [Interpretation 9510] The record has been set. Check the record permissions. // [Interpretation 9736] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $recordId); $permission = $user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
return false; return false;
} }
} }
// [Interpretation 9527] In the absense of better information, revert to the component permissions. // [Interpretation 9753] In the absense of better information, revert to the component permissions.
return $user->authorise('help_document.edit.state', 'com_sermondistributor'); 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') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9335] Check specific edit permission then general edit permission. // [Interpretation 9561] Check specific edit permission then general edit permission.
$user = JFactory::getUser(); $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'); 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) public function validate($form, $data, $group = null)
{ {
// [Interpretation 8301] check if the not_required field is set // [Interpretation 8522] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required'])) if (SermondistributorHelper::checkString($data['not_required']))
{ {
$requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields); $requiredFields = array_unique($requiredFields);
// [Interpretation 8306] now change the required field attributes value // [Interpretation 8527] now change the required field attributes value
foreach ($requiredFields as $requiredField) foreach ($requiredFields as $requiredField)
{ {
// [Interpretation 8309] make sure there is a string value // [Interpretation 8530] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField)) if (SermondistributorHelper::checkString($requiredField))
{ {
// [Interpretation 8312] change to false // [Interpretation 8533] change to false
$form->setFieldAttribute($requiredField, 'required', 'false'); $form->setFieldAttribute($requiredField, 'required', 'false');
// [Interpretation 8314] also clear the data set // [Interpretation 8535] also clear the data set
$data[$requiredField] = ''; $data[$requiredField] = '';
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_documents.php @subpackage help_documents.php
@ -113,16 +113,16 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// [Interpretation 10096] check in items // [Interpretation 10327] check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
$items = parent::getItems(); $items = parent::getItems();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -133,7 +133,7 @@ class SermondistributorModelHelp_documents extends JModelList
continue; continue;
} }
// [Interpretation 10242] decode groups // [Interpretation 10473] decode groups
$groupsArray = json_decode($item->groups, true); $groupsArray = json_decode($item->groups, true);
if (SermondistributorHelper::checkArray($groupsArray)) if (SermondistributorHelper::checkArray($groupsArray))
{ {
@ -156,14 +156,14 @@ class SermondistributorModelHelp_documents extends JModelList
} }
} }
// [Interpretation 10443] set selection value to a translatable value // [Interpretation 10674] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// [Interpretation 10450] convert type // [Interpretation 10681] convert type
$item->type = $this->selectionTranslation($item->type, 'type'); $item->type = $this->selectionTranslation($item->type, 'type');
// [Interpretation 10450] convert location // [Interpretation 10681] convert location
$item->location = $this->selectionTranslation($item->location, 'location'); $item->location = $this->selectionTranslation($item->location, 'location');
} }
} }
@ -180,7 +180,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
public function selectionTranslation($value,$name) public function selectionTranslation($value,$name)
{ {
// [Interpretation 10476] Array of type language strings // [Interpretation 10707] Array of type language strings
if ($name == 'type') if ($name == 'type')
{ {
$typeArray = array( $typeArray = array(
@ -189,20 +189,20 @@ class SermondistributorModelHelp_documents extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT', 2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL' 3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value])) if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
{ {
return $typeArray[$value]; return $typeArray[$value];
} }
} }
// [Interpretation 10476] Array of location language strings // [Interpretation 10707] Array of location language strings
if ($name == 'location') if ($name == 'location')
{ {
$locationArray = array( $locationArray = array(
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN', 1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE' 2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value])) if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
{ {
return $locationArray[$value]; return $locationArray[$value];
@ -218,19 +218,19 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
protected function getListQuery() protected function getListQuery()
{ {
// [Interpretation 6981] Get the user object. // [Interpretation 7194] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6983] Create a new query object. // [Interpretation 7196] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6986] Select some fields // [Interpretation 7199] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6993] From the sermondistributor_item table // [Interpretation 7206] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a')); $query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
// [Interpretation 7007] Filter by published state // [Interpretation 7220] Filter by published state
$published = $this->getState('filter.published'); $published = $this->getState('filter.published');
if (is_numeric($published)) if (is_numeric($published))
{ {
@ -241,21 +241,21 @@ class SermondistributorModelHelp_documents extends JModelList
$query->where('(a.published = 0 OR a.published = 1)'); $query->where('(a.published = 0 OR a.published = 1)');
} }
// [Interpretation 7019] Join over the asset groups. // [Interpretation 7232] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 7022] Filter by access level. // [Interpretation 7235] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 7027] Implement View Level Access // [Interpretation 7240] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 7104] Filter by search. // [Interpretation 7317] Filter by search.
$search = $this->getState('filter.search'); $search = $this->getState('filter.search');
if (!empty($search)) if (!empty($search))
{ {
@ -270,28 +270,28 @@ class SermondistributorModelHelp_documents extends JModelList
} }
} }
// [Interpretation 7287] Filter by Type. // [Interpretation 7510] Filter by Type.
if ($type = $this->getState('filter.type')) if ($type = $this->getState('filter.type'))
{ {
$query->where('a.type = ' . $db->quote($db->escape($type, true))); $query->where('a.type = ' . $db->quote($db->escape($type, true)));
} }
// [Interpretation 7287] Filter by Location. // [Interpretation 7510] Filter by Location.
if ($location = $this->getState('filter.location')) if ($location = $this->getState('filter.location'))
{ {
$query->where('a.location = ' . $db->quote($db->escape($location, true))); $query->where('a.location = ' . $db->quote($db->escape($location, true)));
} }
// [Interpretation 7287] Filter by Admin_view. // [Interpretation 7510] Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view')) if ($admin_view = $this->getState('filter.admin_view'))
{ {
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true))); $query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
} }
// [Interpretation 7287] Filter by Site_view. // [Interpretation 7510] Filter by Site_view.
if ($site_view = $this->getState('filter.site_view')) if ($site_view = $this->getState('filter.site_view'))
{ {
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true))); $query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
} }
// [Interpretation 7063] Add the list ordering clause. // [Interpretation 7276] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc'); $orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '') if ($orderCol != '')
@ -309,42 +309,44 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
public function getExportData($pks) public function getExportData($pks)
{ {
// [Interpretation 6718] setup the query // [Interpretation 6929] setup the query
if (SermondistributorHelper::checkArray($pks)) if (SermondistributorHelper::checkArray($pks))
{ {
// [Interpretation 6721] Get the user object. // [Interpretation 6932] Set a value to know this is exporting method.
$_export = true;
// [Interpretation 6934] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6723] Create a new query object. // [Interpretation 6936] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6726] Select some fields // [Interpretation 6939] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6728] From the sermondistributor_help_document table // [Interpretation 6941] From the sermondistributor_help_document table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a')); $query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')'); $query->where('a.id IN (' . implode(',',$pks) . ')');
// [Interpretation 6738] Implement View Level Access // [Interpretation 6951] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6745] Order the results by ordering // [Interpretation 6958] Order the results by ordering
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6747] Load the items // [Interpretation 6960] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -355,13 +357,13 @@ class SermondistributorModelHelp_documents extends JModelList
continue; continue;
} }
// [Interpretation 10390] unset the values we don't want exported. // [Interpretation 10621] unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
unset($item->checked_out_time); unset($item->checked_out_time);
} }
} }
// [Interpretation 10399] Add headers to items array. // [Interpretation 10630] Add headers to items array.
$headers = $this->getExImPortHeaders(); $headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
@ -380,13 +382,13 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
public function getExImPortHeaders() public function getExImPortHeaders()
{ {
// [Interpretation 6767] Get a db connection. // [Interpretation 6980] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 6769] get the columns // [Interpretation 6982] get the columns
$columns = $db->getTableColumns("#__sermondistributor_help_document"); $columns = $db->getTableColumns("#__sermondistributor_help_document");
if (SermondistributorHelper::checkArray($columns)) if (SermondistributorHelper::checkArray($columns))
{ {
// [Interpretation 6773] remove the headers you don't import/export. // [Interpretation 6986] remove the headers you don't import/export.
unset($columns['asset_id']); unset($columns['asset_id']);
unset($columns['checked_out']); unset($columns['checked_out']);
unset($columns['checked_out_time']); unset($columns['checked_out_time']);
@ -408,7 +410,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
protected function getStoreId($id = '') protected function getStoreId($id = '')
{ {
// [Interpretation 9719] Compile the store id. // [Interpretation 9945] Compile the store id.
$id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published'); $id .= ':' . $this->getState('filter.published');
@ -432,15 +434,15 @@ class SermondistributorModelHelp_documents extends JModelList
*/ */
protected function checkInNow() protected function checkInNow()
{ {
// [Interpretation 10112] Get set check in time // [Interpretation 10343] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time) if ($time)
{ {
// [Interpretation 10117] Get a db connection. // [Interpretation 10348] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 10119] reset query // [Interpretation 10350] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__sermondistributor_help_document')); $query->from($db->quoteName('#__sermondistributor_help_document'));
@ -448,24 +450,24 @@ class SermondistributorModelHelp_documents extends JModelList
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// [Interpretation 10127] Get Yesterdays date // [Interpretation 10358] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 10129] reset query // [Interpretation 10360] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 10131] Fields to update. // [Interpretation 10362] Fields to update.
$fields = array( $fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0' $db->quoteName('checked_out') . '=0'
); );
// [Interpretation 10136] Conditions for which records should be updated. // [Interpretation 10367] Conditions for which records should be updated.
$conditions = array( $conditions = array(
$db->quoteName('checked_out') . '!=0', $db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// [Interpretation 10141] Check table // [Interpretation 10372] Check table
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions); $query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage import.php @subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preacher.php @subpackage preacher.php
@ -113,29 +113,29 @@ class SermondistributorModelPreacher extends JModelAdmin
*/ */
public function getVvvsermons() public function getVvvsermons()
{ {
// [Interpretation 6432] Get the user object. // [Interpretation 6643] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6434] Create a new query object. // [Interpretation 6645] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6437] Select some fields // [Interpretation 6648] Select some fields
$query->select('a.*'); $query->select('a.*');
$query->select($db->quoteName('c.title','category_title')); $query->select($db->quoteName('c.title','category_title'));
// [Interpretation 6444] From the sermondistributor_sermon table // [Interpretation 6655] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a')); $query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')'); $query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [Interpretation 7134] From the sermondistributor_preacher table. // [Interpretation 7347] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [Interpretation 7134] From the sermondistributor_series table. // [Interpretation 7347] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [Interpretation 6460] Filter by preachervvvv global. // [Interpretation 6671] Filter by preachervvvv global.
$preachervvvv = $this->preachervvvv; $preachervvvv = $this->preachervvvv;
if (is_numeric($preachervvvv )) if (is_numeric($preachervvvv ))
{ {
@ -150,36 +150,36 @@ class SermondistributorModelPreacher extends JModelAdmin
$query->where('a.preacher = -5'); $query->where('a.preacher = -5');
} }
// [Interpretation 6477] Join over the asset groups. // [Interpretation 6688] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 6480] Filter by access level. // [Interpretation 6691] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 6485] Implement View Level Access // [Interpretation 6696] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6492] Order the results by ordering // [Interpretation 6703] Order the results by ordering
$query->order('a.published ASC'); $query->order('a.published ASC');
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6494] Load the items // [Interpretation 6705] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -193,14 +193,14 @@ class SermondistributorModelPreacher extends JModelAdmin
} }
} }
// [Interpretation 10443] set selection value to a translatable value // [Interpretation 10674] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// [Interpretation 10450] convert link_type // [Interpretation 10681] convert link_type
$item->link_type = $this->selectionTranslationVvvsermons($item->link_type, 'link_type'); $item->link_type = $this->selectionTranslationVvvsermons($item->link_type, 'link_type');
// [Interpretation 10450] convert source // [Interpretation 10681] convert source
$item->source = $this->selectionTranslationVvvsermons($item->source, 'source'); $item->source = $this->selectionTranslationVvvsermons($item->source, 'source');
} }
} }
@ -217,20 +217,20 @@ class SermondistributorModelPreacher extends JModelAdmin
*/ */
public function selectionTranslationVvvsermons($value,$name) public function selectionTranslationVvvsermons($value,$name)
{ {
// [Interpretation 10476] Array of link_type language strings // [Interpretation 10707] Array of link_type language strings
if ($name == 'link_type') if ($name == 'link_type')
{ {
$link_typeArray = array( $link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED', 1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT' 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value])) if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{ {
return $link_typeArray[$value]; return $link_typeArray[$value];
} }
} }
// [Interpretation 10476] Array of source language strings // [Interpretation 10707] Array of source language strings
if ($name == 'source') if ($name == 'source')
{ {
$sourceArray = array( $sourceArray = array(
@ -239,7 +239,7 @@ class SermondistributorModelPreacher extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX', 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL' 3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value])) if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{ {
return $sourceArray[$value]; return $sourceArray[$value];
@ -259,7 +259,7 @@ class SermondistributorModelPreacher extends JModelAdmin
* @since 1.6 * @since 1.6
*/ */
public function getForm($data = array(), $loadData = true) public function getForm($data = array(), $loadData = true)
{ // [Interpretation 9102] Get the form. { // [Interpretation 9328] Get the form.
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData)); $form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) if (empty($form))
@ -269,12 +269,12 @@ class SermondistributorModelPreacher extends JModelAdmin
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 9187] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. // [Interpretation 9413] 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')) if ($jinput->get('a_id'))
{ {
$id = $jinput->get('a_id', 0, 'INT'); $id = $jinput->get('a_id', 0, 'INT');
} }
// [Interpretation 9192] The back end uses id so we use that the rest of the time and set it to 0 by default. // [Interpretation 9418] The back end uses id so we use that the rest of the time and set it to 0 by default.
else else
{ {
$id = $jinput->get('id', 0, 'INT'); $id = $jinput->get('id', 0, 'INT');
@ -282,54 +282,54 @@ class SermondistributorModelPreacher extends JModelAdmin
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9198] Check for existing item. // [Interpretation 9424] Check for existing item.
// [Interpretation 9199] Modify the form based on Edit State access controls. // [Interpretation 9425] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $id)) if ($id != 0 && (!$user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.state', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('preacher.edit.state', 'com_sermondistributor')))
{ {
// [Interpretation 9212] Disable fields for display. // [Interpretation 9438] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true'); $form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true'); $form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 9215] Disable fields while saving. // [Interpretation 9441] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset'); $form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset'); $form->setFieldAttribute('published', 'filter', 'unset');
} }
// [Interpretation 9220] If this is a new item insure the greated by is set. // [Interpretation 9446] If this is a new item insure the greated by is set.
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9223] Set the created_by to this user // [Interpretation 9449] Set the created_by to this user
$form->setValue('created_by', null, $user->id); $form->setValue('created_by', null, $user->id);
} }
// [Interpretation 9226] Modify the form based on Edit Creaded By access controls. // [Interpretation 9452] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created_by', 'com_sermondistributor.preacher.' . (int) $id)) if ($id != 0 && (!$user->authorise('preacher.edit.created_by', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created_by', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('preacher.edit.created_by', 'com_sermondistributor')))
{ {
// [Interpretation 9238] Disable fields for display. // [Interpretation 9464] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true'); $form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 9240] Disable fields for display. // [Interpretation 9466] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true'); $form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 9242] Disable fields while saving. // [Interpretation 9468] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset'); $form->setFieldAttribute('created_by', 'filter', 'unset');
} }
// [Interpretation 9245] Modify the form based on Edit Creaded Date access controls. // [Interpretation 9471] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created', 'com_sermondistributor.preacher.' . (int) $id)) if ($id != 0 && (!$user->authorise('preacher.edit.created', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('preacher.edit.created', 'com_sermondistributor')))
{ {
// [Interpretation 9257] Disable fields for display. // [Interpretation 9483] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true'); $form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 9259] Disable fields while saving. // [Interpretation 9485] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// [Interpretation 9292] Only load these values if no id is found // [Interpretation 9518] Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9295] Set redirected field name // [Interpretation 9521] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING'); $redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 9297] Set redirected field value // [Interpretation 9523] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT'); $redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField) if (0 != $redirectedValue && $redirectedField)
{ {
// [Interpretation 9301] Now set the local-redirected field default value // [Interpretation 9527] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue); $form->setValue($redirectedField, null, $redirectedValue);
} }
} }
@ -366,7 +366,7 @@ class SermondistributorModelPreacher extends JModelAdmin
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9423] The record has been set. Check the record permissions. // [Interpretation 9649] The record has been set. Check the record permissions.
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id); return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
} }
return false; return false;
@ -388,14 +388,14 @@ class SermondistributorModelPreacher extends JModelAdmin
if ($recordId) if ($recordId)
{ {
// [Interpretation 9510] The record has been set. Check the record permissions. // [Interpretation 9736] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $recordId); $permission = $user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
return false; return false;
} }
} }
// [Interpretation 9527] In the absense of better information, revert to the component permissions. // [Interpretation 9753] In the absense of better information, revert to the component permissions.
return $user->authorise('preacher.edit.state', 'com_sermondistributor'); return $user->authorise('preacher.edit.state', 'com_sermondistributor');
} }
@ -410,7 +410,7 @@ class SermondistributorModelPreacher extends JModelAdmin
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9335] Check specific edit permission then general edit permission. // [Interpretation 9561] Check specific edit permission then general edit permission.
$user = JFactory::getUser(); $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'); return $user->authorise('preacher.edit', 'com_sermondistributor.preacher.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('preacher.edit', 'com_sermondistributor');

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preachers.php @subpackage preachers.php
@ -101,16 +101,16 @@ class SermondistributorModelPreachers extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// [Interpretation 10096] check in items // [Interpretation 10327] check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
$items = parent::getItems(); $items = parent::getItems();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -135,19 +135,19 @@ class SermondistributorModelPreachers extends JModelList
*/ */
protected function getListQuery() protected function getListQuery()
{ {
// [Interpretation 6981] Get the user object. // [Interpretation 7194] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6983] Create a new query object. // [Interpretation 7196] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6986] Select some fields // [Interpretation 7199] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6993] From the sermondistributor_item table // [Interpretation 7206] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a')); $query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
// [Interpretation 7007] Filter by published state // [Interpretation 7220] Filter by published state
$published = $this->getState('filter.published'); $published = $this->getState('filter.published');
if (is_numeric($published)) if (is_numeric($published))
{ {
@ -158,21 +158,21 @@ class SermondistributorModelPreachers extends JModelList
$query->where('(a.published = 0 OR a.published = 1)'); $query->where('(a.published = 0 OR a.published = 1)');
} }
// [Interpretation 7019] Join over the asset groups. // [Interpretation 7232] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 7022] Filter by access level. // [Interpretation 7235] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 7027] Implement View Level Access // [Interpretation 7240] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 7104] Filter by search. // [Interpretation 7317] Filter by search.
$search = $this->getState('filter.search'); $search = $this->getState('filter.search');
if (!empty($search)) if (!empty($search))
{ {
@ -188,7 +188,7 @@ class SermondistributorModelPreachers extends JModelList
} }
// [Interpretation 7063] Add the list ordering clause. // [Interpretation 7276] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc'); $orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '') if ($orderCol != '')
@ -206,42 +206,44 @@ class SermondistributorModelPreachers extends JModelList
*/ */
public function getExportData($pks) public function getExportData($pks)
{ {
// [Interpretation 6718] setup the query // [Interpretation 6929] setup the query
if (SermondistributorHelper::checkArray($pks)) if (SermondistributorHelper::checkArray($pks))
{ {
// [Interpretation 6721] Get the user object. // [Interpretation 6932] Set a value to know this is exporting method.
$_export = true;
// [Interpretation 6934] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6723] Create a new query object. // [Interpretation 6936] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6726] Select some fields // [Interpretation 6939] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6728] From the sermondistributor_preacher table // [Interpretation 6941] From the sermondistributor_preacher table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a')); $query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')'); $query->where('a.id IN (' . implode(',',$pks) . ')');
// [Interpretation 6738] Implement View Level Access // [Interpretation 6951] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6745] Order the results by ordering // [Interpretation 6958] Order the results by ordering
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6747] Load the items // [Interpretation 6960] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -252,13 +254,13 @@ class SermondistributorModelPreachers extends JModelList
continue; continue;
} }
// [Interpretation 10390] unset the values we don't want exported. // [Interpretation 10621] unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
unset($item->checked_out_time); unset($item->checked_out_time);
} }
} }
// [Interpretation 10399] Add headers to items array. // [Interpretation 10630] Add headers to items array.
$headers = $this->getExImPortHeaders(); $headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
@ -277,13 +279,13 @@ class SermondistributorModelPreachers extends JModelList
*/ */
public function getExImPortHeaders() public function getExImPortHeaders()
{ {
// [Interpretation 6767] Get a db connection. // [Interpretation 6980] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 6769] get the columns // [Interpretation 6982] get the columns
$columns = $db->getTableColumns("#__sermondistributor_preacher"); $columns = $db->getTableColumns("#__sermondistributor_preacher");
if (SermondistributorHelper::checkArray($columns)) if (SermondistributorHelper::checkArray($columns))
{ {
// [Interpretation 6773] remove the headers you don't import/export. // [Interpretation 6986] remove the headers you don't import/export.
unset($columns['asset_id']); unset($columns['asset_id']);
unset($columns['checked_out']); unset($columns['checked_out']);
unset($columns['checked_out_time']); unset($columns['checked_out_time']);
@ -305,7 +307,7 @@ class SermondistributorModelPreachers extends JModelList
*/ */
protected function getStoreId($id = '') protected function getStoreId($id = '')
{ {
// [Interpretation 9719] Compile the store id. // [Interpretation 9945] Compile the store id.
$id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published'); $id .= ':' . $this->getState('filter.published');
@ -326,15 +328,15 @@ class SermondistributorModelPreachers extends JModelList
*/ */
protected function checkInNow() protected function checkInNow()
{ {
// [Interpretation 10112] Get set check in time // [Interpretation 10343] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time) if ($time)
{ {
// [Interpretation 10117] Get a db connection. // [Interpretation 10348] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 10119] reset query // [Interpretation 10350] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__sermondistributor_preacher')); $query->from($db->quoteName('#__sermondistributor_preacher'));
@ -342,24 +344,24 @@ class SermondistributorModelPreachers extends JModelList
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// [Interpretation 10127] Get Yesterdays date // [Interpretation 10358] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 10129] reset query // [Interpretation 10360] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 10131] Fields to update. // [Interpretation 10362] Fields to update.
$fields = array( $fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0' $db->quoteName('checked_out') . '=0'
); );
// [Interpretation 10136] Conditions for which records should be updated. // [Interpretation 10367] Conditions for which records should be updated.
$conditions = array( $conditions = array(
$db->quoteName('checked_out') . '!=0', $db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// [Interpretation 10141] Check table // [Interpretation 10372] Check table
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions); $query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.php @subpackage series.php
@ -113,29 +113,29 @@ class SermondistributorModelSeries extends JModelAdmin
*/ */
public function getVwcsermons() public function getVwcsermons()
{ {
// [Interpretation 6432] Get the user object. // [Interpretation 6643] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6434] Create a new query object. // [Interpretation 6645] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6437] Select some fields // [Interpretation 6648] Select some fields
$query->select('a.*'); $query->select('a.*');
$query->select($db->quoteName('c.title','category_title')); $query->select($db->quoteName('c.title','category_title'));
// [Interpretation 6444] From the sermondistributor_sermon table // [Interpretation 6655] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a')); $query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')'); $query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [Interpretation 7134] From the sermondistributor_preacher table. // [Interpretation 7347] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [Interpretation 7134] From the sermondistributor_series table. // [Interpretation 7347] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [Interpretation 6460] Filter by seriesvvvx global. // [Interpretation 6671] Filter by seriesvvvx global.
$seriesvvvx = $this->seriesvvvx; $seriesvvvx = $this->seriesvvvx;
if (is_numeric($seriesvvvx )) if (is_numeric($seriesvvvx ))
{ {
@ -150,36 +150,36 @@ class SermondistributorModelSeries extends JModelAdmin
$query->where('a.series = -5'); $query->where('a.series = -5');
} }
// [Interpretation 6477] Join over the asset groups. // [Interpretation 6688] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 6480] Filter by access level. // [Interpretation 6691] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 6485] Implement View Level Access // [Interpretation 6696] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6492] Order the results by ordering // [Interpretation 6703] Order the results by ordering
$query->order('a.published ASC'); $query->order('a.published ASC');
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6494] Load the items // [Interpretation 6705] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -193,14 +193,14 @@ class SermondistributorModelSeries extends JModelAdmin
} }
} }
// [Interpretation 10443] set selection value to a translatable value // [Interpretation 10674] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// [Interpretation 10450] convert link_type // [Interpretation 10681] convert link_type
$item->link_type = $this->selectionTranslationVwcsermons($item->link_type, 'link_type'); $item->link_type = $this->selectionTranslationVwcsermons($item->link_type, 'link_type');
// [Interpretation 10450] convert source // [Interpretation 10681] convert source
$item->source = $this->selectionTranslationVwcsermons($item->source, 'source'); $item->source = $this->selectionTranslationVwcsermons($item->source, 'source');
} }
} }
@ -217,20 +217,20 @@ class SermondistributorModelSeries extends JModelAdmin
*/ */
public function selectionTranslationVwcsermons($value,$name) public function selectionTranslationVwcsermons($value,$name)
{ {
// [Interpretation 10476] Array of link_type language strings // [Interpretation 10707] Array of link_type language strings
if ($name == 'link_type') if ($name == 'link_type')
{ {
$link_typeArray = array( $link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED', 1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT' 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value])) if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{ {
return $link_typeArray[$value]; return $link_typeArray[$value];
} }
} }
// [Interpretation 10476] Array of source language strings // [Interpretation 10707] Array of source language strings
if ($name == 'source') if ($name == 'source')
{ {
$sourceArray = array( $sourceArray = array(
@ -239,7 +239,7 @@ class SermondistributorModelSeries extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX', 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL' 3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value])) if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{ {
return $sourceArray[$value]; return $sourceArray[$value];
@ -259,7 +259,7 @@ class SermondistributorModelSeries extends JModelAdmin
* @since 1.6 * @since 1.6
*/ */
public function getForm($data = array(), $loadData = true) public function getForm($data = array(), $loadData = true)
{ // [Interpretation 9102] Get the form. { // [Interpretation 9328] Get the form.
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData)); $form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) if (empty($form))
@ -269,12 +269,12 @@ class SermondistributorModelSeries extends JModelAdmin
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 9187] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. // [Interpretation 9413] 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')) if ($jinput->get('a_id'))
{ {
$id = $jinput->get('a_id', 0, 'INT'); $id = $jinput->get('a_id', 0, 'INT');
} }
// [Interpretation 9192] The back end uses id so we use that the rest of the time and set it to 0 by default. // [Interpretation 9418] The back end uses id so we use that the rest of the time and set it to 0 by default.
else else
{ {
$id = $jinput->get('id', 0, 'INT'); $id = $jinput->get('id', 0, 'INT');
@ -282,54 +282,54 @@ class SermondistributorModelSeries extends JModelAdmin
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9198] Check for existing item. // [Interpretation 9424] Check for existing item.
// [Interpretation 9199] Modify the form based on Edit State access controls. // [Interpretation 9425] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $id)) if ($id != 0 && (!$user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.state', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('series.edit.state', 'com_sermondistributor')))
{ {
// [Interpretation 9212] Disable fields for display. // [Interpretation 9438] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true'); $form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true'); $form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 9215] Disable fields while saving. // [Interpretation 9441] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset'); $form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset'); $form->setFieldAttribute('published', 'filter', 'unset');
} }
// [Interpretation 9220] If this is a new item insure the greated by is set. // [Interpretation 9446] If this is a new item insure the greated by is set.
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9223] Set the created_by to this user // [Interpretation 9449] Set the created_by to this user
$form->setValue('created_by', null, $user->id); $form->setValue('created_by', null, $user->id);
} }
// [Interpretation 9226] Modify the form based on Edit Creaded By access controls. // [Interpretation 9452] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('series.edit.created_by', 'com_sermondistributor.series.' . (int) $id)) if ($id != 0 && (!$user->authorise('series.edit.created_by', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created_by', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('series.edit.created_by', 'com_sermondistributor')))
{ {
// [Interpretation 9238] Disable fields for display. // [Interpretation 9464] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true'); $form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 9240] Disable fields for display. // [Interpretation 9466] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true'); $form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 9242] Disable fields while saving. // [Interpretation 9468] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset'); $form->setFieldAttribute('created_by', 'filter', 'unset');
} }
// [Interpretation 9245] Modify the form based on Edit Creaded Date access controls. // [Interpretation 9471] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('series.edit.created', 'com_sermondistributor.series.' . (int) $id)) if ($id != 0 && (!$user->authorise('series.edit.created', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('series.edit.created', 'com_sermondistributor')))
{ {
// [Interpretation 9257] Disable fields for display. // [Interpretation 9483] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true'); $form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 9259] Disable fields while saving. // [Interpretation 9485] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// [Interpretation 9292] Only load these values if no id is found // [Interpretation 9518] Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9295] Set redirected field name // [Interpretation 9521] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING'); $redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 9297] Set redirected field value // [Interpretation 9523] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT'); $redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField) if (0 != $redirectedValue && $redirectedField)
{ {
// [Interpretation 9301] Now set the local-redirected field default value // [Interpretation 9527] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue); $form->setValue($redirectedField, null, $redirectedValue);
} }
} }
@ -366,7 +366,7 @@ class SermondistributorModelSeries extends JModelAdmin
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9423] The record has been set. Check the record permissions. // [Interpretation 9649] The record has been set. Check the record permissions.
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id); return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
} }
return false; return false;
@ -388,14 +388,14 @@ class SermondistributorModelSeries extends JModelAdmin
if ($recordId) if ($recordId)
{ {
// [Interpretation 9510] The record has been set. Check the record permissions. // [Interpretation 9736] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $recordId); $permission = $user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
return false; return false;
} }
} }
// [Interpretation 9527] In the absense of better information, revert to the component permissions. // [Interpretation 9753] In the absense of better information, revert to the component permissions.
return $user->authorise('series.edit.state', 'com_sermondistributor'); return $user->authorise('series.edit.state', 'com_sermondistributor');
} }
@ -410,7 +410,7 @@ class SermondistributorModelSeries extends JModelAdmin
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9335] Check specific edit permission then general edit permission. // [Interpretation 9561] Check specific edit permission then general edit permission.
$user = JFactory::getUser(); $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'); return $user->authorise('series.edit', 'com_sermondistributor.series.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('series.edit', 'com_sermondistributor');

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series_list.php @subpackage series_list.php
@ -97,16 +97,16 @@ class SermondistributorModelSeries_list extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// [Interpretation 10096] check in items // [Interpretation 10327] check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
$items = parent::getItems(); $items = parent::getItems();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -131,19 +131,19 @@ class SermondistributorModelSeries_list extends JModelList
*/ */
protected function getListQuery() protected function getListQuery()
{ {
// [Interpretation 6981] Get the user object. // [Interpretation 7194] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6983] Create a new query object. // [Interpretation 7196] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6986] Select some fields // [Interpretation 7199] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6993] From the sermondistributor_item table // [Interpretation 7206] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_series', 'a')); $query->from($db->quoteName('#__sermondistributor_series', 'a'));
// [Interpretation 7007] Filter by published state // [Interpretation 7220] Filter by published state
$published = $this->getState('filter.published'); $published = $this->getState('filter.published');
if (is_numeric($published)) if (is_numeric($published))
{ {
@ -154,21 +154,21 @@ class SermondistributorModelSeries_list extends JModelList
$query->where('(a.published = 0 OR a.published = 1)'); $query->where('(a.published = 0 OR a.published = 1)');
} }
// [Interpretation 7019] Join over the asset groups. // [Interpretation 7232] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 7022] Filter by access level. // [Interpretation 7235] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 7027] Implement View Level Access // [Interpretation 7240] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 7104] Filter by search. // [Interpretation 7317] Filter by search.
$search = $this->getState('filter.search'); $search = $this->getState('filter.search');
if (!empty($search)) if (!empty($search))
{ {
@ -184,7 +184,7 @@ class SermondistributorModelSeries_list extends JModelList
} }
// [Interpretation 7063] Add the list ordering clause. // [Interpretation 7276] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc'); $orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '') if ($orderCol != '')
@ -202,42 +202,44 @@ class SermondistributorModelSeries_list extends JModelList
*/ */
public function getExportData($pks) public function getExportData($pks)
{ {
// [Interpretation 6718] setup the query // [Interpretation 6929] setup the query
if (SermondistributorHelper::checkArray($pks)) if (SermondistributorHelper::checkArray($pks))
{ {
// [Interpretation 6721] Get the user object. // [Interpretation 6932] Set a value to know this is exporting method.
$_export = true;
// [Interpretation 6934] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6723] Create a new query object. // [Interpretation 6936] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6726] Select some fields // [Interpretation 6939] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6728] From the sermondistributor_series table // [Interpretation 6941] From the sermondistributor_series table
$query->from($db->quoteName('#__sermondistributor_series', 'a')); $query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')'); $query->where('a.id IN (' . implode(',',$pks) . ')');
// [Interpretation 6738] Implement View Level Access // [Interpretation 6951] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6745] Order the results by ordering // [Interpretation 6958] Order the results by ordering
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6747] Load the items // [Interpretation 6960] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -248,13 +250,13 @@ class SermondistributorModelSeries_list extends JModelList
continue; continue;
} }
// [Interpretation 10390] unset the values we don't want exported. // [Interpretation 10621] unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
unset($item->checked_out_time); unset($item->checked_out_time);
} }
} }
// [Interpretation 10399] Add headers to items array. // [Interpretation 10630] Add headers to items array.
$headers = $this->getExImPortHeaders(); $headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
@ -273,13 +275,13 @@ class SermondistributorModelSeries_list extends JModelList
*/ */
public function getExImPortHeaders() public function getExImPortHeaders()
{ {
// [Interpretation 6767] Get a db connection. // [Interpretation 6980] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 6769] get the columns // [Interpretation 6982] get the columns
$columns = $db->getTableColumns("#__sermondistributor_series"); $columns = $db->getTableColumns("#__sermondistributor_series");
if (SermondistributorHelper::checkArray($columns)) if (SermondistributorHelper::checkArray($columns))
{ {
// [Interpretation 6773] remove the headers you don't import/export. // [Interpretation 6986] remove the headers you don't import/export.
unset($columns['asset_id']); unset($columns['asset_id']);
unset($columns['checked_out']); unset($columns['checked_out']);
unset($columns['checked_out_time']); unset($columns['checked_out_time']);
@ -301,7 +303,7 @@ class SermondistributorModelSeries_list extends JModelList
*/ */
protected function getStoreId($id = '') protected function getStoreId($id = '')
{ {
// [Interpretation 9719] Compile the store id. // [Interpretation 9945] Compile the store id.
$id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published'); $id .= ':' . $this->getState('filter.published');
@ -321,15 +323,15 @@ class SermondistributorModelSeries_list extends JModelList
*/ */
protected function checkInNow() protected function checkInNow()
{ {
// [Interpretation 10112] Get set check in time // [Interpretation 10343] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time) if ($time)
{ {
// [Interpretation 10117] Get a db connection. // [Interpretation 10348] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 10119] reset query // [Interpretation 10350] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__sermondistributor_series')); $query->from($db->quoteName('#__sermondistributor_series'));
@ -337,24 +339,24 @@ class SermondistributorModelSeries_list extends JModelList
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// [Interpretation 10127] Get Yesterdays date // [Interpretation 10358] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 10129] reset query // [Interpretation 10360] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 10131] Fields to update. // [Interpretation 10362] Fields to update.
$fields = array( $fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0' $db->quoteName('checked_out') . '=0'
); );
// [Interpretation 10136] Conditions for which records should be updated. // [Interpretation 10367] Conditions for which records should be updated.
$conditions = array( $conditions = array(
$db->quoteName('checked_out') . '!=0', $db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// [Interpretation 10141] Check table // [Interpretation 10372] Check table
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions); $query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermon.php @subpackage sermon.php
@ -125,31 +125,31 @@ class SermondistributorModelSermon extends JModelAdmin
*/ */
public function getVwbstastics() public function getVwbstastics()
{ {
// [Interpretation 6432] Get the user object. // [Interpretation 6643] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6434] Create a new query object. // [Interpretation 6645] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6437] Select some fields // [Interpretation 6648] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6444] From the sermondistributor_statistic table // [Interpretation 6655] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a')); $query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [Interpretation 7134] From the sermondistributor_sermon table. // [Interpretation 7347] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
// [Interpretation 7134] From the sermondistributor_preacher table. // [Interpretation 7347] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
// [Interpretation 7134] From the sermondistributor_series table. // [Interpretation 7347] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
// [Interpretation 6460] Filter by sermonvvvw global. // [Interpretation 6671] Filter by sermonvvvw global.
$sermonvvvw = $this->sermonvvvw; $sermonvvvw = $this->sermonvvvw;
if (is_numeric($sermonvvvw )) if (is_numeric($sermonvvvw ))
{ {
@ -164,36 +164,36 @@ class SermondistributorModelSermon extends JModelAdmin
$query->where('a.sermon = -5'); $query->where('a.sermon = -5');
} }
// [Interpretation 6477] Join over the asset groups. // [Interpretation 6688] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 6480] Filter by access level. // [Interpretation 6691] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 6485] Implement View Level Access // [Interpretation 6696] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6492] Order the results by ordering // [Interpretation 6703] Order the results by ordering
$query->order('a.published ASC'); $query->order('a.published ASC');
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6494] Load the items // [Interpretation 6705] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -222,7 +222,7 @@ class SermondistributorModelSermon extends JModelAdmin
* @since 1.6 * @since 1.6
*/ */
public function getForm($data = array(), $loadData = true) public function getForm($data = array(), $loadData = true)
{ // [Interpretation 9102] Get the form. { // [Interpretation 9328] Get the form.
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData)); $form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) if (empty($form))
@ -232,17 +232,17 @@ class SermondistributorModelSermon extends JModelAdmin
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 9129] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. // [Interpretation 9355] 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')) if ($jinput->get('a_id'))
{ {
$id = $jinput->get('a_id', 0, 'INT'); $id = $jinput->get('a_id', 0, 'INT');
} }
// [Interpretation 9134] The back end uses id so we use that the rest of the time and set it to 0 by default. // [Interpretation 9360] The back end uses id so we use that the rest of the time and set it to 0 by default.
else else
{ {
$id = $jinput->get('id', 0, 'INT'); $id = $jinput->get('id', 0, 'INT');
} }
// [Interpretation 9139] Determine correct permissions to check. // [Interpretation 9365] Determine correct permissions to check.
if ($this->getState('sermon.id')) if ($this->getState('sermon.id'))
{ {
$id = $this->getState('sermon.id'); $id = $this->getState('sermon.id');
@ -250,74 +250,74 @@ class SermondistributorModelSermon extends JModelAdmin
$catid = 0; $catid = 0;
if (isset($this->getItem($id)->catid)) if (isset($this->getItem($id)->catid))
{ {
// [Interpretation 9146] set catagory id // [Interpretation 9372] set catagory id
$catid = $this->getItem($id)->catid; $catid = $this->getItem($id)->catid;
// [Interpretation 9148] Existing record. Can only edit in selected categories. // [Interpretation 9374] Existing record. Can only edit in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit'); $form->setFieldAttribute('catid', 'action', 'core.edit');
// [Interpretation 9150] Existing record. Can only edit own items in selected categories. // [Interpretation 9376] Existing record. Can only edit own items in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit.own'); $form->setFieldAttribute('catid', 'action', 'core.edit.own');
} }
} }
else else
{ {
// [Interpretation 9156] New record. Can only create in selected categories. // [Interpretation 9382] New record. Can only create in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.create'); $form->setFieldAttribute('catid', 'action', 'core.create');
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9160] Check for existing item. // [Interpretation 9386] Check for existing item.
// [Interpretation 9161] Modify the form based on Edit State access controls. // [Interpretation 9387] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $id)) 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)) || (isset($catid) && $catid != 0 && !$user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $catid))
|| ($id == 0 && !$user->authorise('sermon.edit.state', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('sermon.edit.state', 'com_sermondistributor')))
{ {
// [Interpretation 9176] Disable fields for display. // [Interpretation 9402] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true'); $form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true'); $form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 9179] Disable fields while saving. // [Interpretation 9405] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset'); $form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset'); $form->setFieldAttribute('published', 'filter', 'unset');
} }
// [Interpretation 9220] If this is a new item insure the greated by is set. // [Interpretation 9446] If this is a new item insure the greated by is set.
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9223] Set the created_by to this user // [Interpretation 9449] Set the created_by to this user
$form->setValue('created_by', null, $user->id); $form->setValue('created_by', null, $user->id);
} }
// [Interpretation 9226] Modify the form based on Edit Creaded By access controls. // [Interpretation 9452] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created_by', 'com_sermondistributor.sermon.' . (int) $id)) if ($id != 0 && (!$user->authorise('sermon.edit.created_by', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created_by', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('sermon.edit.created_by', 'com_sermondistributor')))
{ {
// [Interpretation 9238] Disable fields for display. // [Interpretation 9464] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true'); $form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 9240] Disable fields for display. // [Interpretation 9466] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true'); $form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 9242] Disable fields while saving. // [Interpretation 9468] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset'); $form->setFieldAttribute('created_by', 'filter', 'unset');
} }
// [Interpretation 9245] Modify the form based on Edit Creaded Date access controls. // [Interpretation 9471] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created', 'com_sermondistributor.sermon.' . (int) $id)) if ($id != 0 && (!$user->authorise('sermon.edit.created', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('sermon.edit.created', 'com_sermondistributor')))
{ {
// [Interpretation 9257] Disable fields for display. // [Interpretation 9483] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true'); $form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 9259] Disable fields while saving. // [Interpretation 9485] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// [Interpretation 9292] Only load these values if no id is found // [Interpretation 9518] Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9295] Set redirected field name // [Interpretation 9521] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING'); $redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 9297] Set redirected field value // [Interpretation 9523] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT'); $redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField) if (0 != $redirectedValue && $redirectedField)
{ {
// [Interpretation 9301] Now set the local-redirected field default value // [Interpretation 9527] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue); $form->setValue($redirectedField, null, $redirectedValue);
} }
} }
@ -358,7 +358,7 @@ class SermondistributorModelSermon extends JModelAdmin
if ($allow) if ($allow)
{ {
// [Interpretation 9394] The record has been set. Check the record permissions. // [Interpretation 9620] The record has been set. Check the record permissions.
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id); return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
} }
return $allow; return $allow;
@ -382,14 +382,14 @@ class SermondistributorModelSermon extends JModelAdmin
if ($recordId) if ($recordId)
{ {
// [Interpretation 9467] The record has been set. Check the record permissions. // [Interpretation 9693] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $recordId); $permission = $user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
return false; return false;
} }
} }
// [Interpretation 9483] Check against the category. // [Interpretation 9709] Check against the category.
if (!empty($record->catid)) if (!empty($record->catid))
{ {
$catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid); $catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid);
@ -398,7 +398,7 @@ class SermondistributorModelSermon extends JModelAdmin
return false; return false;
} }
} }
// [Interpretation 9494] In the absense of better information, revert to the component permissions. // [Interpretation 9720] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.edit.state', 'com_sermondistributor'); return $user->authorise('sermon.edit.state', 'com_sermondistributor');
} }
@ -413,7 +413,7 @@ class SermondistributorModelSermon extends JModelAdmin
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9335] Check specific edit permission then general edit permission. // [Interpretation 9561] Check specific edit permission then general edit permission.
$user = JFactory::getUser(); $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'); return $user->authorise('sermon.edit', 'com_sermondistributor.sermon.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('sermon.edit', 'com_sermondistributor');
@ -512,20 +512,20 @@ class SermondistributorModelSermon extends JModelAdmin
*/ */
public function validate($form, $data, $group = null) public function validate($form, $data, $group = null)
{ {
// [Interpretation 8301] check if the not_required field is set // [Interpretation 8522] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required'])) if (SermondistributorHelper::checkString($data['not_required']))
{ {
$requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields); $requiredFields = array_unique($requiredFields);
// [Interpretation 8306] now change the required field attributes value // [Interpretation 8527] now change the required field attributes value
foreach ($requiredFields as $requiredField) foreach ($requiredFields as $requiredField)
{ {
// [Interpretation 8309] make sure there is a string value // [Interpretation 8530] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField)) if (SermondistributorHelper::checkString($requiredField))
{ {
// [Interpretation 8312] change to false // [Interpretation 8533] change to false
$form->setFieldAttribute($requiredField, 'required', 'false'); $form->setFieldAttribute($requiredField, 'required', 'false');
// [Interpretation 8314] also clear the data set // [Interpretation 8535] also clear the data set
$data[$requiredField] = ''; $data[$requiredField] = '';
} }
} }

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermondistributor.php @subpackage sermondistributor.php
@ -45,7 +45,7 @@ class SermondistributorModelSermondistributor extends JModelList
$viewGroups = array( $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') '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 10559] view access array // [Interpretation 10790] view access array
$viewAccess = array( $viewAccess = array(
'preacher.create' => 'preacher.create', 'preacher.create' => 'preacher.create',
'preachers.access' => 'preacher.access', 'preachers.access' => 'preacher.access',

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons.php @subpackage sermons.php
@ -129,16 +129,16 @@ class SermondistributorModelSermons extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// [Interpretation 10096] check in items // [Interpretation 10327] check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
$items = parent::getItems(); $items = parent::getItems();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -152,14 +152,14 @@ class SermondistributorModelSermons extends JModelList
} }
} }
// [Interpretation 10443] set selection value to a translatable value // [Interpretation 10674] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// [Interpretation 10450] convert link_type // [Interpretation 10681] convert link_type
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type'); $item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
// [Interpretation 10450] convert source // [Interpretation 10681] convert source
$item->source = $this->selectionTranslation($item->source, 'source'); $item->source = $this->selectionTranslation($item->source, 'source');
} }
} }
@ -176,20 +176,20 @@ class SermondistributorModelSermons extends JModelList
*/ */
public function selectionTranslation($value,$name) public function selectionTranslation($value,$name)
{ {
// [Interpretation 10476] Array of link_type language strings // [Interpretation 10707] Array of link_type language strings
if ($name == 'link_type') if ($name == 'link_type')
{ {
$link_typeArray = array( $link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED', 1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT' 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value])) if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{ {
return $link_typeArray[$value]; return $link_typeArray[$value];
} }
} }
// [Interpretation 10476] Array of source language strings // [Interpretation 10707] Array of source language strings
if ($name == 'source') if ($name == 'source')
{ {
$sourceArray = array( $sourceArray = array(
@ -198,7 +198,7 @@ class SermondistributorModelSermons extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX', 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL' 3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
); );
// [Interpretation 10507] Now check if value is found in this array // [Interpretation 10738] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value])) if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{ {
return $sourceArray[$value]; return $sourceArray[$value];
@ -214,29 +214,29 @@ class SermondistributorModelSermons extends JModelList
*/ */
protected function getListQuery() protected function getListQuery()
{ {
// [Interpretation 6981] Get the user object. // [Interpretation 7194] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6983] Create a new query object. // [Interpretation 7196] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6986] Select some fields // [Interpretation 7199] Select some fields
$query->select('a.*'); $query->select('a.*');
$query->select($db->quoteName('c.title','category_title')); $query->select($db->quoteName('c.title','category_title'));
// [Interpretation 6993] From the sermondistributor_item table // [Interpretation 7206] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a')); $query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')'); $query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [Interpretation 7134] From the sermondistributor_preacher table. // [Interpretation 7347] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [Interpretation 7134] From the sermondistributor_series table. // [Interpretation 7347] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [Interpretation 7007] Filter by published state // [Interpretation 7220] Filter by published state
$published = $this->getState('filter.published'); $published = $this->getState('filter.published');
if (is_numeric($published)) if (is_numeric($published))
{ {
@ -247,21 +247,21 @@ class SermondistributorModelSermons extends JModelList
$query->where('(a.published = 0 OR a.published = 1)'); $query->where('(a.published = 0 OR a.published = 1)');
} }
// [Interpretation 7019] Join over the asset groups. // [Interpretation 7232] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 7022] Filter by access level. // [Interpretation 7235] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 7027] Implement View Level Access // [Interpretation 7240] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 7104] Filter by search. // [Interpretation 7317] Filter by search.
$search = $this->getState('filter.search'); $search = $this->getState('filter.search');
if (!empty($search)) if (!empty($search))
{ {
@ -276,28 +276,28 @@ class SermondistributorModelSermons extends JModelList
} }
} }
// [Interpretation 7278] Filter by preacher. // [Interpretation 7501] Filter by preacher.
if ($preacher = $this->getState('filter.preacher')) if ($preacher = $this->getState('filter.preacher'))
{ {
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true))); $query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
} }
// [Interpretation 7278] Filter by series. // [Interpretation 7501] Filter by series.
if ($series = $this->getState('filter.series')) if ($series = $this->getState('filter.series'))
{ {
$query->where('a.series = ' . $db->quote($db->escape($series, true))); $query->where('a.series = ' . $db->quote($db->escape($series, true)));
} }
// [Interpretation 7287] Filter by Link_type. // [Interpretation 7510] Filter by Link_type.
if ($link_type = $this->getState('filter.link_type')) if ($link_type = $this->getState('filter.link_type'))
{ {
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true))); $query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
} }
// [Interpretation 7287] Filter by Source. // [Interpretation 7510] Filter by Source.
if ($source = $this->getState('filter.source')) if ($source = $this->getState('filter.source'))
{ {
$query->where('a.source = ' . $db->quote($db->escape($source, true))); $query->where('a.source = ' . $db->quote($db->escape($source, true)));
} }
// [Interpretation 7041] Filter by a single or group of categories. // [Interpretation 7254] Filter by a single or group of categories.
$baselevel = 1; $baselevel = 1;
$categoryId = $this->getState('filter.category_id'); $categoryId = $this->getState('filter.category_id');
@ -319,7 +319,7 @@ class SermondistributorModelSermons extends JModelList
} }
// [Interpretation 7063] Add the list ordering clause. // [Interpretation 7276] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc'); $orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '') if ($orderCol != '')
@ -337,42 +337,44 @@ class SermondistributorModelSermons extends JModelList
*/ */
public function getExportData($pks) public function getExportData($pks)
{ {
// [Interpretation 6718] setup the query // [Interpretation 6929] setup the query
if (SermondistributorHelper::checkArray($pks)) if (SermondistributorHelper::checkArray($pks))
{ {
// [Interpretation 6721] Get the user object. // [Interpretation 6932] Set a value to know this is exporting method.
$_export = true;
// [Interpretation 6934] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6723] Create a new query object. // [Interpretation 6936] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6726] Select some fields // [Interpretation 6939] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6728] From the sermondistributor_sermon table // [Interpretation 6941] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a')); $query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')'); $query->where('a.id IN (' . implode(',',$pks) . ')');
// [Interpretation 6738] Implement View Level Access // [Interpretation 6951] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6745] Order the results by ordering // [Interpretation 6958] Order the results by ordering
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6747] Load the items // [Interpretation 6960] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -383,13 +385,13 @@ class SermondistributorModelSermons extends JModelList
continue; continue;
} }
// [Interpretation 10390] unset the values we don't want exported. // [Interpretation 10621] unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
unset($item->checked_out_time); unset($item->checked_out_time);
} }
} }
// [Interpretation 10399] Add headers to items array. // [Interpretation 10630] Add headers to items array.
$headers = $this->getExImPortHeaders(); $headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
@ -408,13 +410,13 @@ class SermondistributorModelSermons extends JModelList
*/ */
public function getExImPortHeaders() public function getExImPortHeaders()
{ {
// [Interpretation 6767] Get a db connection. // [Interpretation 6980] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 6769] get the columns // [Interpretation 6982] get the columns
$columns = $db->getTableColumns("#__sermondistributor_sermon"); $columns = $db->getTableColumns("#__sermondistributor_sermon");
if (SermondistributorHelper::checkArray($columns)) if (SermondistributorHelper::checkArray($columns))
{ {
// [Interpretation 6773] remove the headers you don't import/export. // [Interpretation 6986] remove the headers you don't import/export.
unset($columns['asset_id']); unset($columns['asset_id']);
unset($columns['checked_out']); unset($columns['checked_out']);
unset($columns['checked_out_time']); unset($columns['checked_out_time']);
@ -436,7 +438,7 @@ class SermondistributorModelSermons extends JModelList
*/ */
protected function getStoreId($id = '') protected function getStoreId($id = '')
{ {
// [Interpretation 9719] Compile the store id. // [Interpretation 9945] Compile the store id.
$id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published'); $id .= ':' . $this->getState('filter.published');
@ -464,15 +466,15 @@ class SermondistributorModelSermons extends JModelList
*/ */
protected function checkInNow() protected function checkInNow()
{ {
// [Interpretation 10112] Get set check in time // [Interpretation 10343] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time) if ($time)
{ {
// [Interpretation 10117] Get a db connection. // [Interpretation 10348] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 10119] reset query // [Interpretation 10350] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__sermondistributor_sermon')); $query->from($db->quoteName('#__sermondistributor_sermon'));
@ -480,24 +482,24 @@ class SermondistributorModelSermons extends JModelList
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// [Interpretation 10127] Get Yesterdays date // [Interpretation 10358] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 10129] reset query // [Interpretation 10360] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 10131] Fields to update. // [Interpretation 10362] Fields to update.
$fields = array( $fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0' $db->quoteName('checked_out') . '=0'
); );
// [Interpretation 10136] Conditions for which records should be updated. // [Interpretation 10367] Conditions for which records should be updated.
$conditions = array( $conditions = array(
$db->quoteName('checked_out') . '!=0', $db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// [Interpretation 10141] Check table // [Interpretation 10372] Check table
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions); $query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistic.php @subpackage statistic.php
@ -116,7 +116,7 @@ class SermondistributorModelStatistic extends JModelAdmin
* @since 1.6 * @since 1.6
*/ */
public function getForm($data = array(), $loadData = true) public function getForm($data = array(), $loadData = true)
{ // [Interpretation 9102] Get the form. { // [Interpretation 9328] Get the form.
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData)); $form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) if (empty($form))
@ -126,12 +126,12 @@ class SermondistributorModelStatistic extends JModelAdmin
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
// [Interpretation 9187] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. // [Interpretation 9413] 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')) if ($jinput->get('a_id'))
{ {
$id = $jinput->get('a_id', 0, 'INT'); $id = $jinput->get('a_id', 0, 'INT');
} }
// [Interpretation 9192] The back end uses id so we use that the rest of the time and set it to 0 by default. // [Interpretation 9418] The back end uses id so we use that the rest of the time and set it to 0 by default.
else else
{ {
$id = $jinput->get('id', 0, 'INT'); $id = $jinput->get('id', 0, 'INT');
@ -139,54 +139,54 @@ class SermondistributorModelStatistic extends JModelAdmin
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9198] Check for existing item. // [Interpretation 9424] Check for existing item.
// [Interpretation 9199] Modify the form based on Edit State access controls. // [Interpretation 9425] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $id)) if ($id != 0 && (!$user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.state', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('statistic.edit.state', 'com_sermondistributor')))
{ {
// [Interpretation 9212] Disable fields for display. // [Interpretation 9438] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true'); $form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true'); $form->setFieldAttribute('published', 'disabled', 'true');
// [Interpretation 9215] Disable fields while saving. // [Interpretation 9441] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset'); $form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset'); $form->setFieldAttribute('published', 'filter', 'unset');
} }
// [Interpretation 9220] If this is a new item insure the greated by is set. // [Interpretation 9446] If this is a new item insure the greated by is set.
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9223] Set the created_by to this user // [Interpretation 9449] Set the created_by to this user
$form->setValue('created_by', null, $user->id); $form->setValue('created_by', null, $user->id);
} }
// [Interpretation 9226] Modify the form based on Edit Creaded By access controls. // [Interpretation 9452] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created_by', 'com_sermondistributor.statistic.' . (int) $id)) if ($id != 0 && (!$user->authorise('statistic.edit.created_by', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created_by', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('statistic.edit.created_by', 'com_sermondistributor')))
{ {
// [Interpretation 9238] Disable fields for display. // [Interpretation 9464] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true'); $form->setFieldAttribute('created_by', 'disabled', 'true');
// [Interpretation 9240] Disable fields for display. // [Interpretation 9466] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true'); $form->setFieldAttribute('created_by', 'readonly', 'true');
// [Interpretation 9242] Disable fields while saving. // [Interpretation 9468] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset'); $form->setFieldAttribute('created_by', 'filter', 'unset');
} }
// [Interpretation 9245] Modify the form based on Edit Creaded Date access controls. // [Interpretation 9471] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created', 'com_sermondistributor.statistic.' . (int) $id)) if ($id != 0 && (!$user->authorise('statistic.edit.created', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created', 'com_sermondistributor'))) || ($id == 0 && !$user->authorise('statistic.edit.created', 'com_sermondistributor')))
{ {
// [Interpretation 9257] Disable fields for display. // [Interpretation 9483] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true'); $form->setFieldAttribute('created', 'disabled', 'true');
// [Interpretation 9259] Disable fields while saving. // [Interpretation 9485] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// [Interpretation 9292] Only load these values if no id is found // [Interpretation 9518] Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {
// [Interpretation 9295] Set redirected field name // [Interpretation 9521] Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING'); $redirectedField = $jinput->get('ref', null, 'STRING');
// [Interpretation 9297] Set redirected field value // [Interpretation 9523] Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT'); $redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField) if (0 != $redirectedValue && $redirectedField)
{ {
// [Interpretation 9301] Now set the local-redirected field default value // [Interpretation 9527] Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue); $form->setValue($redirectedField, null, $redirectedValue);
} }
} }
@ -223,7 +223,7 @@ class SermondistributorModelStatistic extends JModelAdmin
} }
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 9423] The record has been set. Check the record permissions. // [Interpretation 9649] The record has been set. Check the record permissions.
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id); return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
} }
return false; return false;
@ -245,14 +245,14 @@ class SermondistributorModelStatistic extends JModelAdmin
if ($recordId) if ($recordId)
{ {
// [Interpretation 9510] The record has been set. Check the record permissions. // [Interpretation 9736] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $recordId); $permission = $user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission)) if (!$permission && !is_null($permission))
{ {
return false; return false;
} }
} }
// [Interpretation 9527] In the absense of better information, revert to the component permissions. // [Interpretation 9753] In the absense of better information, revert to the component permissions.
return $user->authorise('statistic.edit.state', 'com_sermondistributor'); return $user->authorise('statistic.edit.state', 'com_sermondistributor');
} }
@ -267,7 +267,7 @@ class SermondistributorModelStatistic extends JModelAdmin
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = array(), $key = 'id')
{ {
// [Interpretation 9335] Check specific edit permission then general edit permission. // [Interpretation 9561] Check specific edit permission then general edit permission.
$user = JFactory::getUser(); $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'); return $user->authorise('statistic.edit', 'com_sermondistributor.statistic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('statistic.edit', 'com_sermondistributor');

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistics.php @subpackage statistics.php
@ -113,16 +113,16 @@ class SermondistributorModelStatistics extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// [Interpretation 10096] check in items // [Interpretation 10327] check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
$items = parent::getItems(); $items = parent::getItems();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -147,31 +147,31 @@ class SermondistributorModelStatistics extends JModelList
*/ */
protected function getListQuery() protected function getListQuery()
{ {
// [Interpretation 6981] Get the user object. // [Interpretation 7194] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6983] Create a new query object. // [Interpretation 7196] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6986] Select some fields // [Interpretation 7199] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6993] From the sermondistributor_item table // [Interpretation 7206] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a')); $query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [Interpretation 7134] From the sermondistributor_sermon table. // [Interpretation 7347] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
// [Interpretation 7134] From the sermondistributor_preacher table. // [Interpretation 7347] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
// [Interpretation 7134] From the sermondistributor_series table. // [Interpretation 7347] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name')); $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') . ')'); $query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
// [Interpretation 7007] Filter by published state // [Interpretation 7220] Filter by published state
$published = $this->getState('filter.published'); $published = $this->getState('filter.published');
if (is_numeric($published)) if (is_numeric($published))
{ {
@ -182,21 +182,21 @@ class SermondistributorModelStatistics extends JModelList
$query->where('(a.published = 0 OR a.published = 1)'); $query->where('(a.published = 0 OR a.published = 1)');
} }
// [Interpretation 7019] Join over the asset groups. // [Interpretation 7232] Join over the asset groups.
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [Interpretation 7022] Filter by access level. // [Interpretation 7235] Filter by access level.
if ($access = $this->getState('filter.access')) if ($access = $this->getState('filter.access'))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $access);
} }
// [Interpretation 7027] Implement View Level Access // [Interpretation 7240] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 7104] Filter by search. // [Interpretation 7317] Filter by search.
$search = $this->getState('filter.search'); $search = $this->getState('filter.search');
if (!empty($search)) if (!empty($search))
{ {
@ -211,23 +211,23 @@ class SermondistributorModelStatistics extends JModelList
} }
} }
// [Interpretation 7278] Filter by sermon. // [Interpretation 7501] Filter by sermon.
if ($sermon = $this->getState('filter.sermon')) if ($sermon = $this->getState('filter.sermon'))
{ {
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true))); $query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
} }
// [Interpretation 7278] Filter by preacher. // [Interpretation 7501] Filter by preacher.
if ($preacher = $this->getState('filter.preacher')) if ($preacher = $this->getState('filter.preacher'))
{ {
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true))); $query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
} }
// [Interpretation 7278] Filter by series. // [Interpretation 7501] Filter by series.
if ($series = $this->getState('filter.series')) if ($series = $this->getState('filter.series'))
{ {
$query->where('a.series = ' . $db->quote($db->escape($series, true))); $query->where('a.series = ' . $db->quote($db->escape($series, true)));
} }
// [Interpretation 7063] Add the list ordering clause. // [Interpretation 7276] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc'); $orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '') if ($orderCol != '')
@ -245,42 +245,44 @@ class SermondistributorModelStatistics extends JModelList
*/ */
public function getExportData($pks) public function getExportData($pks)
{ {
// [Interpretation 6718] setup the query // [Interpretation 6929] setup the query
if (SermondistributorHelper::checkArray($pks)) if (SermondistributorHelper::checkArray($pks))
{ {
// [Interpretation 6721] Get the user object. // [Interpretation 6932] Set a value to know this is exporting method.
$_export = true;
// [Interpretation 6934] Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// [Interpretation 6723] Create a new query object. // [Interpretation 6936] Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 6726] Select some fields // [Interpretation 6939] Select some fields
$query->select('a.*'); $query->select('a.*');
// [Interpretation 6728] From the sermondistributor_statistic table // [Interpretation 6941] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a')); $query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')'); $query->where('a.id IN (' . implode(',',$pks) . ')');
// [Interpretation 6738] Implement View Level Access // [Interpretation 6951] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor')) if (!$user->authorise('core.options', 'com_sermondistributor'))
{ {
$groups = implode(',', $user->getAuthorisedViewLevels()); $groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')'); $query->where('a.access IN (' . $groups . ')');
} }
// [Interpretation 6745] Order the results by ordering // [Interpretation 6958] Order the results by ordering
$query->order('a.ordering ASC'); $query->order('a.ordering ASC');
// [Interpretation 6747] Load the items // [Interpretation 6960] Load the items
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
$items = $db->loadObjectList(); $items = $db->loadObjectList();
// [Interpretation 10171] set values to display correctly. // [Interpretation 10402] set values to display correctly.
if (SermondistributorHelper::checkArray($items)) if (SermondistributorHelper::checkArray($items))
{ {
// [Interpretation 10174] get user object. // [Interpretation 10405] get user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
@ -291,13 +293,13 @@ class SermondistributorModelStatistics extends JModelList
continue; continue;
} }
// [Interpretation 10390] unset the values we don't want exported. // [Interpretation 10621] unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
unset($item->checked_out_time); unset($item->checked_out_time);
} }
} }
// [Interpretation 10399] Add headers to items array. // [Interpretation 10630] Add headers to items array.
$headers = $this->getExImPortHeaders(); $headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (SermondistributorHelper::checkObject($headers))
{ {
@ -316,13 +318,13 @@ class SermondistributorModelStatistics extends JModelList
*/ */
public function getExImPortHeaders() public function getExImPortHeaders()
{ {
// [Interpretation 6767] Get a db connection. // [Interpretation 6980] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 6769] get the columns // [Interpretation 6982] get the columns
$columns = $db->getTableColumns("#__sermondistributor_statistic"); $columns = $db->getTableColumns("#__sermondistributor_statistic");
if (SermondistributorHelper::checkArray($columns)) if (SermondistributorHelper::checkArray($columns))
{ {
// [Interpretation 6773] remove the headers you don't import/export. // [Interpretation 6986] remove the headers you don't import/export.
unset($columns['asset_id']); unset($columns['asset_id']);
unset($columns['checked_out']); unset($columns['checked_out']);
unset($columns['checked_out_time']); unset($columns['checked_out_time']);
@ -344,7 +346,7 @@ class SermondistributorModelStatistics extends JModelList
*/ */
protected function getStoreId($id = '') protected function getStoreId($id = '')
{ {
// [Interpretation 9719] Compile the store id. // [Interpretation 9945] Compile the store id.
$id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published'); $id .= ':' . $this->getState('filter.published');
@ -368,15 +370,15 @@ class SermondistributorModelStatistics extends JModelList
*/ */
protected function checkInNow() protected function checkInNow()
{ {
// [Interpretation 10112] Get set check in time // [Interpretation 10343] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time) if ($time)
{ {
// [Interpretation 10117] Get a db connection. // [Interpretation 10348] Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// [Interpretation 10119] reset query // [Interpretation 10350] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__sermondistributor_statistic')); $query->from($db->quoteName('#__sermondistributor_statistic'));
@ -384,24 +386,24 @@ class SermondistributorModelStatistics extends JModelList
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// [Interpretation 10127] Get Yesterdays date // [Interpretation 10358] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// [Interpretation 10129] reset query // [Interpretation 10360] reset query
$query = $db->getQuery(true); $query = $db->getQuery(true);
// [Interpretation 10131] Fields to update. // [Interpretation 10362] Fields to update.
$fields = array( $fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0' $db->quoteName('checked_out') . '=0'
); );
// [Interpretation 10136] Conditions for which records should be updated. // [Interpretation 10367] Conditions for which records should be updated.
$conditions = array( $conditions = array(
$db->quoteName('checked_out') . '!=0', $db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// [Interpretation 10141] Check table // [Interpretation 10372] Check table
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions); $query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermondistributor.php @subpackage sermondistributor.php

View File

@ -194,3 +194,9 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
KEY `idx_article` (`article`) KEY `idx_article` (`article`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
--
-- Always insure this column is large enough for all the access control values.
--
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.2 @version 1.3.2
@build 26th May, 2016 @build 24th June, 2016
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.php @subpackage help_document.php

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