From da72b43a11f909829ef7646a95bff50bec01546d Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 20 Jul 2018 06:39:01 +0200 Subject: [PATCH] Update the componet with the improvements made to JCB v2.8.10 --- README.md | 4 +- admin/README.txt | 4 +- admin/controllers/external_source.php | 4 +- admin/controllers/help_document.php | 4 +- admin/controllers/local_listing.php | 4 +- admin/controllers/preacher.php | 4 +- admin/controllers/series.php | 4 +- admin/controllers/sermon.php | 4 +- admin/controllers/statistic.php | 4 +- admin/helpers/sermondistributor.php | 86 ++++++++--------- .../en-GB/en-GB.com_sermondistributor.ini | 3 +- admin/layouts/preacher/sermons_fullwidth.php | 16 ++-- admin/layouts/series/sermons_fullwidth.php | 16 ++-- admin/layouts/sermon/stastics_fullwidth.php | 18 ++-- admin/models/external_source.php | 46 +++++----- admin/models/external_sources.php | 36 ++++---- admin/models/help_document.php | 48 +++++----- admin/models/help_documents.php | 36 ++++---- admin/models/local_listing.php | 22 ++--- admin/models/local_listings.php | 36 ++++---- admin/models/manual_updater.php | 10 +- admin/models/preacher.php | 44 +++++---- admin/models/preachers.php | 28 +++--- admin/models/series.php | 44 +++++---- admin/models/series_list.php | 28 +++--- admin/models/sermon.php | 60 ++++++------ admin/models/sermons.php | 36 ++++---- admin/models/statistic.php | 22 ++--- admin/models/statistics.php | 28 +++--- admin/tables/external_source.php | 8 +- admin/tables/help_document.php | 10 +- admin/tables/local_listing.php | 8 +- admin/tables/preacher.php | 10 +- admin/tables/series.php | 10 +- admin/tables/sermon.php | 10 +- admin/tables/statistic.php | 8 +- .../external_sources/tmpl/default_body.php | 12 +-- .../help_documents/tmpl/default_body.php | 12 +-- .../local_listings/tmpl/default_body.php | 24 ++--- admin/views/preachers/tmpl/default_body.php | 17 ++-- admin/views/preachers/tmpl/default_head.php | 2 +- admin/views/series_list/tmpl/default_body.php | 12 +-- admin/views/sermons/tmpl/default_body.php | 48 +++++----- admin/views/statistics/tmpl/default_body.php | 48 +++++----- sermondistributor.xml | 2 +- site/helpers/route.php | 32 +++---- site/helpers/sermondistributor.php | 40 ++++---- site/models/api.php | 10 +- site/models/categories.php | 20 ++-- site/models/category.php | 64 ++++++------- site/models/preacher.php | 92 +++++++++---------- site/models/preachers.php | 20 ++-- site/models/series.php | 92 +++++++++---------- site/models/serieslist.php | 20 ++-- site/models/sermon.php | 20 ++-- 55 files changed, 661 insertions(+), 689 deletions(-) diff --git a/README.md b/README.md index 6c30df9d..b986ee1e 100644 --- a/README.md +++ b/README.md @@ -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** diff --git a/admin/README.txt b/admin/README.txt index 6c30df9d..b986ee1e 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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** diff --git a/admin/controllers/external_source.php b/admin/controllers/external_source.php index 7d04fdb4..ae89b95b 100644 --- a/admin/controllers/external_source.php +++ b/admin/controllers/external_source.php @@ -224,9 +224,9 @@ class SermondistributorControllerExternal_source extends JControllerForm protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index 6e1378b3..560c0c7a 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -82,9 +82,9 @@ class SermondistributorControllerHelp_document extends JControllerForm protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/controllers/local_listing.php b/admin/controllers/local_listing.php index c1482adf..a9f1c0a9 100644 --- a/admin/controllers/local_listing.php +++ b/admin/controllers/local_listing.php @@ -82,9 +82,9 @@ class SermondistributorControllerLocal_listing extends JControllerForm protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/controllers/preacher.php b/admin/controllers/preacher.php index 85cfef85..3355b1d8 100644 --- a/admin/controllers/preacher.php +++ b/admin/controllers/preacher.php @@ -82,9 +82,9 @@ class SermondistributorControllerPreacher extends JControllerForm protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/controllers/series.php b/admin/controllers/series.php index 6655f341..47a10ede 100644 --- a/admin/controllers/series.php +++ b/admin/controllers/series.php @@ -82,9 +82,9 @@ class SermondistributorControllerSeries extends JControllerForm protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/controllers/sermon.php b/admin/controllers/sermon.php index eb331be5..32e7b2dc 100644 --- a/admin/controllers/sermon.php +++ b/admin/controllers/sermon.php @@ -81,9 +81,9 @@ class SermondistributorControllerSermon extends JControllerForm */ protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/controllers/statistic.php b/admin/controllers/statistic.php index b3c5d505..fbd0a320 100644 --- a/admin/controllers/statistic.php +++ b/admin/controllers/statistic.php @@ -82,9 +82,9 @@ class SermondistributorControllerStatistic extends JControllerForm protected function allowEdit($data = array(), $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = JFactory::getUser(); // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Access check. diff --git a/admin/helpers/sermondistributor.php b/admin/helpers/sermondistributor.php index d447296d..e43355cf 100644 --- a/admin/helpers/sermondistributor.php +++ b/admin/helpers/sermondistributor.php @@ -2680,8 +2680,8 @@ abstract class SermondistributorHelper } /** - * Load the Component Help URLs. - **/ + * Load the Component Help URLs. + **/ public static function getHelpUrl($view) { $user = JFactory::getUser(); @@ -2718,15 +2718,15 @@ abstract class SermondistributorHelper // set joomla article case 1: return self::loadArticleLink($help->article); - break; + break; // set help text case 2: return self::loadHelpTextLink($help->id); - break; + break; // set Link case 3: return $help->url; - break; + break; } } } @@ -2735,16 +2735,16 @@ abstract class SermondistributorHelper } /** - * Get the Article Link. - **/ + * Get the Article Link. + **/ protected static function loadArticleLink($id) { return JURI::root().'index.php?option=com_content&view=article&id='.$id.'&tmpl=component&layout=modal'; } /** - * Get the Help Text Link. - **/ + * Get the Help Text Link. + **/ protected static function loadHelpTextLink($id) { $token = JSession::getFormToken(); @@ -2797,8 +2797,8 @@ abstract class SermondistributorHelper } /** - * UIKIT Component Classes - **/ + * UIKIT Component Classes + **/ public static $uk_components = array( 'data-uk-grid' => array( 'grid' ), @@ -2852,15 +2852,15 @@ abstract class SermondistributorHelper 'upload-drop' => array( 'upload', 'form-file' ) ); - + /** - * Add UIKIT Components - **/ + * Add UIKIT Components + **/ public static $uikit = false; /** - * Get UIKIT Components - **/ + * Get UIKIT Components + **/ public static function getUikitComp($content,$classes = array()) { if (strpos($content,'class="uk-') !== false) @@ -2890,7 +2890,7 @@ abstract class SermondistributorHelper } return $temp; } - } + } if (self::checkArray($classes)) { return $classes; @@ -2926,19 +2926,19 @@ abstract class SermondistributorHelper { $subjectTab = 'Sheet1'; } - - // make sure the file is loaded + + // make sure the file is loaded JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers'); - + // Create new PHPExcel object $objPHPExcel = new PHPExcel(); - + // Set document properties $objPHPExcel->getProperties()->setCreator($creator) - ->setCompany('Vast Development Method') - ->setLastModifiedBy($modified) - ->setTitle($title) - ->setSubject($subjectTab); + ->setCompany('Vast Development Method') + ->setLastModifiedBy($modified) + ->setTitle($title) + ->setSubject($subjectTab); if (!$description) { $objPHPExcel->getProperties()->setDescription($description); @@ -2951,7 +2951,7 @@ abstract class SermondistributorHelper { $objPHPExcel->getProperties()->setCategory($category); } - + // Some styles $headerStyles = array( 'font' => array( @@ -2973,7 +2973,7 @@ abstract class SermondistributorHelper 'size' => 11, 'name' => 'Verdana' )); - + // Add some data if (self::checkArray($rows)) { @@ -3000,43 +3000,43 @@ abstract class SermondistributorHelper { return false; } - + // Rename worksheet $objPHPExcel->getActiveSheet()->setTitle($subjectTab); - + // Set active sheet index to the first sheet, so Excel opens this as the first sheet $objPHPExcel->setActiveSheetIndex(0); - + // Redirect output to a client's web browser (Excel5) header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="'.$fileName.'.xls"'); header('Cache-Control: max-age=0'); // If you're serving to IE 9, then the following may be needed header('Cache-Control: max-age=1'); - + // If you're serving to IE over SSL, then the following may be needed header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 header ('Pragma: public'); // HTTP/1.0 - + $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); jexit(); } - + /** - * Get CSV Headers - */ + * Get CSV Headers + */ public static function getFileHeaders($dataType) - { - // make sure these files are loaded + { + // make sure these files are loaded JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers'); JLoader::import('ChunkReadFilter', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/PHPExcel/Reader'); // get session object - $session = JFactory::getSession(); - $package = $session->get('package', null); - $package = json_decode($package, true); + $session = JFactory::getSession(); + $package = $session->get('package', null); + $package = json_decode($package, true); // set the headers if(isset($package['dir'])) { @@ -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; diff --git a/admin/language/en-GB/en-GB.com_sermondistributor.ini b/admin/language/en-GB/en-GB.com_sermondistributor.ini index f905c256..3ff161ae 100644 --- a/admin/language/en-GB/en-GB.com_sermondistributor.ini +++ b/admin/language/en-GB/en-GB.com_sermondistributor.ini @@ -1512,4 +1512,5 @@ COM_SERMONDISTRIBUTOR_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github 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." \ No newline at end of file +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" \ No newline at end of file diff --git a/admin/layouts/preacher/sermons_fullwidth.php b/admin/layouts/preacher/sermons_fullwidth.php index 60a48847..1c7c6a55 100644 --- a/admin/layouts/preacher/sermons_fullwidth.php +++ b/admin/layouts/preacher/sermons_fullwidth.php @@ -85,30 +85,30 @@ $can = SermondistributorHelper::getActions('sermon'); $canDo = SermondistributorHelper::getActions('sermon',$item,'sermons'); ?> - + get('sermon.edit')): ?> escape($item->name); ?> - checked_out): ?> - name, $item->checked_out_time, 'sermons.', $canCheckin); ?> - + checked_out): ?> + name, $item->checked_out_time, 'sermons.', $canCheckin); ?> + -
escape($item->name); ?>
+ escape($item->name); ?> escape($item->preacher_name); ?> - + authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> escape($item->series_name); ?> -
escape($item->series_name); ?>
+ escape($item->series_name); ?> escape($item->short_description); ?> - + authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?> escape($item->category_title); ?> diff --git a/admin/layouts/series/sermons_fullwidth.php b/admin/layouts/series/sermons_fullwidth.php index f55fee29..0d534c26 100644 --- a/admin/layouts/series/sermons_fullwidth.php +++ b/admin/layouts/series/sermons_fullwidth.php @@ -81,21 +81,21 @@ $can = SermondistributorHelper::getActions('sermon'); $canDo = SermondistributorHelper::getActions('sermon',$item,'sermons'); ?> - + get('sermon.edit')): ?> escape($item->name); ?> - checked_out): ?> - name, $item->checked_out_time, 'sermons.', $canCheckin); ?> - + checked_out): ?> + name, $item->checked_out_time, 'sermons.', $canCheckin); ?> + -
escape($item->name); ?>
+ escape($item->name); ?> - + authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> escape($item->preacher_name); ?> -
escape($item->preacher_name); ?>
+ escape($item->preacher_name); ?> @@ -104,7 +104,7 @@ $can = SermondistributorHelper::getActions('sermon'); escape($item->short_description); ?> - + authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?> escape($item->category_title); ?> diff --git a/admin/layouts/sermon/stastics_fullwidth.php b/admin/layouts/sermon/stastics_fullwidth.php index 8e1b645e..3bf5ea2f 100644 --- a/admin/layouts/sermon/stastics_fullwidth.php +++ b/admin/layouts/sermon/stastics_fullwidth.php @@ -69,31 +69,31 @@ $edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.e $canDo = SermondistributorHelper::getActions('statistic',$item,'statistics'); ?> - + get('statistic.edit')): ?> filename; ?> - checked_out): ?> - name, $item->checked_out_time, 'statistics.', $canCheckin); ?> - + checked_out): ?> + name, $item->checked_out_time, 'statistics.', $canCheckin); ?> + -
filename; ?>
+ filename; ?> escape($item->sermon_name); ?> - + authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> escape($item->preacher_name); ?> -
escape($item->preacher_name); ?>
+ escape($item->preacher_name); ?> - + authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> escape($item->series_name); ?> -
escape($item->series_name); ?>
+ escape($item->series_name); ?> diff --git a/admin/models/external_source.php b/admin/models/external_source.php index 2876eb81..e7c78914 100644 --- a/admin/models/external_source.php +++ b/admin/models/external_source.php @@ -332,7 +332,7 @@ class SermondistributorModelExternal_source extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -443,18 +443,18 @@ class SermondistributorModelExternal_source extends JModelAdmin } /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ public function validate($form, $data, $group = null) { // check if the not_required field is set @@ -634,7 +634,7 @@ class SermondistributorModelExternal_source extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -732,7 +732,7 @@ class SermondistributorModelExternal_source extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -777,7 +777,7 @@ class SermondistributorModelExternal_source extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -971,13 +971,13 @@ class SermondistributorModelExternal_source extends JModelAdmin } /** - * Method to change the title - * - * @param string $title The title. - * - * @return array Contains the modified title and alias. - * - */ + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ protected function _generateNewTitle($title) { diff --git a/admin/models/external_sources.php b/admin/models/external_sources.php index e264adc9..46324bf0 100644 --- a/admin/models/external_sources.php +++ b/admin/models/external_sources.php @@ -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]); @@ -173,10 +171,10 @@ class SermondistributorModelExternal_sources extends JModelList } /** - * Method to convert selection values to translatable string. - * - * @return translatable string - */ + * Method to convert selection values to translatable string. + * + * @return translatable string + */ public function selectionTranslation($value,$name) { // Array of externalsources language strings @@ -333,10 +331,10 @@ class SermondistributorModelExternal_sources extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -460,16 +456,16 @@ class SermondistributorModelExternal_sources extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/models/help_document.php b/admin/models/help_document.php index 091dd929..751f19d3 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -245,7 +245,7 @@ class SermondistributorModelHelp_document extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -356,18 +356,18 @@ class SermondistributorModelHelp_document extends JModelAdmin } /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ public function validate($form, $data, $group = null) { // check if the not_required field is set @@ -547,7 +547,7 @@ class SermondistributorModelHelp_document extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -640,7 +640,7 @@ class SermondistributorModelHelp_document extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -685,7 +685,7 @@ class SermondistributorModelHelp_document extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -921,14 +921,14 @@ class SermondistributorModelHelp_document extends JModelAdmin } /** - * Method to change the title/s & alias. - * - * @param string $alias The alias. - * @param string/array $title The title. - * - * @return array/string Contains the modified title/s and/or alias. - * - */ + * Method to change the title/s & alias. + * + * @param string $alias The alias. + * @param string/array $title The title. + * + * @return array/string Contains the modified title/s and/or alias. + * + */ protected function _generateNewTitle($alias, $title = null) { diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 0966c1d9..f6be2e1e 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -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]); @@ -173,10 +171,10 @@ class SermondistributorModelHelp_documents extends JModelList } /** - * Method to convert selection values to translatable string. - * - * @return translatable string - */ + * Method to convert selection values to translatable string. + * + * @return translatable string + */ public function selectionTranslation($value,$name) { // Array of type language strings @@ -302,10 +300,10 @@ class SermondistributorModelHelp_documents extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -426,16 +422,16 @@ class SermondistributorModelHelp_documents extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/models/local_listing.php b/admin/models/local_listing.php index e9ad5f81..9ebece1c 100644 --- a/admin/models/local_listing.php +++ b/admin/models/local_listing.php @@ -380,7 +380,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -646,7 +646,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -744,7 +744,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -789,7 +789,7 @@ class SermondistributorModelLocal_listing extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -977,13 +977,13 @@ class SermondistributorModelLocal_listing extends JModelAdmin } /** - * Method to change the title - * - * @param string $title The title. - * - * @return array Contains the modified title and alias. - * - */ + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ protected function _generateNewTitle($title) { diff --git a/admin/models/local_listings.php b/admin/models/local_listings.php index 17195a16..a087d564 100644 --- a/admin/models/local_listings.php +++ b/admin/models/local_listings.php @@ -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]); @@ -151,10 +149,10 @@ class SermondistributorModelLocal_listings extends JModelList } /** - * Method to convert selection values to translatable string. - * - * @return translatable string - */ + * Method to convert selection values to translatable string. + * + * @return translatable string + */ public function selectionTranslation($value,$name) { // Array of build language strings @@ -245,10 +243,10 @@ class SermondistributorModelLocal_listings extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -373,16 +369,16 @@ class SermondistributorModelLocal_listings extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/models/manual_updater.php b/admin/models/manual_updater.php index f39a456e..f51ecd98 100644 --- a/admin/models/manual_updater.php +++ b/admin/models/manual_updater.php @@ -141,11 +141,11 @@ class SermondistributorModelManual_updater extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/admin/models/preacher.php b/admin/models/preacher.php index aa7274e1..ff7e1973 100644 --- a/admin/models/preacher.php +++ b/admin/models/preacher.php @@ -106,10 +106,10 @@ class SermondistributorModelPreacher extends JModelAdmin } /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getVvvsermons() { // Get the user object. @@ -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]); @@ -210,10 +208,10 @@ class SermondistributorModelPreacher extends JModelAdmin } /** - * Method to convert selection values to translatable string. - * - * @return translatable string - */ + * Method to convert selection values to translatable string. + * + * @return translatable string + */ public function selectionTranslationVvvsermons($value,$name) { // Array of link_type language strings @@ -384,7 +382,7 @@ class SermondistributorModelPreacher extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -650,7 +648,7 @@ class SermondistributorModelPreacher extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -743,7 +741,7 @@ class SermondistributorModelPreacher extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -788,7 +786,7 @@ class SermondistributorModelPreacher extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -1018,14 +1016,14 @@ class SermondistributorModelPreacher extends JModelAdmin } /** - * Method to change the title/s & alias. - * - * @param string $alias The alias. - * @param string/array $title The title. - * - * @return array/string Contains the modified title/s and/or alias. - * - */ + * Method to change the title/s & alias. + * + * @param string $alias The alias. + * @param string/array $title The title. + * + * @return array/string Contains the modified title/s and/or alias. + * + */ protected function _generateNewTitle($alias, $title = null) { diff --git a/admin/models/preachers.php b/admin/models/preachers.php index b315a7fc..80ce925f 100644 --- a/admin/models/preachers.php +++ b/admin/models/preachers.php @@ -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]); @@ -199,10 +197,10 @@ class SermondistributorModelPreachers extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -320,16 +316,16 @@ class SermondistributorModelPreachers extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/models/series.php b/admin/models/series.php index 6d837333..8bfbb4a2 100644 --- a/admin/models/series.php +++ b/admin/models/series.php @@ -106,10 +106,10 @@ class SermondistributorModelSeries extends JModelAdmin } /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getVwcsermons() { // Get the user object. @@ -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]); @@ -210,10 +208,10 @@ class SermondistributorModelSeries extends JModelAdmin } /** - * Method to convert selection values to translatable string. - * - * @return translatable string - */ + * Method to convert selection values to translatable string. + * + * @return translatable string + */ public function selectionTranslationVwcsermons($value,$name) { // Array of link_type language strings @@ -384,7 +382,7 @@ class SermondistributorModelSeries extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -650,7 +648,7 @@ class SermondistributorModelSeries extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -743,7 +741,7 @@ class SermondistributorModelSeries extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -788,7 +786,7 @@ class SermondistributorModelSeries extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -1018,14 +1016,14 @@ class SermondistributorModelSeries extends JModelAdmin } /** - * Method to change the title/s & alias. - * - * @param string $alias The alias. - * @param string/array $title The title. - * - * @return array/string Contains the modified title/s and/or alias. - * - */ + * Method to change the title/s & alias. + * + * @param string $alias The alias. + * @param string/array $title The title. + * + * @return array/string Contains the modified title/s and/or alias. + * + */ protected function _generateNewTitle($alias, $title = null) { diff --git a/admin/models/series_list.php b/admin/models/series_list.php index 6fbb9ade..c43c2f92 100644 --- a/admin/models/series_list.php +++ b/admin/models/series_list.php @@ -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]); @@ -195,10 +193,10 @@ class SermondistributorModelSeries_list extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -315,16 +311,16 @@ class SermondistributorModelSeries_list extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/models/sermon.php b/admin/models/sermon.php index 0a0a095e..88523269 100644 --- a/admin/models/sermon.php +++ b/admin/models/sermon.php @@ -118,10 +118,10 @@ class SermondistributorModelSermon extends JModelAdmin } /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getVwbstastics() { // Get the user object. @@ -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]); @@ -347,7 +345,7 @@ class SermondistributorModelSermon extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -458,18 +456,18 @@ class SermondistributorModelSermon extends JModelAdmin } /** - * Method to validate the form data. - * - * @param JForm $form The form to validate against. - * @param array $data The data to validate. - * @param string $group The name of the field group to validate. - * - * @return mixed Array of filtered data if valid, false otherwise. - * - * @see JFormRule - * @see JFilterInput - * @since 12.2 - */ + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ public function validate($form, $data, $group = null) { // check if the not_required field is set @@ -649,7 +647,7 @@ class SermondistributorModelSermon extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -765,7 +763,7 @@ class SermondistributorModelSermon extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -810,7 +808,7 @@ class SermondistributorModelSermon extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -1069,14 +1067,14 @@ class SermondistributorModelSermon extends JModelAdmin } /** - * Method to change the title/s & alias. - * - * @param string $alias The alias. - * @param string/array $title The title. - * - * @return array/string Contains the modified title/s and/or alias. - * - */ + * Method to change the title/s & alias. + * + * @param string $alias The alias. + * @param string/array $title The title. + * + * @return array/string Contains the modified title/s and/or alias. + * + */ protected function _generateNewTitle($alias, $title = null) { diff --git a/admin/models/sermons.php b/admin/models/sermons.php index f81c5fe7..27766c94 100644 --- a/admin/models/sermons.php +++ b/admin/models/sermons.php @@ -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]); @@ -169,10 +167,10 @@ class SermondistributorModelSermons extends JModelList } /** - * Method to convert selection values to translatable string. - * - * @return translatable string - */ + * Method to convert selection values to translatable string. + * + * @return translatable string + */ public function selectionTranslation($value,$name) { // Array of link_type language strings @@ -330,10 +328,10 @@ class SermondistributorModelSermons extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -458,16 +454,16 @@ class SermondistributorModelSermons extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/models/statistic.php b/admin/models/statistic.php index 9a0428bd..29f2acab 100644 --- a/admin/models/statistic.php +++ b/admin/models/statistic.php @@ -241,7 +241,7 @@ class SermondistributorModelStatistic extends JModelAdmin protected function canEditState($record) { $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $recordId = (!empty($record->id)) ? $record->id : 0; if ($recordId) { @@ -507,7 +507,7 @@ class SermondistributorModelStatistic extends JModelAdmin * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 12.2 + * @since 12.2 */ protected function batchCopy($values, $pks, $contexts) { @@ -605,7 +605,7 @@ class SermondistributorModelStatistic extends JModelAdmin $this->table->id = 0; // TODO: Deal with ordering? - // $this->table->ordering = 1; + // $this->table->ordering = 1; // Check the row. if (!$this->table->check()) @@ -650,7 +650,7 @@ class SermondistributorModelStatistic extends JModelAdmin * * @return boolean True if successful, false otherwise and internal error is set. * - * @since 12.2 + * @since 12.2 */ protected function batchMove($values, $pks, $contexts) { @@ -827,13 +827,13 @@ class SermondistributorModelStatistic extends JModelAdmin } /** - * Method to change the title - * - * @param string $title The title. - * - * @return array Contains the modified title and alias. - * - */ + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ protected function _generateNewTitle($title) { diff --git a/admin/models/statistics.php b/admin/models/statistics.php index d005fcaf..2710fecc 100644 --- a/admin/models/statistics.php +++ b/admin/models/statistics.php @@ -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]); @@ -238,10 +236,10 @@ class SermondistributorModelStatistics extends JModelList } /** - * Method to get list export data. - * - * @return mixed An array of data items on success, false on failure. - */ + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ public function getExportData($pks) { // setup the query @@ -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]); @@ -362,16 +358,16 @@ class SermondistributorModelStatistics extends JModelList } /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ protected function checkInNow() { // Get set check in time $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); - + if ($time) { diff --git a/admin/tables/external_source.php b/admin/tables/external_source.php index f344d266..80d143be 100644 --- a/admin/tables/external_source.php +++ b/admin/tables/external_source.php @@ -325,10 +325,10 @@ class SermondistributorTableExternal_source extends JTable } /** - * This view does not actually have an alias - * - * @return bool - */ + * This view does not actually have an alias + * + * @return bool + */ public function generateAlias() { return false; diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index 53829e38..7d77129f 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -325,11 +325,11 @@ class SermondistributorTableHelp_document extends JTable } /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ public function generateAlias() { if (empty($this->alias)) diff --git a/admin/tables/local_listing.php b/admin/tables/local_listing.php index 4d190f31..c93ace22 100644 --- a/admin/tables/local_listing.php +++ b/admin/tables/local_listing.php @@ -325,10 +325,10 @@ class SermondistributorTableLocal_listing extends JTable } /** - * This view does not actually have an alias - * - * @return bool - */ + * This view does not actually have an alias + * + * @return bool + */ public function generateAlias() { return false; diff --git a/admin/tables/preacher.php b/admin/tables/preacher.php index dfb980ba..784a4401 100644 --- a/admin/tables/preacher.php +++ b/admin/tables/preacher.php @@ -325,11 +325,11 @@ class SermondistributorTablePreacher extends JTable } /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ public function generateAlias() { if (empty($this->alias)) diff --git a/admin/tables/series.php b/admin/tables/series.php index 329796f0..553c4027 100644 --- a/admin/tables/series.php +++ b/admin/tables/series.php @@ -325,11 +325,11 @@ class SermondistributorTableSeries extends JTable } /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ public function generateAlias() { if (empty($this->alias)) diff --git a/admin/tables/sermon.php b/admin/tables/sermon.php index 3de833ad..90bc9b3d 100644 --- a/admin/tables/sermon.php +++ b/admin/tables/sermon.php @@ -328,11 +328,11 @@ class SermondistributorTableSermon extends JTable } /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ public function generateAlias() { if (empty($this->alias)) diff --git a/admin/tables/statistic.php b/admin/tables/statistic.php index 57fe35bf..c3232f2f 100644 --- a/admin/tables/statistic.php +++ b/admin/tables/statistic.php @@ -325,10 +325,10 @@ class SermondistributorTableStatistic extends JTable } /** - * This view does not actually have an alias - * - * @return bool - */ + * This view does not actually have an alias + * + * @return bool + */ public function generateAlias() { return false; diff --git a/admin/views/external_sources/tmpl/default_body.php b/admin/views/external_sources/tmpl/default_body.php index 395c46c4..22a8b2a2 100644 --- a/admin/views/external_sources/tmpl/default_body.php +++ b/admin/views/external_sources/tmpl/default_body.php @@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=external_sources&task=exter - get('external_source.edit')): ?> -
+
+ get('external_source.edit')): ?> escape($item->description); ?> checked_out): ?> name, $item->checked_out_time, 'external_sources.', $canCheckin); ?> -
- -
escape($item->description); ?>
- + + escape($item->description); ?> + +
externalsources); ?> diff --git a/admin/views/help_documents/tmpl/default_body.php b/admin/views/help_documents/tmpl/default_body.php index eb336f4e..ab4cac3a 100644 --- a/admin/views/help_documents/tmpl/default_body.php +++ b/admin/views/help_documents/tmpl/default_body.php @@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=help_documents&task=help_do - get('help_document.edit')): ?> -
+
+ get('help_document.edit')): ?> escape($item->title); ?> checked_out): ?> name, $item->checked_out_time, 'help_documents.', $canCheckin); ?> -
- -
escape($item->title); ?>
- + + escape($item->title); ?> + +
type); ?> diff --git a/admin/views/local_listings/tmpl/default_body.php b/admin/views/local_listings/tmpl/default_body.php index 31f4e103..76b10085 100644 --- a/admin/views/local_listings/tmpl/default_body.php +++ b/admin/views/local_listings/tmpl/default_body.php @@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l - get('local_listing.edit')): ?> -
+
+ get('local_listing.edit')): ?> escape($item->name); ?> checked_out): ?> name, $item->checked_out_time, 'local_listings.', $canCheckin); ?> -
- -
escape($item->name); ?>
- + + escape($item->name); ?> + +
build); ?> @@ -92,13 +92,13 @@ $edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_l escape($item->size); ?> - user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int)$item->external_source)): ?> -
+
+ user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int)$item->external_source)): ?> escape($item->external_source_description); ?> -
- -
escape($item->external_source_description); ?>
- + + escape($item->external_source_description); ?> + +
escape($item->key); ?> diff --git a/admin/views/preachers/tmpl/default_body.php b/admin/views/preachers/tmpl/default_body.php index 766544e2..82f4cd01 100644 --- a/admin/views/preachers/tmpl/default_body.php +++ b/admin/views/preachers/tmpl/default_body.php @@ -74,19 +74,22 @@ $edit = "index.php?option=com_sermondistributor&view=preachers&task=preacher.edi - get('preacher.edit')): ?> -
+
+ get('preacher.edit')): ?> escape($item->name); ?> checked_out): ?> name, $item->checked_out_time, 'preachers.', $canCheckin); ?> -
- -
escape($item->name); ?>
- + + escape($item->name); ?> + +
- escape($item->description); ?> +
+ escape($item->description); ?>
+ escape($item->email); ?> +
get('preacher.edit.state')) : ?> diff --git a/admin/views/preachers/tmpl/default_head.php b/admin/views/preachers/tmpl/default_head.php index 26bc9791..c45ae5e9 100644 --- a/admin/views/preachers/tmpl/default_head.php +++ b/admin/views/preachers/tmpl/default_head.php @@ -46,7 +46,7 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> diff --git a/admin/views/series_list/tmpl/default_body.php b/admin/views/series_list/tmpl/default_body.php index 05c0ed62..c402c5eb 100644 --- a/admin/views/series_list/tmpl/default_body.php +++ b/admin/views/series_list/tmpl/default_body.php @@ -74,16 +74,16 @@ $edit = "index.php?option=com_sermondistributor&view=series_list&task=series.edi - get('series.edit')): ?> -
+
+ get('series.edit')): ?> escape($item->name); ?> checked_out): ?> name, $item->checked_out_time, 'series_list.', $canCheckin); ?> -
- -
escape($item->name); ?>
- + + escape($item->name); ?> + +
escape($item->description); ?> diff --git a/admin/views/sermons/tmpl/default_body.php b/admin/views/sermons/tmpl/default_body.php index 7f204e1d..552f21c3 100644 --- a/admin/views/sermons/tmpl/default_body.php +++ b/admin/views/sermons/tmpl/default_body.php @@ -74,44 +74,46 @@ $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; - get('sermon.edit')): ?> -
+
+ get('sermon.edit')): ?> escape($item->name); ?> checked_out): ?> name, $item->checked_out_time, 'sermons.', $canCheckin); ?> -
- -
escape($item->name); ?>
- + + escape($item->name); ?> + +
- user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> -
+
+ user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> escape($item->preacher_name); ?> -
- -
escape($item->preacher_name); ?>
- + + escape($item->preacher_name); ?> + +
- user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> -
+
+ user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> escape($item->series_name); ?> -
- -
escape($item->series_name); ?>
- + + escape($item->series_name); ?> + +
escape($item->short_description); ?> - user->authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?> - escape($item->category_title); ?> - - escape($item->category_title); ?> - +
+ user->authorise('core.edit', 'com_sermondistributor.sermons.category.' . (int)$item->catid)): ?> + escape($item->category_title); ?> + + escape($item->category_title); ?> + +
link_type); ?> diff --git a/admin/views/statistics/tmpl/default_body.php b/admin/views/statistics/tmpl/default_body.php index fc456125..c21e4ffc 100644 --- a/admin/views/statistics/tmpl/default_body.php +++ b/admin/views/statistics/tmpl/default_body.php @@ -74,43 +74,43 @@ $edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.e - get('statistic.edit')): ?> -
+
+ get('statistic.edit')): ?> filename; ?> checked_out): ?> name, $item->checked_out_time, 'statistics.', $canCheckin); ?> -
- -
filename; ?>
- + + filename; ?> + +
- user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int)$item->sermon)): ?> -
+
+ user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int)$item->sermon)): ?> escape($item->sermon_name); ?> -
- -
escape($item->sermon_name); ?>
- + + escape($item->sermon_name); ?> + +
- user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> -
+
+ user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> escape($item->preacher_name); ?> -
- -
escape($item->preacher_name); ?>
- + + escape($item->preacher_name); ?> + +
- user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> -
+
+ user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> escape($item->series_name); ?> -
- -
escape($item->series_name); ?>
- + + escape($item->series_name); ?> + +
escape($item->counter); ?> diff --git a/sermondistributor.xml b/sermondistributor.xml index 51a622e2..93940e18 100644 --- a/sermondistributor.xml +++ b/sermondistributor.xml @@ -1,7 +1,7 @@ COM_SERMONDISTRIBUTOR - 5th May, 2018 + 28th June, 2018 Llewellyn van der Merwe joomla@vdm.io https://www.vdm.io/ diff --git a/site/helpers/route.php b/site/helpers/route.php index cc80496f..d068b5df 100644 --- a/site/helpers/route.php +++ b/site/helpers/route.php @@ -37,8 +37,8 @@ abstract class SermondistributorHelperRoute protected static $lookup; /** - * @param int The route of the Sermon - */ + * @param int The route of the Sermon + */ public static function getSermonRoute($id = 0, $catid = 0) { if ($id > 0) @@ -78,8 +78,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Preachers - */ + * @param int The route of the Preachers + */ public static function getPreachersRoute($id = 0, $catid = 0) { if ($id > 0) @@ -119,8 +119,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Preacher - */ + * @param int The route of the Preacher + */ public static function getPreacherRoute($id = 0, $catid = 0) { if ($id > 0) @@ -160,8 +160,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Categories - */ + * @param int The route of the Categories + */ public static function getCategoriesRoute($id = 0) { if ($id > 0) @@ -190,8 +190,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Category - */ + * @param int The route of the Category + */ public static function getCategoryRoute($id = 0) { if ($id > 0) @@ -220,8 +220,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Serieslist - */ + * @param int The route of the Serieslist + */ public static function getSerieslistRoute($id = 0, $catid = 0) { if ($id > 0) @@ -261,8 +261,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Series - */ + * @param int The route of the Series + */ public static function getSeriesRoute($id = 0, $catid = 0) { if ($id > 0) @@ -302,8 +302,8 @@ abstract class SermondistributorHelperRoute } /** - * @param int The route of the Api - */ + * @param int The route of the Api + */ public static function getApiRoute($id = 0, $catid = 0) { if ($id > 0) diff --git a/site/helpers/sermondistributor.php b/site/helpers/sermondistributor.php index 80c652df..1e2373fe 100644 --- a/site/helpers/sermondistributor.php +++ b/site/helpers/sermondistributor.php @@ -2729,8 +2729,8 @@ abstract class SermondistributorHelper } /** - * Load the Component Help URLs. - **/ + * Load the Component Help URLs. + **/ public static function getHelpUrl($view) { $user = JFactory::getUser(); @@ -2767,15 +2767,15 @@ abstract class SermondistributorHelper // set joomla article case 1: return self::loadArticleLink($help->article); - break; + break; // set help text case 2: return self::loadHelpTextLink($help->id); - break; + break; // set Link case 3: return $help->url; - break; + break; } } } @@ -2784,16 +2784,16 @@ abstract class SermondistributorHelper } /** - * Get the Article Link. - **/ + * Get the Article Link. + **/ protected static function loadArticleLink($id) { return JURI::root().'index.php?option=com_content&view=article&id='.$id.'&tmpl=component&layout=modal'; } /** - * Get the Help Text Link. - **/ + * Get the Help Text Link. + **/ protected static function loadHelpTextLink($id) { $token = JSession::getFormToken(); @@ -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); @@ -3098,8 +3098,8 @@ abstract class SermondistributorHelper } /** - * UIKIT Component Classes - **/ + * UIKIT Component Classes + **/ public static $uk_components = array( 'data-uk-grid' => array( 'grid' ), @@ -3153,15 +3153,15 @@ abstract class SermondistributorHelper 'upload-drop' => array( 'upload', 'form-file' ) ); - + /** - * Add UIKIT Components - **/ + * Add UIKIT Components + **/ public static $uikit = false; /** - * Get UIKIT Components - **/ + * Get UIKIT Components + **/ public static function getUikitComp($content,$classes = array()) { if (strpos($content,'class="uk-') !== false) @@ -3191,7 +3191,7 @@ abstract class SermondistributorHelper } return $temp; } - } + } if (self::checkArray($classes)) { return $classes; @@ -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; diff --git a/site/models/api.php b/site/models/api.php index f149dccc..99f1548c 100644 --- a/site/models/api.php +++ b/site/models/api.php @@ -117,11 +117,11 @@ class SermondistributorModelApi extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/categories.php b/site/models/categories.php index 9a37a014..8df3cad0 100644 --- a/site/models/categories.php +++ b/site/models/categories.php @@ -151,11 +151,11 @@ class SermondistributorModelCategories extends JModelList } /** - * Method to get an array of Sermon Objects. - * - * @return mixed An array of Sermon Objects on success, false on failure. - * - */ + * Method to get an array of Sermon Objects. + * + * @return mixed An array of Sermon Objects on success, false on failure. + * + */ public function getIdCatidSermonEfee_B($id) { // Get a db connection. @@ -191,11 +191,11 @@ class SermondistributorModelCategories extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/category.php b/site/models/category.php index ed4ef522..8db095d4 100644 --- a/site/models/category.php +++ b/site/models/category.php @@ -221,11 +221,11 @@ class SermondistributorModelCategory extends JModelList } /** - * Method to get an array of Statistic Objects. - * - * @return mixed An array of Statistic Objects on success, false on failure. - * - */ + * Method to get an array of Statistic Objects. + * + * @return mixed An array of Statistic Objects on success, false on failure. + * + */ public function getIdSermonStatisticBcea_E($id) { // Get a db connection. @@ -258,23 +258,23 @@ class SermondistributorModelCategory extends JModelList /** - * Custom Method - * - * @return mixed item data object on success, false on failure. - * - */ + * Custom Method + * + * @return mixed item data object on success, false on failure. + * + */ public function getCategory() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get a db connection. $db = JFactory::getDbo(); @@ -325,11 +325,11 @@ class SermondistributorModelCategory extends JModelList } /** - * Method to get an array of Sermon Objects. - * - * @return mixed An array of Sermon Objects on success, false on failure. - * - */ + * Method to get an array of Sermon Objects. + * + * @return mixed An array of Sermon Objects on success, false on failure. + * + */ public function getIdCatidSermonFbdf_B($id) { // Get a db connection. @@ -369,11 +369,11 @@ class SermondistributorModelCategory extends JModelList } /** - * Method to get an array of Statistic Objects. - * - * @return mixed An array of Statistic Objects on success, false on failure. - * - */ + * Method to get an array of Statistic Objects. + * + * @return mixed An array of Statistic Objects on success, false on failure. + * + */ public function getIdSermonStatisticFbdf_C($id) { // Get a db connection. @@ -406,11 +406,11 @@ class SermondistributorModelCategory extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/preacher.php b/site/models/preacher.php index c27e133e..fafadf41 100644 --- a/site/models/preacher.php +++ b/site/models/preacher.php @@ -221,11 +221,11 @@ class SermondistributorModelPreacher extends JModelList } /** - * Method to get an array of Statistic Objects. - * - * @return mixed An array of Statistic Objects on success, false on failure. - * - */ + * Method to get an array of Statistic Objects. + * + * @return mixed An array of Statistic Objects on success, false on failure. + * + */ public function getIdSermonStatisticFcff_E($id) { // Get a db connection. @@ -258,23 +258,23 @@ class SermondistributorModelPreacher extends JModelList /** - * Custom Method - * - * @return mixed item data object on success, false on failure. - * - */ + * Custom Method + * + * @return mixed item data object on success, false on failure. + * + */ public function getPreacher() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get a db connection. $db = JFactory::getDbo(); @@ -332,23 +332,23 @@ class SermondistributorModelPreacher extends JModelList /** - * Custom Method - * - * @return mixed An array of objects on success, false on failure. - * - */ + * Custom Method + * + * @return mixed An array of objects on success, false on failure. + * + */ public function getNumberDownloads() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get the global params @@ -409,23 +409,23 @@ class SermondistributorModelPreacher extends JModelList /** - * Custom Method - * - * @return mixed An array of objects on success, false on failure. - * - */ + * Custom Method + * + * @return mixed An array of objects on success, false on failure. + * + */ public function getNumberSermons() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get the global params @@ -487,11 +487,11 @@ class SermondistributorModelPreacher extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/preachers.php b/site/models/preachers.php index 64bc650e..5906041c 100644 --- a/site/models/preachers.php +++ b/site/models/preachers.php @@ -147,11 +147,11 @@ class SermondistributorModelPreachers extends JModelList } /** - * Method to get an array of Sermon Objects. - * - * @return mixed An array of Sermon Objects on success, false on failure. - * - */ + * Method to get an array of Sermon Objects. + * + * @return mixed An array of Sermon Objects on success, false on failure. + * + */ public function getIdPreacherSermonDcaa_B($id) { // Get a db connection. @@ -187,11 +187,11 @@ class SermondistributorModelPreachers extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/series.php b/site/models/series.php index bac65a3f..a104164a 100644 --- a/site/models/series.php +++ b/site/models/series.php @@ -221,11 +221,11 @@ class SermondistributorModelSeries extends JModelList } /** - * Method to get an array of Statistic Objects. - * - * @return mixed An array of Statistic Objects on success, false on failure. - * - */ + * Method to get an array of Statistic Objects. + * + * @return mixed An array of Statistic Objects on success, false on failure. + * + */ public function getIdSermonStatisticEfeb_E($id) { // Get a db connection. @@ -258,23 +258,23 @@ class SermondistributorModelSeries extends JModelList /** - * Custom Method - * - * @return mixed item data object on success, false on failure. - * - */ + * Custom Method + * + * @return mixed item data object on success, false on failure. + * + */ public function getSeries() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get a db connection. $db = JFactory::getDbo(); @@ -332,23 +332,23 @@ class SermondistributorModelSeries extends JModelList /** - * Custom Method - * - * @return mixed An array of objects on success, false on failure. - * - */ + * Custom Method + * + * @return mixed An array of objects on success, false on failure. + * + */ public function getNumberDownloads() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get the global params @@ -409,23 +409,23 @@ class SermondistributorModelSeries extends JModelList /** - * Custom Method - * - * @return mixed An array of objects on success, false on failure. - * - */ + * Custom Method + * + * @return mixed An array of objects on success, false on failure. + * + */ public function getNumberSermons() { if (!isset($this->initSet) || !$this->initSet) { - $this->user = JFactory::getUser(); - $this->userId = $this->user->get('id'); - $this->guest = $this->user->get('guest'); - $this->groups = $this->user->get('groups'); - $this->authorisedGroups = $this->user->getAuthorisedGroups(); - $this->levels = $this->user->getAuthorisedViewLevels(); - $this->initSet = true; + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; } // Get the global params @@ -487,11 +487,11 @@ class SermondistributorModelSeries extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/serieslist.php b/site/models/serieslist.php index 7ae70961..687d8319 100644 --- a/site/models/serieslist.php +++ b/site/models/serieslist.php @@ -147,11 +147,11 @@ class SermondistributorModelSerieslist extends JModelList } /** - * Method to get an array of Sermon Objects. - * - * @return mixed An array of Sermon Objects on success, false on failure. - * - */ + * Method to get an array of Sermon Objects. + * + * @return mixed An array of Sermon Objects on success, false on failure. + * + */ public function getIdSeriesSermonBcae_B($id) { // Get a db connection. @@ -187,11 +187,11 @@ class SermondistributorModelSerieslist extends JModelList /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) diff --git a/site/models/sermon.php b/site/models/sermon.php index e6bad690..204f8853 100644 --- a/site/models/sermon.php +++ b/site/models/sermon.php @@ -266,11 +266,11 @@ class SermondistributorModelSermon extends JModelItem } /** - * Method to get an array of Statistic Objects. - * - * @return mixed An array of Statistic Objects on success, false on failure. - * - */ + * Method to get an array of Statistic Objects. + * + * @return mixed An array of Statistic Objects on success, false on failure. + * + */ public function getIdSermonStatisticEbbd_D($id) { // Get a db connection. @@ -303,11 +303,11 @@ class SermondistributorModelSermon extends JModelItem /** - * Get the uikit needed components - * - * @return mixed An array of objects on success. - * - */ + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ public function getUikitComp() { if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp))