Made general improvements.
This commit is contained in:
parent
abfa31df70
commit
7a6146a3b9
@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
|
||||
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
|
||||
+ *Name*: [Sermon Distributor] (https://www.vdm.io/)
|
||||
+ *First Build*: 22nd October, 2015
|
||||
+ *Last Build*: 2nd July, 2016
|
||||
+ *Last Build*: 13th July, 2016
|
||||
+ *Version*: 1.3.3
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
@ -36,7 +36,7 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **49061**
|
||||
+ *Line count*: **49031**
|
||||
+ *File count*: **355**
|
||||
+ *Folder count*: **80**
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage admin.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage dashboard.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_document.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_documents.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preacher.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preachers.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series_list.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermon.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermons.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistic.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistics.css
|
||||
|
@ -357,7 +357,7 @@
|
||||
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LOAD_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- [Interpretation 12144] Option Set. -->
|
||||
<!-- [Interpretation 12139] Option Set. -->
|
||||
<option value="">
|
||||
COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LOAD</option>"
|
||||
<option value="1">
|
||||
@ -373,7 +373,7 @@
|
||||
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- [Interpretation 12169] Option Set. -->
|
||||
<!-- [Interpretation 12164] Option Set. -->
|
||||
<option value="">
|
||||
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>"
|
||||
<option value=".min">
|
||||
@ -385,7 +385,7 @@
|
||||
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- [Interpretation 12190] Option Set. -->
|
||||
<!-- [Interpretation 12185] Option Set. -->
|
||||
<option value="">
|
||||
COM_SERMONDISTRIBUTOR_CONFIG_FLAT_LOAD</option>"
|
||||
<option value=".almost-flat">
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage controller.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage ajax.json.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_document.php
|
||||
@ -60,13 +60,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [Interpretation 9111] Access check.
|
||||
// [Interpretation 9106] Access check.
|
||||
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [Interpretation 9122] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9117] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('help_document.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9265] get user object.
|
||||
// [Interpretation 9260] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9267] get record id.
|
||||
// [Interpretation 9262] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [Interpretation 9274] Access check.
|
||||
// [Interpretation 9269] Access check.
|
||||
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9283] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9278] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('help_document.edit', 'com_sermondistributor.help_document.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('help_document.edit.own', 'com_sermondistributor.help_document.' . $recordId))
|
||||
{
|
||||
// [Interpretation 9305] Now test the owner is the user.
|
||||
// [Interpretation 9300] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [Interpretation 9309] Need to do a lookup from the model.
|
||||
// [Interpretation 9304] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [Interpretation 9317] If the owner matches 'me' then allow.
|
||||
// [Interpretation 9312] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9339] Since there is no permission, revert to the component permissions.
|
||||
// [Interpretation 9334] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('help_document.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_documents.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage import.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preacher.php
|
||||
@ -60,13 +60,13 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [Interpretation 9111] Access check.
|
||||
// [Interpretation 9106] Access check.
|
||||
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [Interpretation 9122] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9117] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('preacher.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9265] get user object.
|
||||
// [Interpretation 9260] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9267] get record id.
|
||||
// [Interpretation 9262] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [Interpretation 9274] Access check.
|
||||
// [Interpretation 9269] Access check.
|
||||
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9283] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9278] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('preacher.edit.own', 'com_sermondistributor.preacher.' . $recordId))
|
||||
{
|
||||
// [Interpretation 9305] Now test the owner is the user.
|
||||
// [Interpretation 9300] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [Interpretation 9309] Need to do a lookup from the model.
|
||||
// [Interpretation 9304] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [Interpretation 9317] If the owner matches 'me' then allow.
|
||||
// [Interpretation 9312] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9339] Since there is no permission, revert to the component permissions.
|
||||
// [Interpretation 9334] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('preacher.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preachers.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series.php
|
||||
@ -60,13 +60,13 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [Interpretation 9111] Access check.
|
||||
// [Interpretation 9106] Access check.
|
||||
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [Interpretation 9122] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9117] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('series.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9265] get user object.
|
||||
// [Interpretation 9260] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9267] get record id.
|
||||
// [Interpretation 9262] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [Interpretation 9274] Access check.
|
||||
// [Interpretation 9269] Access check.
|
||||
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9283] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9278] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('series.edit.own', 'com_sermondistributor.series.' . $recordId))
|
||||
{
|
||||
// [Interpretation 9305] Now test the owner is the user.
|
||||
// [Interpretation 9300] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [Interpretation 9309] Need to do a lookup from the model.
|
||||
// [Interpretation 9304] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [Interpretation 9317] If the owner matches 'me' then allow.
|
||||
// [Interpretation 9312] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('series.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9339] Since there is no permission, revert to the component permissions.
|
||||
// [Interpretation 9334] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('series.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series_list.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermon.php
|
||||
@ -60,10 +60,10 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [Interpretation 9066] get the user object
|
||||
// [Interpretation 9061] get the user object
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [Interpretation 9071] Access check.
|
||||
// [Interpretation 9066] Access check.
|
||||
$access = $user->authorise('sermon.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
@ -74,13 +74,13 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
|
||||
if ($categoryId)
|
||||
{
|
||||
// [Interpretation 9082] If the category has been passed in the URL check it.
|
||||
// [Interpretation 9077] If the category has been passed in the URL check it.
|
||||
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
|
||||
}
|
||||
|
||||
if ($allow === null)
|
||||
{
|
||||
// [Interpretation 9091] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9086] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('sermon.create', $this->option);
|
||||
}
|
||||
else
|
||||
@ -100,13 +100,13 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{ // [Interpretation 9169] get user object.
|
||||
{ // [Interpretation 9164] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9171] get record id.
|
||||
// [Interpretation 9166] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [Interpretation 9178] Access check.
|
||||
// [Interpretation 9173] Access check.
|
||||
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -115,17 +115,17 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9187] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9182] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('sermon.edit.own', 'com_sermondistributor.sermon.' . $recordId))
|
||||
{
|
||||
// [Interpretation 9209] Fallback on edit.own. Now test the owner is the user.
|
||||
// [Interpretation 9204] Fallback on edit.own. Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [Interpretation 9213] Need to do a lookup from the model.
|
||||
// [Interpretation 9208] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -135,7 +135,7 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [Interpretation 9221] If the owner matches 'me' then do the test.
|
||||
// [Interpretation 9216] If the owner matches 'me' then do the test.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
|
||||
@ -151,7 +151,7 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
|
||||
if ($categoryId)
|
||||
{
|
||||
// [Interpretation 9243] The category has been set. Check the category permissions.
|
||||
// [Interpretation 9238] The category has been set. Check the category permissions.
|
||||
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
@ -159,7 +159,7 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
}
|
||||
}
|
||||
}
|
||||
// [Interpretation 9253] Since there is no permission, revert to the component permissions.
|
||||
// [Interpretation 9248] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('sermon.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermondistributor.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermons.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistic.php
|
||||
@ -60,13 +60,13 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [Interpretation 9111] Access check.
|
||||
// [Interpretation 9106] Access check.
|
||||
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [Interpretation 9122] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9117] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('statistic.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9265] get user object.
|
||||
// [Interpretation 9260] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9267] get record id.
|
||||
// [Interpretation 9262] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [Interpretation 9274] Access check.
|
||||
// [Interpretation 9269] Access check.
|
||||
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9283] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9278] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('statistic.edit', 'com_sermondistributor.statistic.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('statistic.edit.own', 'com_sermondistributor.statistic.' . $recordId))
|
||||
{
|
||||
// [Interpretation 9305] Now test the owner is the user.
|
||||
// [Interpretation 9300] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [Interpretation 9309] Need to do a lookup from the model.
|
||||
// [Interpretation 9304] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [Interpretation 9317] If the owner matches 'me' then allow.
|
||||
// [Interpretation 9312] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9339] Since there is no permission, revert to the component permissions.
|
||||
// [Interpretation 9334] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('statistic.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistics.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage batch_.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermondistributor.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage batchselection.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_above.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_left.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_right.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_under.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage metadata.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage publishing.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_above.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_left.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_right.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage metadata.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage publishing.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermons_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_above.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_left.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_right.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage metadata.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage publishing.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermons_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_above.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_left.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_right.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_under.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage files_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage metadata.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage publishing.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage stastics_fullwidth.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_above.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_left.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage details_right.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage metadata.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage publishing.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage ajax.php
|
||||
@ -43,7 +43,7 @@ class SermondistributorModelAjax extends JModelList
|
||||
|
||||
}
|
||||
|
||||
// [Interpretation 8703] Used in sermon
|
||||
// [Interpretation 8698] Used in sermon
|
||||
/**
|
||||
* Check and Set Dropbox local listing
|
||||
**/
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage articles.php
|
||||
@ -131,16 +131,11 @@ class JFormFieldArticles extends JFormFieldList
|
||||
// [Interpretation 7501] check if button was created for article field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// [Interpretation 7504] Add some final script
|
||||
$script[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
|
||||
});";
|
||||
// [Interpretation 7509] Load the needed script.
|
||||
// [Interpretation 7504] Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// [Interpretation 7512] return the button attached to input field.
|
||||
return $html . implode('',$button);
|
||||
// [Interpretation 7507] return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage dropboxfiles.php
|
||||
@ -131,16 +131,11 @@ class JFormFieldDropboxfiles extends JFormFieldList
|
||||
// [Interpretation 7501] check if button was created for field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// [Interpretation 7504] Add some final script
|
||||
$script[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
|
||||
});";
|
||||
// [Interpretation 7509] Load the needed script.
|
||||
// [Interpretation 7504] Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// [Interpretation 7512] return the button attached to input field.
|
||||
return $html . implode('',$button);
|
||||
// [Interpretation 7507] return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage localfiles.php
|
||||
@ -131,16 +131,11 @@ class JFormFieldLocalfiles extends JFormFieldList
|
||||
// [Interpretation 7501] check if button was created for field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// [Interpretation 7504] Add some final script
|
||||
$script[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
|
||||
});";
|
||||
// [Interpretation 7509] Load the needed script.
|
||||
// [Interpretation 7504] Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// [Interpretation 7512] return the button attached to input field.
|
||||
return $html . implode('',$button);
|
||||
// [Interpretation 7507] return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preachers.php
|
||||
@ -131,16 +131,11 @@ class JFormFieldPreachers extends JFormFieldList
|
||||
// [Interpretation 7501] check if button was created for preacher field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// [Interpretation 7504] Add some final script
|
||||
$script[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
|
||||
});";
|
||||
// [Interpretation 7509] Load the needed script.
|
||||
// [Interpretation 7504] Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// [Interpretation 7512] return the button attached to input field.
|
||||
return $html . implode('',$button);
|
||||
// [Interpretation 7507] return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series.php
|
||||
@ -131,16 +131,11 @@ class JFormFieldSeries extends JFormFieldList
|
||||
// [Interpretation 7501] check if button was created for series field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// [Interpretation 7504] Add some final script
|
||||
$script[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
|
||||
});";
|
||||
// [Interpretation 7509] Load the needed script.
|
||||
// [Interpretation 7504] Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// [Interpretation 7512] return the button attached to input field.
|
||||
return $html . implode('',$button);
|
||||
// [Interpretation 7507] return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermon.php
|
||||
@ -131,16 +131,11 @@ class JFormFieldSermon extends JFormFieldList
|
||||
// [Interpretation 7501] check if button was created for sermon field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// [Interpretation 7504] Add some final script
|
||||
$script[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
|
||||
});";
|
||||
// [Interpretation 7509] Load the needed script.
|
||||
// [Interpretation 7504] Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// [Interpretation 7512] return the button attached to input field.
|
||||
return $html . implode('',$button);
|
||||
// [Interpretation 7507] return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_document.js
|
||||
@ -53,7 +53,7 @@ jQuery(document).ready(function()
|
||||
// the vvvvvwe function
|
||||
function vvvvvwe(location_vvvvvwe)
|
||||
{
|
||||
// [Interpretation 7785] set the function logic
|
||||
// [Interpretation 7780] set the function logic
|
||||
if (location_vvvvvwe == 1)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
@ -67,7 +67,7 @@ function vvvvvwe(location_vvvvvwe)
|
||||
// the vvvvvwf function
|
||||
function vvvvvwf(location_vvvvvwf)
|
||||
{
|
||||
// [Interpretation 7785] set the function logic
|
||||
// [Interpretation 7780] set the function logic
|
||||
if (location_vvvvvwf == 2)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
@ -94,7 +94,7 @@ function vvvvvwg(type_vvvvvwg)
|
||||
var type = type_vvvvvwg.some(type_vvvvvwg_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
@ -125,7 +125,7 @@ function vvvvvwg(type_vvvvvwg)
|
||||
// the vvvvvwg Some function
|
||||
function type_vvvvvwg_SomeFunc(type_vvvvvwg)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (type_vvvvvwg == 3)
|
||||
{
|
||||
return true;
|
||||
@ -149,7 +149,7 @@ function vvvvvwh(type_vvvvvwh)
|
||||
var type = type_vvvvvwh.some(type_vvvvvwh_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
@ -180,7 +180,7 @@ function vvvvvwh(type_vvvvvwh)
|
||||
// the vvvvvwh Some function
|
||||
function type_vvvvvwh_SomeFunc(type_vvvvvwh)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (type_vvvvvwh == 1)
|
||||
{
|
||||
return true;
|
||||
@ -204,7 +204,7 @@ function vvvvvwi(type_vvvvvwi)
|
||||
var type = type_vvvvvwi.some(type_vvvvvwi_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').show();
|
||||
@ -235,7 +235,7 @@ function vvvvvwi(type_vvvvvwi)
|
||||
// the vvvvvwi Some function
|
||||
function type_vvvvvwi_SomeFunc(type_vvvvvwi)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (type_vvvvvwi == 2)
|
||||
{
|
||||
return true;
|
||||
@ -246,7 +246,7 @@ function type_vvvvvwi_SomeFunc(type_vvvvvwi)
|
||||
// the vvvvvwj function
|
||||
function vvvvvwj(target_vvvvvwj)
|
||||
{
|
||||
// [Interpretation 7785] set the function logic
|
||||
// [Interpretation 7780] set the function logic
|
||||
if (target_vvvvvwj == 1)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
|
@ -282,15 +282,15 @@
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- [Interpretation 9868] Access Control Fields. -->
|
||||
<!-- [Interpretation 9863] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [Interpretation 9870] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [Interpretation 9865] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [Interpretation 9876] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [Interpretation 9871] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preacher.js
|
||||
|
@ -213,15 +213,15 @@
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- [Interpretation 9868] Access Control Fields. -->
|
||||
<!-- [Interpretation 9863] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [Interpretation 9870] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [Interpretation 9865] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [Interpretation 9876] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [Interpretation 9871] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series.js
|
||||
|
@ -200,15 +200,15 @@
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- [Interpretation 9868] Access Control Fields. -->
|
||||
<!-- [Interpretation 9863] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [Interpretation 9870] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [Interpretation 9865] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [Interpretation 9876] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [Interpretation 9871] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermon.js
|
||||
@ -76,7 +76,7 @@ function vvvvvvv(source_vvvvvvv)
|
||||
var source = source_vvvvvvv.some(source_vvvvvvv_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (source)
|
||||
{
|
||||
jQuery('#jform_build').closest('.control-group').show();
|
||||
@ -107,7 +107,7 @@ function vvvvvvv(source_vvvvvvv)
|
||||
// the vvvvvvv Some function
|
||||
function source_vvvvvvv_SomeFunc(source_vvvvvvv)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (source_vvvvvvv == 2)
|
||||
{
|
||||
return true;
|
||||
@ -143,7 +143,7 @@ function vvvvvvw(source_vvvvvvw,build_vvvvvvw)
|
||||
var build = build_vvvvvvw.some(build_vvvvvvw_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (source && build)
|
||||
{
|
||||
jQuery('.note_auto_dropbox').closest('.control-group').show();
|
||||
@ -157,7 +157,7 @@ function vvvvvvw(source_vvvvvvw,build_vvvvvvw)
|
||||
// the vvvvvvw Some function
|
||||
function source_vvvvvvw_SomeFunc(source_vvvvvvw)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (source_vvvvvvw == 2)
|
||||
{
|
||||
return true;
|
||||
@ -168,7 +168,7 @@ function source_vvvvvvw_SomeFunc(source_vvvvvvw)
|
||||
// the vvvvvvw Some function
|
||||
function build_vvvvvvw_SomeFunc(build_vvvvvvw)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (build_vvvvvvw == 2)
|
||||
{
|
||||
return true;
|
||||
@ -204,7 +204,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
|
||||
var build = build_vvvvvvy.some(build_vvvvvvy_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (source && build)
|
||||
{
|
||||
jQuery('#jform_manual_files').closest('.control-group').show();
|
||||
@ -237,7 +237,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy)
|
||||
// the vvvvvvy Some function
|
||||
function source_vvvvvvy_SomeFunc(source_vvvvvvy)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (source_vvvvvvy == 2)
|
||||
{
|
||||
return true;
|
||||
@ -248,7 +248,7 @@ function source_vvvvvvy_SomeFunc(source_vvvvvvy)
|
||||
// the vvvvvvy Some function
|
||||
function build_vvvvvvy_SomeFunc(build_vvvvvvy)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (build_vvvvvvy == 1)
|
||||
{
|
||||
return true;
|
||||
@ -284,7 +284,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
|
||||
var source = source_vvvvvvz.some(source_vvvvvvz_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (build && source)
|
||||
{
|
||||
jQuery('#jform_manual_files').closest('.control-group').show();
|
||||
@ -317,7 +317,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz)
|
||||
// the vvvvvvz Some function
|
||||
function build_vvvvvvz_SomeFunc(build_vvvvvvz)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (build_vvvvvvz == 1)
|
||||
{
|
||||
return true;
|
||||
@ -328,7 +328,7 @@ function build_vvvvvvz_SomeFunc(build_vvvvvvz)
|
||||
// the vvvvvvz Some function
|
||||
function source_vvvvvvz_SomeFunc(source_vvvvvvz)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (source_vvvvvvz == 2)
|
||||
{
|
||||
return true;
|
||||
@ -352,7 +352,7 @@ function vvvvvwa(source_vvvvvwa)
|
||||
var source = source_vvvvvwa.some(source_vvvvvwa_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (source)
|
||||
{
|
||||
jQuery('#jform_local_files').closest('.control-group').show();
|
||||
@ -383,7 +383,7 @@ function vvvvvwa(source_vvvvvwa)
|
||||
// the vvvvvwa Some function
|
||||
function source_vvvvvwa_SomeFunc(source_vvvvvwa)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (source_vvvvvwa == 1)
|
||||
{
|
||||
return true;
|
||||
@ -407,7 +407,7 @@ function vvvvvwb(source_vvvvvwb)
|
||||
var source = source_vvvvvwb.some(source_vvvvvwb_SomeFunc);
|
||||
|
||||
|
||||
// [Interpretation 7763] set this function logic
|
||||
// [Interpretation 7758] set this function logic
|
||||
if (source)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
@ -438,7 +438,7 @@ function vvvvvwb(source_vvvvvwb)
|
||||
// the vvvvvwb Some function
|
||||
function source_vvvvvwb_SomeFunc(source_vvvvvwb)
|
||||
{
|
||||
// [Interpretation 7750] set the function logic
|
||||
// [Interpretation 7745] set the function logic
|
||||
if (source_vvvvvwb == 3)
|
||||
{
|
||||
return true;
|
||||
@ -449,7 +449,7 @@ function source_vvvvvwb_SomeFunc(source_vvvvvwb)
|
||||
// the vvvvvwc function
|
||||
function vvvvvwc(link_type_vvvvvwc)
|
||||
{
|
||||
// [Interpretation 7785] set the function logic
|
||||
// [Interpretation 7780] set the function logic
|
||||
if (link_type_vvvvvwc == 2)
|
||||
{
|
||||
jQuery('.note_link_directed').closest('.control-group').show();
|
||||
@ -463,7 +463,7 @@ function vvvvvwc(link_type_vvvvvwc)
|
||||
// the vvvvvwd function
|
||||
function vvvvvwd(link_type_vvvvvwd)
|
||||
{
|
||||
// [Interpretation 7785] set the function logic
|
||||
// [Interpretation 7780] set the function logic
|
||||
if (link_type_vvvvvwd == 1)
|
||||
{
|
||||
jQuery('.note_link_encrypted').closest('.control-group').show();
|
||||
|
@ -366,15 +366,15 @@
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- [Interpretation 9868] Access Control Fields. -->
|
||||
<!-- [Interpretation 9863] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [Interpretation 9870] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [Interpretation 9865] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [Interpretation 9876] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [Interpretation 9871] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistic.js
|
||||
|
@ -200,15 +200,15 @@
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- [Interpretation 9868] Access Control Fields. -->
|
||||
<!-- [Interpretation 9863] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [Interpretation 9870] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [Interpretation 9865] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [Interpretation 9876] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [Interpretation 9871] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_document.php
|
||||
@ -122,7 +122,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [Interpretation 9358] Get the form.
|
||||
{ // [Interpretation 9353] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -132,12 +132,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [Interpretation 9443] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [Interpretation 9438] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
if ($jinput->get('a_id'))
|
||||
{
|
||||
$id = $jinput->get('a_id', 0, 'INT');
|
||||
}
|
||||
// [Interpretation 9448] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [Interpretation 9443] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
else
|
||||
{
|
||||
$id = $jinput->get('id', 0, 'INT');
|
||||
@ -145,52 +145,52 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [Interpretation 9454] Check for existing item.
|
||||
// [Interpretation 9455] Modify the form based on Edit State access controls.
|
||||
// [Interpretation 9449] Check for existing item.
|
||||
// [Interpretation 9450] Modify the form based on Edit State access controls.
|
||||
if ($id != 0 && (!$user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('help_document.edit.state', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9468] Disable fields for display.
|
||||
// [Interpretation 9463] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [Interpretation 9471] Disable fields while saving.
|
||||
// [Interpretation 9466] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9476] If this is a new item insure the greated by is set.
|
||||
// [Interpretation 9471] If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9479] Set the created_by to this user
|
||||
// [Interpretation 9474] Set the created_by to this user
|
||||
$form->setValue('created_by', null, $user->id);
|
||||
}
|
||||
// [Interpretation 9482] Modify the form based on Edit Creaded By access controls.
|
||||
// [Interpretation 9477] Modify the form based on Edit Creaded By access controls.
|
||||
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
|
||||
{
|
||||
// [Interpretation 9494] Disable fields for display.
|
||||
// [Interpretation 9489] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [Interpretation 9496] Disable fields for display.
|
||||
// [Interpretation 9491] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [Interpretation 9498] Disable fields while saving.
|
||||
// [Interpretation 9493] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9501] Modify the form based on Edit Creaded Date access controls.
|
||||
// [Interpretation 9496] Modify the form based on Edit Creaded Date access controls.
|
||||
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
|
||||
{
|
||||
// [Interpretation 9513] Disable fields for display.
|
||||
// [Interpretation 9508] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [Interpretation 9515] Disable fields while saving.
|
||||
// [Interpretation 9510] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9548] Only load these values if no id is found
|
||||
// [Interpretation 9543] Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9551] Set redirected field name
|
||||
// [Interpretation 9546] Set redirected field name
|
||||
$redirectedField = $jinput->get('ref', null, 'STRING');
|
||||
// [Interpretation 9553] Set redirected field value
|
||||
// [Interpretation 9548] Set redirected field value
|
||||
$redirectedValue = $jinput->get('refid', 0, 'INT');
|
||||
if (0 != $redirectedValue && $redirectedField)
|
||||
{
|
||||
// [Interpretation 9557] Now set the local-redirected field default value
|
||||
// [Interpretation 9552] Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
@ -227,7 +227,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9679] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9674] The record has been set. Check the record permissions.
|
||||
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -249,14 +249,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9766] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9761] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9783] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9778] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('help_document.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9591] Check specific edit permission then general edit permission.
|
||||
// [Interpretation 9586] Check specific edit permission then general edit permission.
|
||||
$user = JFactory::getUser();
|
||||
|
||||
return $user->authorise('help_document.edit', 'com_sermondistributor.help_document.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('help_document.edit', 'com_sermondistributor');
|
||||
@ -370,20 +370,20 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
*/
|
||||
public function validate($form, $data, $group = null)
|
||||
{
|
||||
// [Interpretation 8552] check if the not_required field is set
|
||||
// [Interpretation 8547] check if the not_required field is set
|
||||
if (SermondistributorHelper::checkString($data['not_required']))
|
||||
{
|
||||
$requiredFields = (array) explode(',',(string) $data['not_required']);
|
||||
$requiredFields = array_unique($requiredFields);
|
||||
// [Interpretation 8557] now change the required field attributes value
|
||||
// [Interpretation 8552] now change the required field attributes value
|
||||
foreach ($requiredFields as $requiredField)
|
||||
{
|
||||
// [Interpretation 8560] make sure there is a string value
|
||||
// [Interpretation 8555] make sure there is a string value
|
||||
if (SermondistributorHelper::checkString($requiredField))
|
||||
{
|
||||
// [Interpretation 8563] change to false
|
||||
// [Interpretation 8558] change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// [Interpretation 8565] also clear the data set
|
||||
// [Interpretation 8560] also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_documents.php
|
||||
@ -113,16 +113,16 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [Interpretation 10357] check in items
|
||||
// [Interpretation 10352] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -133,7 +133,7 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [Interpretation 10503] decode groups
|
||||
// [Interpretation 10498] decode groups
|
||||
$groupsArray = json_decode($item->groups, true);
|
||||
if (SermondistributorHelper::checkArray($groupsArray))
|
||||
{
|
||||
@ -156,14 +156,14 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 10704] set selection value to a translatable value
|
||||
// [Interpretation 10699] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [Interpretation 10711] convert type
|
||||
// [Interpretation 10706] convert type
|
||||
$item->type = $this->selectionTranslation($item->type, 'type');
|
||||
// [Interpretation 10711] convert location
|
||||
// [Interpretation 10706] convert location
|
||||
$item->location = $this->selectionTranslation($item->location, 'location');
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,7 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// [Interpretation 10737] Array of type language strings
|
||||
// [Interpretation 10732] Array of type language strings
|
||||
if ($name == 'type')
|
||||
{
|
||||
$typeArray = array(
|
||||
@ -189,20 +189,20 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
|
||||
{
|
||||
return $typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [Interpretation 10737] Array of location language strings
|
||||
// [Interpretation 10732] Array of location language strings
|
||||
if ($name == 'location')
|
||||
{
|
||||
$locationArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
|
||||
{
|
||||
return $locationArray[$value];
|
||||
@ -270,22 +270,22 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 7540] Filter by Type.
|
||||
// [Interpretation 7535] Filter by Type.
|
||||
if ($type = $this->getState('filter.type'))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
|
||||
}
|
||||
// [Interpretation 7540] Filter by Location.
|
||||
// [Interpretation 7535] Filter by Location.
|
||||
if ($location = $this->getState('filter.location'))
|
||||
{
|
||||
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
|
||||
}
|
||||
// [Interpretation 7540] Filter by Admin_view.
|
||||
// [Interpretation 7535] Filter by Admin_view.
|
||||
if ($admin_view = $this->getState('filter.admin_view'))
|
||||
{
|
||||
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
|
||||
}
|
||||
// [Interpretation 7540] Filter by Site_view.
|
||||
// [Interpretation 7535] Filter by Site_view.
|
||||
if ($site_view = $this->getState('filter.site_view'))
|
||||
{
|
||||
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
|
||||
@ -343,10 +343,10 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -357,13 +357,13 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [Interpretation 10651] unset the values we don't want exported.
|
||||
// [Interpretation 10646] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [Interpretation 10660] Add headers to items array.
|
||||
// [Interpretation 10655] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -410,7 +410,7 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [Interpretation 9975] Compile the store id.
|
||||
// [Interpretation 9970] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -434,15 +434,15 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [Interpretation 10373] Get set check in time
|
||||
// [Interpretation 10368] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [Interpretation 10378] Get a db connection.
|
||||
// [Interpretation 10373] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [Interpretation 10380] reset query
|
||||
// [Interpretation 10375] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document'));
|
||||
@ -450,24 +450,24 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [Interpretation 10388] Get Yesterdays date
|
||||
// [Interpretation 10383] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [Interpretation 10390] reset query
|
||||
// [Interpretation 10385] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [Interpretation 10392] Fields to update.
|
||||
// [Interpretation 10387] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [Interpretation 10397] Conditions for which records should be updated.
|
||||
// [Interpretation 10392] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [Interpretation 10402] Check table
|
||||
// [Interpretation 10397] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage import.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preacher.php
|
||||
@ -176,10 +176,10 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -193,14 +193,14 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 10704] set selection value to a translatable value
|
||||
// [Interpretation 10699] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [Interpretation 10711] convert link_type
|
||||
// [Interpretation 10706] convert link_type
|
||||
$item->link_type = $this->selectionTranslationVvvsermons($item->link_type, 'link_type');
|
||||
// [Interpretation 10711] convert source
|
||||
// [Interpretation 10706] convert source
|
||||
$item->source = $this->selectionTranslationVvvsermons($item->source, 'source');
|
||||
}
|
||||
}
|
||||
@ -217,20 +217,20 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
*/
|
||||
public function selectionTranslationVvvsermons($value,$name)
|
||||
{
|
||||
// [Interpretation 10737] Array of link_type language strings
|
||||
// [Interpretation 10732] Array of link_type language strings
|
||||
if ($name == 'link_type')
|
||||
{
|
||||
$link_typeArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
|
||||
{
|
||||
return $link_typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [Interpretation 10737] Array of source language strings
|
||||
// [Interpretation 10732] Array of source language strings
|
||||
if ($name == 'source')
|
||||
{
|
||||
$sourceArray = array(
|
||||
@ -239,7 +239,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
|
||||
{
|
||||
return $sourceArray[$value];
|
||||
@ -259,7 +259,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [Interpretation 9358] Get the form.
|
||||
{ // [Interpretation 9353] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -269,12 +269,12 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [Interpretation 9443] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [Interpretation 9438] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
if ($jinput->get('a_id'))
|
||||
{
|
||||
$id = $jinput->get('a_id', 0, 'INT');
|
||||
}
|
||||
// [Interpretation 9448] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [Interpretation 9443] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
else
|
||||
{
|
||||
$id = $jinput->get('id', 0, 'INT');
|
||||
@ -282,54 +282,54 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [Interpretation 9454] Check for existing item.
|
||||
// [Interpretation 9455] Modify the form based on Edit State access controls.
|
||||
// [Interpretation 9449] Check for existing item.
|
||||
// [Interpretation 9450] Modify the form based on Edit State access controls.
|
||||
if ($id != 0 && (!$user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('preacher.edit.state', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9468] Disable fields for display.
|
||||
// [Interpretation 9463] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [Interpretation 9471] Disable fields while saving.
|
||||
// [Interpretation 9466] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9476] If this is a new item insure the greated by is set.
|
||||
// [Interpretation 9471] If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9479] Set the created_by to this user
|
||||
// [Interpretation 9474] Set the created_by to this user
|
||||
$form->setValue('created_by', null, $user->id);
|
||||
}
|
||||
// [Interpretation 9482] Modify the form based on Edit Creaded By access controls.
|
||||
// [Interpretation 9477] Modify the form based on Edit Creaded By access controls.
|
||||
if ($id != 0 && (!$user->authorise('preacher.edit.created_by', 'com_sermondistributor.preacher.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('preacher.edit.created_by', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9494] Disable fields for display.
|
||||
// [Interpretation 9489] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [Interpretation 9496] Disable fields for display.
|
||||
// [Interpretation 9491] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [Interpretation 9498] Disable fields while saving.
|
||||
// [Interpretation 9493] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9501] Modify the form based on Edit Creaded Date access controls.
|
||||
// [Interpretation 9496] Modify the form based on Edit Creaded Date access controls.
|
||||
if ($id != 0 && (!$user->authorise('preacher.edit.created', 'com_sermondistributor.preacher.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('preacher.edit.created', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9513] Disable fields for display.
|
||||
// [Interpretation 9508] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [Interpretation 9515] Disable fields while saving.
|
||||
// [Interpretation 9510] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9548] Only load these values if no id is found
|
||||
// [Interpretation 9543] Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9551] Set redirected field name
|
||||
// [Interpretation 9546] Set redirected field name
|
||||
$redirectedField = $jinput->get('ref', null, 'STRING');
|
||||
// [Interpretation 9553] Set redirected field value
|
||||
// [Interpretation 9548] Set redirected field value
|
||||
$redirectedValue = $jinput->get('refid', 0, 'INT');
|
||||
if (0 != $redirectedValue && $redirectedField)
|
||||
{
|
||||
// [Interpretation 9557] Now set the local-redirected field default value
|
||||
// [Interpretation 9552] Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
@ -366,7 +366,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9679] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9674] The record has been set. Check the record permissions.
|
||||
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -388,14 +388,14 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9766] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9761] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9783] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9778] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('preacher.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9591] Check specific edit permission then general edit permission.
|
||||
// [Interpretation 9586] Check specific edit permission then general edit permission.
|
||||
$user = JFactory::getUser();
|
||||
|
||||
return $user->authorise('preacher.edit', 'com_sermondistributor.preacher.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('preacher.edit', 'com_sermondistributor');
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preachers.php
|
||||
@ -101,16 +101,16 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [Interpretation 10357] check in items
|
||||
// [Interpretation 10352] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -240,10 +240,10 @@ class SermondistributorModelPreachers extends JModelList
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -254,13 +254,13 @@ class SermondistributorModelPreachers extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [Interpretation 10651] unset the values we don't want exported.
|
||||
// [Interpretation 10646] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [Interpretation 10660] Add headers to items array.
|
||||
// [Interpretation 10655] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -307,7 +307,7 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [Interpretation 9975] Compile the store id.
|
||||
// [Interpretation 9970] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -328,15 +328,15 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [Interpretation 10373] Get set check in time
|
||||
// [Interpretation 10368] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [Interpretation 10378] Get a db connection.
|
||||
// [Interpretation 10373] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [Interpretation 10380] reset query
|
||||
// [Interpretation 10375] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_preacher'));
|
||||
@ -344,24 +344,24 @@ class SermondistributorModelPreachers extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [Interpretation 10388] Get Yesterdays date
|
||||
// [Interpretation 10383] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [Interpretation 10390] reset query
|
||||
// [Interpretation 10385] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [Interpretation 10392] Fields to update.
|
||||
// [Interpretation 10387] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [Interpretation 10397] Conditions for which records should be updated.
|
||||
// [Interpretation 10392] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [Interpretation 10402] Check table
|
||||
// [Interpretation 10397] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series.php
|
||||
@ -176,10 +176,10 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -193,14 +193,14 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 10704] set selection value to a translatable value
|
||||
// [Interpretation 10699] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [Interpretation 10711] convert link_type
|
||||
// [Interpretation 10706] convert link_type
|
||||
$item->link_type = $this->selectionTranslationVwcsermons($item->link_type, 'link_type');
|
||||
// [Interpretation 10711] convert source
|
||||
// [Interpretation 10706] convert source
|
||||
$item->source = $this->selectionTranslationVwcsermons($item->source, 'source');
|
||||
}
|
||||
}
|
||||
@ -217,20 +217,20 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
*/
|
||||
public function selectionTranslationVwcsermons($value,$name)
|
||||
{
|
||||
// [Interpretation 10737] Array of link_type language strings
|
||||
// [Interpretation 10732] Array of link_type language strings
|
||||
if ($name == 'link_type')
|
||||
{
|
||||
$link_typeArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
|
||||
{
|
||||
return $link_typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [Interpretation 10737] Array of source language strings
|
||||
// [Interpretation 10732] Array of source language strings
|
||||
if ($name == 'source')
|
||||
{
|
||||
$sourceArray = array(
|
||||
@ -239,7 +239,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
|
||||
{
|
||||
return $sourceArray[$value];
|
||||
@ -259,7 +259,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [Interpretation 9358] Get the form.
|
||||
{ // [Interpretation 9353] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -269,12 +269,12 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [Interpretation 9443] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [Interpretation 9438] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
if ($jinput->get('a_id'))
|
||||
{
|
||||
$id = $jinput->get('a_id', 0, 'INT');
|
||||
}
|
||||
// [Interpretation 9448] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [Interpretation 9443] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
else
|
||||
{
|
||||
$id = $jinput->get('id', 0, 'INT');
|
||||
@ -282,54 +282,54 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [Interpretation 9454] Check for existing item.
|
||||
// [Interpretation 9455] Modify the form based on Edit State access controls.
|
||||
// [Interpretation 9449] Check for existing item.
|
||||
// [Interpretation 9450] Modify the form based on Edit State access controls.
|
||||
if ($id != 0 && (!$user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('series.edit.state', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9468] Disable fields for display.
|
||||
// [Interpretation 9463] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [Interpretation 9471] Disable fields while saving.
|
||||
// [Interpretation 9466] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9476] If this is a new item insure the greated by is set.
|
||||
// [Interpretation 9471] If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9479] Set the created_by to this user
|
||||
// [Interpretation 9474] Set the created_by to this user
|
||||
$form->setValue('created_by', null, $user->id);
|
||||
}
|
||||
// [Interpretation 9482] Modify the form based on Edit Creaded By access controls.
|
||||
// [Interpretation 9477] Modify the form based on Edit Creaded By access controls.
|
||||
if ($id != 0 && (!$user->authorise('series.edit.created_by', 'com_sermondistributor.series.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('series.edit.created_by', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9494] Disable fields for display.
|
||||
// [Interpretation 9489] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [Interpretation 9496] Disable fields for display.
|
||||
// [Interpretation 9491] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [Interpretation 9498] Disable fields while saving.
|
||||
// [Interpretation 9493] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9501] Modify the form based on Edit Creaded Date access controls.
|
||||
// [Interpretation 9496] Modify the form based on Edit Creaded Date access controls.
|
||||
if ($id != 0 && (!$user->authorise('series.edit.created', 'com_sermondistributor.series.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('series.edit.created', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9513] Disable fields for display.
|
||||
// [Interpretation 9508] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [Interpretation 9515] Disable fields while saving.
|
||||
// [Interpretation 9510] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9548] Only load these values if no id is found
|
||||
// [Interpretation 9543] Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9551] Set redirected field name
|
||||
// [Interpretation 9546] Set redirected field name
|
||||
$redirectedField = $jinput->get('ref', null, 'STRING');
|
||||
// [Interpretation 9553] Set redirected field value
|
||||
// [Interpretation 9548] Set redirected field value
|
||||
$redirectedValue = $jinput->get('refid', 0, 'INT');
|
||||
if (0 != $redirectedValue && $redirectedField)
|
||||
{
|
||||
// [Interpretation 9557] Now set the local-redirected field default value
|
||||
// [Interpretation 9552] Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
@ -366,7 +366,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9679] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9674] The record has been set. Check the record permissions.
|
||||
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -388,14 +388,14 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9766] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9761] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9783] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9778] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('series.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9591] Check specific edit permission then general edit permission.
|
||||
// [Interpretation 9586] Check specific edit permission then general edit permission.
|
||||
$user = JFactory::getUser();
|
||||
|
||||
return $user->authorise('series.edit', 'com_sermondistributor.series.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('series.edit', 'com_sermondistributor');
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series_list.php
|
||||
@ -97,16 +97,16 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [Interpretation 10357] check in items
|
||||
// [Interpretation 10352] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -236,10 +236,10 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -250,13 +250,13 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [Interpretation 10651] unset the values we don't want exported.
|
||||
// [Interpretation 10646] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [Interpretation 10660] Add headers to items array.
|
||||
// [Interpretation 10655] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -303,7 +303,7 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [Interpretation 9975] Compile the store id.
|
||||
// [Interpretation 9970] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -323,15 +323,15 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [Interpretation 10373] Get set check in time
|
||||
// [Interpretation 10368] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [Interpretation 10378] Get a db connection.
|
||||
// [Interpretation 10373] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [Interpretation 10380] reset query
|
||||
// [Interpretation 10375] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_series'));
|
||||
@ -339,24 +339,24 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [Interpretation 10388] Get Yesterdays date
|
||||
// [Interpretation 10383] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [Interpretation 10390] reset query
|
||||
// [Interpretation 10385] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [Interpretation 10392] Fields to update.
|
||||
// [Interpretation 10387] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [Interpretation 10397] Conditions for which records should be updated.
|
||||
// [Interpretation 10392] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [Interpretation 10402] Check table
|
||||
// [Interpretation 10397] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermon.php
|
||||
@ -190,10 +190,10 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -222,7 +222,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [Interpretation 9358] Get the form.
|
||||
{ // [Interpretation 9353] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -232,17 +232,17 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [Interpretation 9385] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [Interpretation 9380] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
if ($jinput->get('a_id'))
|
||||
{
|
||||
$id = $jinput->get('a_id', 0, 'INT');
|
||||
}
|
||||
// [Interpretation 9390] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [Interpretation 9385] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
else
|
||||
{
|
||||
$id = $jinput->get('id', 0, 'INT');
|
||||
}
|
||||
// [Interpretation 9395] Determine correct permissions to check.
|
||||
// [Interpretation 9390] Determine correct permissions to check.
|
||||
if ($this->getState('sermon.id'))
|
||||
{
|
||||
$id = $this->getState('sermon.id');
|
||||
@ -250,74 +250,74 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$catid = 0;
|
||||
if (isset($this->getItem($id)->catid))
|
||||
{
|
||||
// [Interpretation 9402] set catagory id
|
||||
// [Interpretation 9397] set catagory id
|
||||
$catid = $this->getItem($id)->catid;
|
||||
|
||||
// [Interpretation 9404] Existing record. Can only edit in selected categories.
|
||||
// [Interpretation 9399] Existing record. Can only edit in selected categories.
|
||||
$form->setFieldAttribute('catid', 'action', 'core.edit');
|
||||
|
||||
// [Interpretation 9406] Existing record. Can only edit own items in selected categories.
|
||||
// [Interpretation 9401] Existing record. Can only edit own items in selected categories.
|
||||
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// [Interpretation 9412] New record. Can only create in selected categories.
|
||||
// [Interpretation 9407] New record. Can only create in selected categories.
|
||||
$form->setFieldAttribute('catid', 'action', 'core.create');
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [Interpretation 9416] Check for existing item.
|
||||
// [Interpretation 9417] Modify the form based on Edit State access controls.
|
||||
// [Interpretation 9411] Check for existing item.
|
||||
// [Interpretation 9412] Modify the form based on Edit State access controls.
|
||||
if ($id != 0 && (!$user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $id))
|
||||
|| (isset($catid) && $catid != 0 && !$user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $catid))
|
||||
|| ($id == 0 && !$user->authorise('sermon.edit.state', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9432] Disable fields for display.
|
||||
// [Interpretation 9427] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
|
||||
// [Interpretation 9435] Disable fields while saving.
|
||||
// [Interpretation 9430] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9476] If this is a new item insure the greated by is set.
|
||||
// [Interpretation 9471] If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9479] Set the created_by to this user
|
||||
// [Interpretation 9474] Set the created_by to this user
|
||||
$form->setValue('created_by', null, $user->id);
|
||||
}
|
||||
// [Interpretation 9482] Modify the form based on Edit Creaded By access controls.
|
||||
// [Interpretation 9477] Modify the form based on Edit Creaded By access controls.
|
||||
if ($id != 0 && (!$user->authorise('sermon.edit.created_by', 'com_sermondistributor.sermon.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('sermon.edit.created_by', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9494] Disable fields for display.
|
||||
// [Interpretation 9489] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [Interpretation 9496] Disable fields for display.
|
||||
// [Interpretation 9491] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [Interpretation 9498] Disable fields while saving.
|
||||
// [Interpretation 9493] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9501] Modify the form based on Edit Creaded Date access controls.
|
||||
// [Interpretation 9496] Modify the form based on Edit Creaded Date access controls.
|
||||
if ($id != 0 && (!$user->authorise('sermon.edit.created', 'com_sermondistributor.sermon.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('sermon.edit.created', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9513] Disable fields for display.
|
||||
// [Interpretation 9508] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [Interpretation 9515] Disable fields while saving.
|
||||
// [Interpretation 9510] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9548] Only load these values if no id is found
|
||||
// [Interpretation 9543] Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9551] Set redirected field name
|
||||
// [Interpretation 9546] Set redirected field name
|
||||
$redirectedField = $jinput->get('ref', null, 'STRING');
|
||||
// [Interpretation 9553] Set redirected field value
|
||||
// [Interpretation 9548] Set redirected field value
|
||||
$redirectedValue = $jinput->get('refid', 0, 'INT');
|
||||
if (0 != $redirectedValue && $redirectedField)
|
||||
{
|
||||
// [Interpretation 9557] Now set the local-redirected field default value
|
||||
// [Interpretation 9552] Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
@ -358,7 +358,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
if ($allow)
|
||||
{
|
||||
// [Interpretation 9650] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9645] The record has been set. Check the record permissions.
|
||||
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
|
||||
}
|
||||
return $allow;
|
||||
@ -382,14 +382,14 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9723] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9718] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9739] Check against the category.
|
||||
// [Interpretation 9734] Check against the category.
|
||||
if (!empty($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;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9750] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9745] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('sermon.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9591] Check specific edit permission then general edit permission.
|
||||
// [Interpretation 9586] Check specific edit permission then general edit permission.
|
||||
$user = JFactory::getUser();
|
||||
|
||||
return $user->authorise('sermon.edit', 'com_sermondistributor.sermon.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('sermon.edit', 'com_sermondistributor');
|
||||
@ -512,20 +512,20 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
*/
|
||||
public function validate($form, $data, $group = null)
|
||||
{
|
||||
// [Interpretation 8552] check if the not_required field is set
|
||||
// [Interpretation 8547] check if the not_required field is set
|
||||
if (SermondistributorHelper::checkString($data['not_required']))
|
||||
{
|
||||
$requiredFields = (array) explode(',',(string) $data['not_required']);
|
||||
$requiredFields = array_unique($requiredFields);
|
||||
// [Interpretation 8557] now change the required field attributes value
|
||||
// [Interpretation 8552] now change the required field attributes value
|
||||
foreach ($requiredFields as $requiredField)
|
||||
{
|
||||
// [Interpretation 8560] make sure there is a string value
|
||||
// [Interpretation 8555] make sure there is a string value
|
||||
if (SermondistributorHelper::checkString($requiredField))
|
||||
{
|
||||
// [Interpretation 8563] change to false
|
||||
// [Interpretation 8558] change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// [Interpretation 8565] also clear the data set
|
||||
// [Interpretation 8560] also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermondistributor.php
|
||||
@ -45,7 +45,7 @@ class SermondistributorModelSermondistributor extends JModelList
|
||||
$viewGroups = array(
|
||||
'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.help_documents')
|
||||
);
|
||||
// [Interpretation 10820] view access array
|
||||
// [Interpretation 10815] view access array
|
||||
$viewAccess = array(
|
||||
'preacher.create' => 'preacher.create',
|
||||
'preachers.access' => 'preacher.access',
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermons.php
|
||||
@ -129,16 +129,16 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [Interpretation 10357] check in items
|
||||
// [Interpretation 10352] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -152,14 +152,14 @@ class SermondistributorModelSermons extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 10704] set selection value to a translatable value
|
||||
// [Interpretation 10699] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [Interpretation 10711] convert link_type
|
||||
// [Interpretation 10706] convert link_type
|
||||
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
|
||||
// [Interpretation 10711] convert source
|
||||
// [Interpretation 10706] convert source
|
||||
$item->source = $this->selectionTranslation($item->source, 'source');
|
||||
}
|
||||
}
|
||||
@ -176,20 +176,20 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// [Interpretation 10737] Array of link_type language strings
|
||||
// [Interpretation 10732] Array of link_type language strings
|
||||
if ($name == 'link_type')
|
||||
{
|
||||
$link_typeArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
|
||||
{
|
||||
return $link_typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [Interpretation 10737] Array of source language strings
|
||||
// [Interpretation 10732] Array of source language strings
|
||||
if ($name == 'source')
|
||||
{
|
||||
$sourceArray = array(
|
||||
@ -198,7 +198,7 @@ class SermondistributorModelSermons extends JModelList
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
|
||||
);
|
||||
// [Interpretation 10768] Now check if value is found in this array
|
||||
// [Interpretation 10763] Now check if value is found in this array
|
||||
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
|
||||
{
|
||||
return $sourceArray[$value];
|
||||
@ -276,22 +276,22 @@ class SermondistributorModelSermons extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 7531] Filter by preacher.
|
||||
// [Interpretation 7526] Filter by preacher.
|
||||
if ($preacher = $this->getState('filter.preacher'))
|
||||
{
|
||||
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
|
||||
}
|
||||
// [Interpretation 7531] Filter by series.
|
||||
// [Interpretation 7526] Filter by series.
|
||||
if ($series = $this->getState('filter.series'))
|
||||
{
|
||||
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
|
||||
}
|
||||
// [Interpretation 7540] Filter by Link_type.
|
||||
// [Interpretation 7535] Filter by Link_type.
|
||||
if ($link_type = $this->getState('filter.link_type'))
|
||||
{
|
||||
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
|
||||
}
|
||||
// [Interpretation 7540] Filter by Source.
|
||||
// [Interpretation 7535] Filter by Source.
|
||||
if ($source = $this->getState('filter.source'))
|
||||
{
|
||||
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
|
||||
@ -371,10 +371,10 @@ class SermondistributorModelSermons extends JModelList
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -385,13 +385,13 @@ class SermondistributorModelSermons extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [Interpretation 10651] unset the values we don't want exported.
|
||||
// [Interpretation 10646] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [Interpretation 10660] Add headers to items array.
|
||||
// [Interpretation 10655] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -438,7 +438,7 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [Interpretation 9975] Compile the store id.
|
||||
// [Interpretation 9970] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -466,15 +466,15 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [Interpretation 10373] Get set check in time
|
||||
// [Interpretation 10368] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [Interpretation 10378] Get a db connection.
|
||||
// [Interpretation 10373] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [Interpretation 10380] reset query
|
||||
// [Interpretation 10375] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_sermon'));
|
||||
@ -482,24 +482,24 @@ class SermondistributorModelSermons extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [Interpretation 10388] Get Yesterdays date
|
||||
// [Interpretation 10383] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [Interpretation 10390] reset query
|
||||
// [Interpretation 10385] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [Interpretation 10392] Fields to update.
|
||||
// [Interpretation 10387] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [Interpretation 10397] Conditions for which records should be updated.
|
||||
// [Interpretation 10392] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [Interpretation 10402] Check table
|
||||
// [Interpretation 10397] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistic.php
|
||||
@ -116,7 +116,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [Interpretation 9358] Get the form.
|
||||
{ // [Interpretation 9353] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -126,12 +126,12 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [Interpretation 9443] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [Interpretation 9438] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
if ($jinput->get('a_id'))
|
||||
{
|
||||
$id = $jinput->get('a_id', 0, 'INT');
|
||||
}
|
||||
// [Interpretation 9448] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [Interpretation 9443] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
else
|
||||
{
|
||||
$id = $jinput->get('id', 0, 'INT');
|
||||
@ -139,54 +139,54 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [Interpretation 9454] Check for existing item.
|
||||
// [Interpretation 9455] Modify the form based on Edit State access controls.
|
||||
// [Interpretation 9449] Check for existing item.
|
||||
// [Interpretation 9450] Modify the form based on Edit State access controls.
|
||||
if ($id != 0 && (!$user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('statistic.edit.state', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9468] Disable fields for display.
|
||||
// [Interpretation 9463] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [Interpretation 9471] Disable fields while saving.
|
||||
// [Interpretation 9466] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9476] If this is a new item insure the greated by is set.
|
||||
// [Interpretation 9471] If this is a new item insure the greated by is set.
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9479] Set the created_by to this user
|
||||
// [Interpretation 9474] Set the created_by to this user
|
||||
$form->setValue('created_by', null, $user->id);
|
||||
}
|
||||
// [Interpretation 9482] Modify the form based on Edit Creaded By access controls.
|
||||
// [Interpretation 9477] Modify the form based on Edit Creaded By access controls.
|
||||
if ($id != 0 && (!$user->authorise('statistic.edit.created_by', 'com_sermondistributor.statistic.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('statistic.edit.created_by', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9494] Disable fields for display.
|
||||
// [Interpretation 9489] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [Interpretation 9496] Disable fields for display.
|
||||
// [Interpretation 9491] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [Interpretation 9498] Disable fields while saving.
|
||||
// [Interpretation 9493] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9501] Modify the form based on Edit Creaded Date access controls.
|
||||
// [Interpretation 9496] Modify the form based on Edit Creaded Date access controls.
|
||||
if ($id != 0 && (!$user->authorise('statistic.edit.created', 'com_sermondistributor.statistic.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('statistic.edit.created', 'com_sermondistributor')))
|
||||
{
|
||||
// [Interpretation 9513] Disable fields for display.
|
||||
// [Interpretation 9508] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [Interpretation 9515] Disable fields while saving.
|
||||
// [Interpretation 9510] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
// [Interpretation 9548] Only load these values if no id is found
|
||||
// [Interpretation 9543] Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
// [Interpretation 9551] Set redirected field name
|
||||
// [Interpretation 9546] Set redirected field name
|
||||
$redirectedField = $jinput->get('ref', null, 'STRING');
|
||||
// [Interpretation 9553] Set redirected field value
|
||||
// [Interpretation 9548] Set redirected field value
|
||||
$redirectedValue = $jinput->get('refid', 0, 'INT');
|
||||
if (0 != $redirectedValue && $redirectedField)
|
||||
{
|
||||
// [Interpretation 9557] Now set the local-redirected field default value
|
||||
// [Interpretation 9552] Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
@ -223,7 +223,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [Interpretation 9679] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9674] The record has been set. Check the record permissions.
|
||||
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -245,14 +245,14 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [Interpretation 9766] The record has been set. Check the record permissions.
|
||||
// [Interpretation 9761] The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [Interpretation 9783] In the absense of better information, revert to the component permissions.
|
||||
// [Interpretation 9778] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('statistic.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [Interpretation 9591] Check specific edit permission then general edit permission.
|
||||
// [Interpretation 9586] Check specific edit permission then general edit permission.
|
||||
$user = JFactory::getUser();
|
||||
|
||||
return $user->authorise('statistic.edit', 'com_sermondistributor.statistic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('statistic.edit', 'com_sermondistributor');
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage statistics.php
|
||||
@ -113,16 +113,16 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [Interpretation 10357] check in items
|
||||
// [Interpretation 10352] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -211,17 +211,17 @@ class SermondistributorModelStatistics extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [Interpretation 7531] Filter by sermon.
|
||||
// [Interpretation 7526] Filter by sermon.
|
||||
if ($sermon = $this->getState('filter.sermon'))
|
||||
{
|
||||
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
|
||||
}
|
||||
// [Interpretation 7531] Filter by preacher.
|
||||
// [Interpretation 7526] Filter by preacher.
|
||||
if ($preacher = $this->getState('filter.preacher'))
|
||||
{
|
||||
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
|
||||
}
|
||||
// [Interpretation 7531] Filter by series.
|
||||
// [Interpretation 7526] Filter by series.
|
||||
if ($series = $this->getState('filter.series'))
|
||||
{
|
||||
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
|
||||
@ -279,10 +279,10 @@ class SermondistributorModelStatistics extends JModelList
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [Interpretation 10432] set values to display correctly.
|
||||
// [Interpretation 10427] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [Interpretation 10435] get user object.
|
||||
// [Interpretation 10430] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -293,13 +293,13 @@ class SermondistributorModelStatistics extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [Interpretation 10651] unset the values we don't want exported.
|
||||
// [Interpretation 10646] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [Interpretation 10660] Add headers to items array.
|
||||
// [Interpretation 10655] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -346,7 +346,7 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [Interpretation 9975] Compile the store id.
|
||||
// [Interpretation 9970] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -370,15 +370,15 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [Interpretation 10373] Get set check in time
|
||||
// [Interpretation 10368] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [Interpretation 10378] Get a db connection.
|
||||
// [Interpretation 10373] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [Interpretation 10380] reset query
|
||||
// [Interpretation 10375] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_statistic'));
|
||||
@ -386,24 +386,24 @@ class SermondistributorModelStatistics extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [Interpretation 10388] Get Yesterdays date
|
||||
// [Interpretation 10383] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [Interpretation 10390] reset query
|
||||
// [Interpretation 10385] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [Interpretation 10392] Fields to update.
|
||||
// [Interpretation 10387] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [Interpretation 10397] Conditions for which records should be updated.
|
||||
// [Interpretation 10392] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [Interpretation 10402] Check table
|
||||
// [Interpretation 10397] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage sermondistributor.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage help_document.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage preacher.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.3.3
|
||||
@build 2nd July, 2016
|
||||
@build 13th July, 2016
|
||||
@created 22nd October, 2015
|
||||
@package Sermon Distributor
|
||||
@subpackage series.php
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user