Update the componet with the improvements made to JCB v2.8.10

This commit is contained in:
Llewellyn van der Merwe 2018-07-20 06:39:01 +02:00
parent cec103ecd8
commit da72b43a11
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
55 changed files with 661 additions and 689 deletions

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 5th May, 2018
+ *Last Build*: 28th June, 2018
+ *Version*: 2.0.x
+ *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-builder
> (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*: **66759**
+ *Line count*: **66731**
+ *File count*: **445**
+ *Folder count*: **93**

View File

@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 5th May, 2018
+ *Last Build*: 28th June, 2018
+ *Version*: 2.0.x
+ *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-builder
> (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*: **66759**
+ *Line count*: **66731**
+ *File count*: **445**
+ *Folder count*: **93**

View File

@ -3613,7 +3613,7 @@ abstract class SermondistributorHelper
}
}
// check if there are any view values remaining
if (count($_result))
if (count((array)$_result))
{
$_result = json_encode($_result);
$_result = array($_result);
@ -3807,7 +3807,7 @@ abstract class SermondistributorHelper
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count($array) > 0)
if (isset($array) && is_array($array) && count((array)$array) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -3910,7 +3910,7 @@ abstract class SermondistributorHelper
{
$initial = strlen($string);
$words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE);
$words_count = count($words);
$words_count = count((array)$words);
$word_length = 0;
$last_word = 0;

View File

@ -1513,3 +1513,4 @@ COM_SERMONDISTRIBUTOR_VIEW_UPDATE_STATUS="View Update Status"
COM_SERMONDISTRIBUTOR_WEBSITE="Website"
COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING="You do not have permission to clear local listing."
COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS="You do not have permission to reset update status."
PREACHERS_PREACHER_DETAILS="Preacher Details"

View File

@ -85,30 +85,30 @@ $can = SermondistributorHelper::getActions('sermon');
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
<td class="nowrap">
<td>
<?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=preacher&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->name); ?></div>
<?php echo $displayData->escape($item->name); ?>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->preacher_name); ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?>&ref=preacher&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->series_name); ?></a>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->series_name); ?></div>
<?php echo $displayData->escape($item->series_name); ?>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->short_description); ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_sermondistributor.sermons"><?php echo $displayData->escape($item->category_title); ?></a>
<?php else: ?>

View File

@ -81,21 +81,21 @@ $can = SermondistributorHelper::getActions('sermon');
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
<td class="nowrap">
<td>
<?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=series&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->name); ?></div>
<?php echo $displayData->escape($item->name); ?>
<?php endif; ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?>&ref=series&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->preacher_name); ?></div>
<?php echo $displayData->escape($item->preacher_name); ?>
<?php endif; ?>
</td>
<td>
@ -104,7 +104,7 @@ $can = SermondistributorHelper::getActions('sermon');
<td>
<?php echo $displayData->escape($item->short_description); ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_sermondistributor.sermons"><?php echo $displayData->escape($item->category_title); ?></a>
<?php else: ?>

View File

@ -69,31 +69,31 @@ $edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.e
$canDo = SermondistributorHelper::getActions('statistic',$item,'statistics');
?>
<tr>
<td class="nowrap">
<td>
<?php if ($canDo->get('statistic.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=sermon&refid=<?php echo $id; ?>"><?php echo $item->filename; ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $item->filename; ?></div>
<?php echo $item->filename; ?>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->sermon_name); ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?>&ref=sermon&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->preacher_name); ?></div>
<?php echo $displayData->escape($item->preacher_name); ?>
<?php endif; ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?>&ref=sermon&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->series_name); ?></a>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->series_name); ?></div>
<?php echo $displayData->escape($item->series_name); ?>
<?php endif; ?>
</td>
<td>

View File

@ -117,11 +117,9 @@ class SermondistributorModelExternal_sources extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $item->id) && $user->authorise('external_source.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $item->id) && JFactory::getUser()->authorise('external_source.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -375,11 +373,9 @@ class SermondistributorModelExternal_sources extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $item->id) && $user->authorise('external_source.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $item->id) && JFactory::getUser()->authorise('external_source.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -121,11 +121,9 @@ class SermondistributorModelHelp_documents extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $item->id) && $user->authorise('help_document.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $item->id) && JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -345,11 +343,9 @@ class SermondistributorModelHelp_documents extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $item->id) && $user->authorise('help_document.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $item->id) && JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -121,11 +121,9 @@ class SermondistributorModelLocal_listings extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $item->id) && $user->authorise('local_listing.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $item->id) && JFactory::getUser()->authorise('local_listing.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -287,11 +285,9 @@ class SermondistributorModelLocal_listings extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $item->id) && $user->authorise('local_listing.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $item->id) && JFactory::getUser()->authorise('local_listing.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -178,11 +178,9 @@ class SermondistributorModelPreacher extends JModelAdmin
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && $user->authorise('sermon.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -109,11 +109,9 @@ class SermondistributorModelPreachers extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $item->id) && $user->authorise('preacher.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $item->id) && JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -242,11 +240,9 @@ class SermondistributorModelPreachers extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $item->id) && $user->authorise('preacher.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $item->id) && JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -178,11 +178,9 @@ class SermondistributorModelSeries extends JModelAdmin
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && $user->authorise('sermon.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -105,11 +105,9 @@ class SermondistributorModelSeries_list extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $item->id) && $user->authorise('series.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('series.access', 'com_sermondistributor.series.' . (int) $item->id) && JFactory::getUser()->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -238,11 +236,9 @@ class SermondistributorModelSeries_list extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $item->id) && $user->authorise('series.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('series.access', 'com_sermondistributor.series.' . (int) $item->id) && JFactory::getUser()->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -192,11 +192,9 @@ class SermondistributorModelSermon extends JModelAdmin
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $item->id) && $user->authorise('statistic.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $item->id) && JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -137,11 +137,9 @@ class SermondistributorModelSermons extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && $user->authorise('sermon.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -373,11 +371,9 @@ class SermondistributorModelSermons extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && $user->authorise('sermon.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $item->id) && JFactory::getUser()->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -121,11 +121,9 @@ class SermondistributorModelStatistics extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $item->id) && $user->authorise('statistic.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $item->id) && JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);
@ -281,11 +279,9 @@ class SermondistributorModelStatistics extends JModelList
// set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $item->id) && $user->authorise('statistic.access', 'com_sermondistributor'));
$access = (JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $item->id) && JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
unset($items[$nr]);

View File

@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=external_sources&task=exter
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('external_source.edit')): ?>
<div class="name">
<?php if ($canDo->get('external_source.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->description); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'external_sources.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->description); ?></div>
<?php echo $this->escape($item->description); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->externalsources); ?>

View File

@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=help_documents&task=help_do
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('help_document.edit')): ?>
<div class="name">
<?php if ($canDo->get('help_document.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->title); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'help_documents.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->title); ?></div>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->type); ?>

View File

@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('local_listing.edit')): ?>
<div class="name">
<?php if ($canDo->get('local_listing.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'local_listings.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->build); ?>
@ -92,13 +92,13 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l
<?php echo $this->escape($item->size); ?>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int)$item->external_source)): ?>
<div class="name">
<?php if ($this->user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int)$item->external_source)): ?>
<a href="index.php?option=com_sermondistributor&view=external_sources&task=external_source.edit&id=<?php echo $item->external_source; ?>&ref=local_listings"><?php echo $this->escape($item->external_source_description); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->external_source_description); ?></div>
<?php echo $this->escape($item->external_source_description); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->key); ?>

View File

@ -74,19 +74,22 @@ $edit = "index.php?option=com_sermondistributor&view=preachers&task=preacher.edi
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('preacher.edit')): ?>
<div class="name">
<?php if ($canDo->get('preacher.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'preachers.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->description); ?>
<div>
<?php echo $this->escape($item->description); ?><br />
<?php echo $this->escape($item->email); ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('preacher.edit.state')) : ?>

View File

@ -46,7 +46,7 @@ defined('_JEXEC') or die('Restricted access');
<?php echo JHtml::_('grid.sort', 'COM_SERMONDISTRIBUTOR_PREACHER_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_SERMONDISTRIBUTOR_PREACHER_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
<?php echo JHtml::_('grid.sort', 'PREACHERS_PREACHER_DETAILS', 'description', $this->listDirn, $this->listOrder); ?>
</th>
<?php if ($this->canState): ?>
<th width="10" class="nowrap center" >

View File

@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=series_list&task=series.edi
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('series.edit')): ?>
<div class="name">
<?php if ($canDo->get('series.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'series_list.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->description); ?>

View File

@ -74,44 +74,46 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('sermon.edit')): ?>
<div class="name">
<?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<div class="name">
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?>&ref=sermons"><?php echo $this->escape($item->preacher_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->preacher_name); ?></div>
<?php echo $this->escape($item->preacher_name); ?>
<?php endif; ?>
</div>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<div class="name">
<?php if ($this->user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?>&ref=sermons"><?php echo $this->escape($item->series_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->series_name); ?></div>
<?php echo $this->escape($item->series_name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->short_description); ?>
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_sermondistributor.sermons"><?php echo $this->escape($item->category_title); ?></a>
<?php else: ?>
<?php echo $this->escape($item->category_title); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->link_type); ?>

View File

@ -74,43 +74,43 @@ $edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.e
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('statistic.edit')): ?>
<div class="name">
<?php if ($canDo->get('statistic.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $item->filename; ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $item->filename; ?></div>
<?php echo $item->filename; ?>
<?php endif; ?>
</div>
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int)$item->sermon)): ?>
<div class="name">
<a href="index.php?option=com_sermondistributor&view=sermons&task=sermon.edit&id=<?php echo $item->sermon; ?>&ref=statistics"><?php echo $this->escape($item->sermon_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->sermon_name); ?></div>
<?php echo $this->escape($item->sermon_name); ?>
<?php endif; ?>
</div>
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?>
<div class="name">
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?>&ref=statistics"><?php echo $this->escape($item->preacher_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->preacher_name); ?></div>
<?php echo $this->escape($item->preacher_name); ?>
<?php endif; ?>
</div>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<div class="name">
<?php if ($this->user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?>&ref=statistics"><?php echo $this->escape($item->series_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->series_name); ?></div>
<?php echo $this->escape($item->series_name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->counter); ?>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_SERMONDISTRIBUTOR</name>
<creationDate>5th May, 2018</creationDate>
<creationDate>28th June, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -2945,7 +2945,7 @@ abstract class SermondistributorHelper
}
}
// check if there are any view values remaining
if (count($_result))
if (count((array)$_result))
{
$_result = json_encode($_result);
$_result = array($_result);
@ -3587,7 +3587,7 @@ abstract class SermondistributorHelper
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count($array) > 0)
if (isset($array) && is_array($array) && count((array)$array) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -3690,7 +3690,7 @@ abstract class SermondistributorHelper
{
$initial = strlen($string);
$words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE);
$words_count = count($words);
$words_count = count((array)$words);
$word_length = 0;
$last_word = 0;