diff --git a/README.md b/README.md
index cd957aee..9756b856 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Sermon Distributor (1.2.9)
- ![Sermon Distributor image (https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor")] (https://github.com/SermonDistributor/Joomla-3-Component)
+ ![Sermon Distributor image] (https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor") (https://github.com/SermonDistributor/Joomla-3-Component)
Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x] (http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.
@@ -16,7 +16,7 @@ The best way to see all your options is to install this component on you Joomla
+ [Setup Dropbox] (https://youtu.be/btpKFDk0-dI)
+ [Component Build] (https://youtu.be/yMPp1Cp3W_0)
-# Build Details :factory:
+# Build Details
+ *Company*: [Vast Development Method] (https://www.vdm.io/)
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
@@ -35,9 +35,9 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
-+ *Line count*: **45152** :round_pushpin:
-+ *File count*: **347** :page_with_curl:
-+ *Folder count*: **79** :open_file_folder:
++ *Line count*: **45151**
++ *File count*: **347**
++ *Folder count*: **79**
**83 Hours** or **10 Eight Hour Days** (the actual time the author spent)
diff --git a/admin/config.xml b/admin/config.xml
index 38113fbf..9461b3eb 100644
--- a/admin/config.xml
+++ b/admin/config.xml
@@ -45,7 +45,7 @@
/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LOAD "
@@ -371,7 +371,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_DESC"
class="btn-group btn-group-yesno"
default="">
-
+
COM_SERMONDISTRIBUTOR_CONFIG_NO "
@@ -383,7 +383,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_DESC"
class="btn-group btn-group-yesno"
default="">
-
+
COM_SERMONDISTRIBUTOR_CONFIG_FLAT_LOAD "
@@ -396,9 +396,9 @@
name="dropbox_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_DROPBOX">
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_MPTHREE
@@ -480,11 +480,11 @@
COM_SERMONDISTRIBUTOR_CONFIG_GIF
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_MANUAL
COM_SERMONDISTRIBUTOR_CONFIG_AUTOMATIC
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_MANUAL
COM_SERMONDISTRIBUTOR_CONFIG_AUTOMATIC
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PUBLISHED
@@ -686,7 +686,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_TRASHED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PUBLISHED
@@ -706,7 +706,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_TRASHED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PUBLISHED
@@ -726,7 +726,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_TRASHED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_ENCRYPTED
@@ -745,7 +745,7 @@
name="preachers_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS">
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_TABLE
@@ -761,7 +761,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_LIST
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -781,7 +781,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_BLUE
@@ -811,7 +811,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_NONE
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
@@ -900,7 +900,7 @@
name="preacher_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER">
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PANEL
@@ -925,7 +925,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SMALL
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -959,7 +959,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_TABLE
@@ -1061,7 +1061,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_LIST
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1081,7 +1081,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_BLUE
@@ -1111,7 +1111,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_NONE
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
@@ -1228,7 +1228,7 @@
name="categories_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORIES">
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_TABLE
@@ -1244,7 +1244,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_LIST
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1264,7 +1264,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_BLUE
@@ -1294,7 +1294,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_NONE
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
@@ -1355,7 +1355,7 @@
name="category_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY">
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PANEL
@@ -1380,7 +1380,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SMALL
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1414,7 +1414,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_TABLE
@@ -1488,7 +1488,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_LIST
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1508,7 +1508,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_BLUE
@@ -1538,7 +1538,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_NONE
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
@@ -1655,7 +1655,7 @@
name="series_list_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_LIST">
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_TABLE
@@ -1671,7 +1671,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_LIST
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1691,7 +1691,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_BLUE
@@ -1721,7 +1721,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_NONE
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
@@ -1782,7 +1782,7 @@
name="series_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_SERIES">
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PANEL
@@ -1807,7 +1807,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SMALL
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1841,7 +1841,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_TABLE
@@ -1915,7 +1915,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_LIST
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -1935,7 +1935,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_BLUE
@@ -1965,7 +1965,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_NONE
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
@@ -2082,7 +2082,7 @@
name="sermon_custom_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_SERMON">
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PANEL
@@ -2107,7 +2107,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_BIG
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_PLAIN
@@ -2141,7 +2141,7 @@
COM_SERMONDISTRIBUTOR_CONFIG_SPACED
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
COM_SERMONDISTRIBUTOR_CONFIG_NO
-
+
-
+
COM_SERMONDISTRIBUTOR_CONFIG_YES
diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php
index 9bf448fb..7ffd762e 100644
--- a/admin/controllers/help_document.php
+++ b/admin/controllers/help_document.php
@@ -55,13 +55,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9313] Access check.
+ // [9312] Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
- // [9324] In the absense of better information, revert to the component permissions.
+ // [9323] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('help_document.create', $this->option);
}
@@ -77,13 +77,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9467] get user object.
+ // [9466] get user object.
$user = JFactory::getUser();
- // [9469] get record id.
+ // [9468] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
- // [9476] Access check.
+ // [9475] Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
@@ -92,17 +92,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
if ($recordId)
{
- // [9485] The record has been set. Check the record permissions.
+ // [9484] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor.help_document.' . $recordId))
{
- // [9507] Now test the owner is the user.
+ // [9506] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9511] Need to do a lookup from the model.
+ // [9510] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -112,7 +112,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
$ownerId = $record->created_by;
}
- // [9519] If the owner matches 'me' then allow.
+ // [9518] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
@@ -124,7 +124,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false;
}
}
- // [9541] Since there is no permission, revert to the component permissions.
+ // [9540] Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option);
}
diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php
index 86db0777..38dac123 100644
--- a/admin/controllers/help_documents.php
+++ b/admin/controllers/help_documents.php
@@ -43,29 +43,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData()
{
- // [7263] Check for request forgeries
+ // [7262] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7265] check if export is allowed for this user.
+ // [7264] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
- // [7269] Get the input
+ // [7268] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
- // [7272] Sanitize the input
+ // [7271] Sanitize the input
JArrayHelper::toInteger($pks);
- // [7274] Get the model
+ // [7273] Get the model
$model = $this->getModel('Help_documents');
- // [7276] get the data to export
+ // [7275] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
- // [7280] now set the data to the spreadsheet
+ // [7279] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
}
}
- // [7285] Redirect to the list screen with error.
+ // [7284] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
@@ -74,31 +74,31 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData()
{
- // [7294] Check for request forgeries
+ // [7293] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7296] check if import is allowed for this user.
+ // [7295] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
- // [7300] Get the import model
+ // [7299] Get the import model
$model = $this->getModel('Help_documents');
- // [7302] get the headers to import
+ // [7301] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
- // [7306] Load headers to session.
+ // [7305] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'help_documents');
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
- // [7312] Redirect to import view.
+ // [7311] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
- // [7324] Redirect to the list screen with error.
+ // [7323] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
diff --git a/admin/controllers/preacher.php b/admin/controllers/preacher.php
index c983ee3c..b3ea7ec3 100644
--- a/admin/controllers/preacher.php
+++ b/admin/controllers/preacher.php
@@ -55,13 +55,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9313] Access check.
+ // [9312] Access check.
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
- // [9324] In the absense of better information, revert to the component permissions.
+ // [9323] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('preacher.create', $this->option);
}
@@ -77,13 +77,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9467] get user object.
+ // [9466] get user object.
$user = JFactory::getUser();
- // [9469] get record id.
+ // [9468] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
- // [9476] Access check.
+ // [9475] Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
@@ -92,17 +92,17 @@ class SermondistributorControllerPreacher extends JControllerForm
if ($recordId)
{
- // [9485] The record has been set. Check the record permissions.
+ // [9484] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor.preacher.' . $recordId))
{
- // [9507] Now test the owner is the user.
+ // [9506] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9511] Need to do a lookup from the model.
+ // [9510] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -112,7 +112,7 @@ class SermondistributorControllerPreacher extends JControllerForm
$ownerId = $record->created_by;
}
- // [9519] If the owner matches 'me' then allow.
+ // [9518] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
@@ -124,7 +124,7 @@ class SermondistributorControllerPreacher extends JControllerForm
return false;
}
}
- // [9541] Since there is no permission, revert to the component permissions.
+ // [9540] Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option);
}
diff --git a/admin/controllers/preachers.php b/admin/controllers/preachers.php
index 0376bfe5..38ecc42b 100644
--- a/admin/controllers/preachers.php
+++ b/admin/controllers/preachers.php
@@ -43,29 +43,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData()
{
- // [7263] Check for request forgeries
+ // [7262] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7265] check if export is allowed for this user.
+ // [7264] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
- // [7269] Get the input
+ // [7268] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
- // [7272] Sanitize the input
+ // [7271] Sanitize the input
JArrayHelper::toInteger($pks);
- // [7274] Get the model
+ // [7273] Get the model
$model = $this->getModel('Preachers');
- // [7276] get the data to export
+ // [7275] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
- // [7280] now set the data to the spreadsheet
+ // [7279] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers');
}
}
- // [7285] Redirect to the list screen with error.
+ // [7284] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
@@ -74,31 +74,31 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData()
{
- // [7294] Check for request forgeries
+ // [7293] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7296] check if import is allowed for this user.
+ // [7295] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
- // [7300] Get the import model
+ // [7299] Get the import model
$model = $this->getModel('Preachers');
- // [7302] get the headers to import
+ // [7301] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
- // [7306] Load headers to session.
+ // [7305] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('preacher_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'preachers');
$session->set('dataType_VDM_IMPORTINTO', 'preacher');
- // [7312] Redirect to import view.
+ // [7311] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
- // [7324] Redirect to the list screen with error.
+ // [7323] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
diff --git a/admin/controllers/series.php b/admin/controllers/series.php
index 15e93fcc..07ff138f 100644
--- a/admin/controllers/series.php
+++ b/admin/controllers/series.php
@@ -55,13 +55,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9313] Access check.
+ // [9312] Access check.
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
- // [9324] In the absense of better information, revert to the component permissions.
+ // [9323] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('series.create', $this->option);
}
@@ -77,13 +77,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9467] get user object.
+ // [9466] get user object.
$user = JFactory::getUser();
- // [9469] get record id.
+ // [9468] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
- // [9476] Access check.
+ // [9475] Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
@@ -92,17 +92,17 @@ class SermondistributorControllerSeries extends JControllerForm
if ($recordId)
{
- // [9485] The record has been set. Check the record permissions.
+ // [9484] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('series.edit.own', 'com_sermondistributor.series.' . $recordId))
{
- // [9507] Now test the owner is the user.
+ // [9506] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9511] Need to do a lookup from the model.
+ // [9510] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -112,7 +112,7 @@ class SermondistributorControllerSeries extends JControllerForm
$ownerId = $record->created_by;
}
- // [9519] If the owner matches 'me' then allow.
+ // [9518] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('series.edit.own', 'com_sermondistributor'))
@@ -124,7 +124,7 @@ class SermondistributorControllerSeries extends JControllerForm
return false;
}
}
- // [9541] Since there is no permission, revert to the component permissions.
+ // [9540] Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option);
}
diff --git a/admin/controllers/series_list.php b/admin/controllers/series_list.php
index 265a41bf..a249fd29 100644
--- a/admin/controllers/series_list.php
+++ b/admin/controllers/series_list.php
@@ -43,29 +43,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData()
{
- // [7263] Check for request forgeries
+ // [7262] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7265] check if export is allowed for this user.
+ // [7264] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
- // [7269] Get the input
+ // [7268] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
- // [7272] Sanitize the input
+ // [7271] Sanitize the input
JArrayHelper::toInteger($pks);
- // [7274] Get the model
+ // [7273] Get the model
$model = $this->getModel('Series_list');
- // [7276] get the data to export
+ // [7275] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
- // [7280] now set the data to the spreadsheet
+ // [7279] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list');
}
}
- // [7285] Redirect to the list screen with error.
+ // [7284] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
@@ -74,31 +74,31 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData()
{
- // [7294] Check for request forgeries
+ // [7293] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7296] check if import is allowed for this user.
+ // [7295] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
- // [7300] Get the import model
+ // [7299] Get the import model
$model = $this->getModel('Series_list');
- // [7302] get the headers to import
+ // [7301] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
- // [7306] Load headers to session.
+ // [7305] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('series_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'series_list');
$session->set('dataType_VDM_IMPORTINTO', 'series');
- // [7312] Redirect to import view.
+ // [7311] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
- // [7324] Redirect to the list screen with error.
+ // [7323] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
diff --git a/admin/controllers/sermon.php b/admin/controllers/sermon.php
index c326085c..591b6806 100644
--- a/admin/controllers/sermon.php
+++ b/admin/controllers/sermon.php
@@ -55,10 +55,10 @@ class SermondistributorControllerSermon extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9268] get the user object
+ // [9267] get the user object
$user = JFactory::getUser();
- // [9273] Access check.
+ // [9272] Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
{
@@ -69,13 +69,13 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
- // [9284] If the category has been passed in the URL check it.
+ // [9283] If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
}
if ($allow === null)
{
- // [9293] In the absense of better information, revert to the component permissions.
+ // [9292] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option);
}
else
@@ -95,13 +95,13 @@ class SermondistributorControllerSermon extends JControllerForm
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
- { // [9371] get user object.
+ { // [9370] get user object.
$user = JFactory::getUser();
- // [9373] get record id.
+ // [9372] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
- // [9380] Access check.
+ // [9379] Access check.
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
@@ -110,17 +110,17 @@ class SermondistributorControllerSermon extends JControllerForm
if ($recordId)
{
- // [9389] The record has been set. Check the record permissions.
+ // [9388] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor.sermon.' . $recordId))
{
- // [9411] Fallback on edit.own. Now test the owner is the user.
+ // [9410] Fallback on edit.own. Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9415] Need to do a lookup from the model.
+ // [9414] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -130,7 +130,7 @@ class SermondistributorControllerSermon extends JControllerForm
$ownerId = $record->created_by;
}
- // [9423] If the owner matches 'me' then do the test.
+ // [9422] If the owner matches 'me' then do the test.
if ($ownerId == $user->id)
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
@@ -146,7 +146,7 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
- // [9445] The category has been set. Check the category permissions.
+ // [9444] The category has been set. Check the category permissions.
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
if (!$catpermission && !is_null($catpermission))
{
@@ -154,7 +154,7 @@ class SermondistributorControllerSermon extends JControllerForm
}
}
}
- // [9455] Since there is no permission, revert to the component permissions.
+ // [9454] Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option);
}
diff --git a/admin/controllers/sermons.php b/admin/controllers/sermons.php
index a781619d..a8171717 100644
--- a/admin/controllers/sermons.php
+++ b/admin/controllers/sermons.php
@@ -43,29 +43,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData()
{
- // [7263] Check for request forgeries
+ // [7262] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7265] check if export is allowed for this user.
+ // [7264] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
- // [7269] Get the input
+ // [7268] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
- // [7272] Sanitize the input
+ // [7271] Sanitize the input
JArrayHelper::toInteger($pks);
- // [7274] Get the model
+ // [7273] Get the model
$model = $this->getModel('Sermons');
- // [7276] get the data to export
+ // [7275] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
- // [7280] now set the data to the spreadsheet
+ // [7279] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons');
}
}
- // [7285] Redirect to the list screen with error.
+ // [7284] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
@@ -74,31 +74,31 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData()
{
- // [7294] Check for request forgeries
+ // [7293] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7296] check if import is allowed for this user.
+ // [7295] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
- // [7300] Get the import model
+ // [7299] Get the import model
$model = $this->getModel('Sermons');
- // [7302] get the headers to import
+ // [7301] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
- // [7306] Load headers to session.
+ // [7305] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('sermon_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'sermons');
$session->set('dataType_VDM_IMPORTINTO', 'sermon');
- // [7312] Redirect to import view.
+ // [7311] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
- // [7324] Redirect to the list screen with error.
+ // [7323] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
diff --git a/admin/controllers/statistic.php b/admin/controllers/statistic.php
index 88b8e00d..92775294 100644
--- a/admin/controllers/statistic.php
+++ b/admin/controllers/statistic.php
@@ -55,13 +55,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowAdd($data = array())
{
- // [9313] Access check.
+ // [9312] Access check.
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
- // [9324] In the absense of better information, revert to the component permissions.
+ // [9323] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('statistic.create', $this->option);
}
@@ -77,13 +77,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9467] get user object.
+ // [9466] get user object.
$user = JFactory::getUser();
- // [9469] get record id.
+ // [9468] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
- // [9476] Access check.
+ // [9475] Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
@@ -92,17 +92,17 @@ class SermondistributorControllerStatistic extends JControllerForm
if ($recordId)
{
- // [9485] The record has been set. Check the record permissions.
+ // [9484] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor.statistic.' . $recordId))
{
- // [9507] Now test the owner is the user.
+ // [9506] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
- // [9511] Need to do a lookup from the model.
+ // [9510] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@@ -112,7 +112,7 @@ class SermondistributorControllerStatistic extends JControllerForm
$ownerId = $record->created_by;
}
- // [9519] If the owner matches 'me' then allow.
+ // [9518] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
@@ -124,7 +124,7 @@ class SermondistributorControllerStatistic extends JControllerForm
return false;
}
}
- // [9541] Since there is no permission, revert to the component permissions.
+ // [9540] Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option);
}
diff --git a/admin/controllers/statistics.php b/admin/controllers/statistics.php
index 2a2aeba2..a1e4588f 100644
--- a/admin/controllers/statistics.php
+++ b/admin/controllers/statistics.php
@@ -43,29 +43,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData()
{
- // [7263] Check for request forgeries
+ // [7262] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7265] check if export is allowed for this user.
+ // [7264] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
- // [7269] Get the input
+ // [7268] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
- // [7272] Sanitize the input
+ // [7271] Sanitize the input
JArrayHelper::toInteger($pks);
- // [7274] Get the model
+ // [7273] Get the model
$model = $this->getModel('Statistics');
- // [7276] get the data to export
+ // [7275] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
- // [7280] now set the data to the spreadsheet
+ // [7279] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics');
}
}
- // [7285] Redirect to the list screen with error.
+ // [7284] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
@@ -74,31 +74,31 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData()
{
- // [7294] Check for request forgeries
+ // [7293] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
- // [7296] check if import is allowed for this user.
+ // [7295] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
- // [7300] Get the import model
+ // [7299] Get the import model
$model = $this->getModel('Statistics');
- // [7302] get the headers to import
+ // [7301] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
- // [7306] Load headers to session.
+ // [7305] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('statistic_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'statistics');
$session->set('dataType_VDM_IMPORTINTO', 'statistic');
- // [7312] Redirect to import view.
+ // [7311] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
- // [7324] Redirect to the list screen with error.
+ // [7323] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
diff --git a/admin/layouts/preacher/sermons_fullwidth.php b/admin/layouts/preacher/sermons_fullwidth.php
index b34ed6c2..67781aae 100644
--- a/admin/layouts/preacher/sermons_fullwidth.php
+++ b/admin/layouts/preacher/sermons_fullwidth.php
@@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
-$items = $displayData->wcisermons;
+$items = $displayData->riksermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
diff --git a/admin/layouts/series/sermons_fullwidth.php b/admin/layouts/series/sermons_fullwidth.php
index c7bb85c8..aab4f57a 100644
--- a/admin/layouts/series/sermons_fullwidth.php
+++ b/admin/layouts/series/sermons_fullwidth.php
@@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
-$items = $displayData->kcesermons;
+$items = $displayData->hvwsermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
diff --git a/admin/layouts/sermon/stastics_fullwidth.php b/admin/layouts/sermon/stastics_fullwidth.php
index fa62b023..d9de67f1 100644
--- a/admin/layouts/sermon/stastics_fullwidth.php
+++ b/admin/layouts/sermon/stastics_fullwidth.php
@@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
-$items = $displayData->xtqstastics;
+$items = $displayData->njdstastics;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";
diff --git a/admin/models/ajax.php b/admin/models/ajax.php
index cecc3418..266485a0 100644
--- a/admin/models/ajax.php
+++ b/admin/models/ajax.php
@@ -38,7 +38,7 @@ class SermondistributorModelAjax extends JModelList
}
- // [8910] Used in sermon
+ // [8909] Used in sermon
/**
* Check and Set Dropbox local listing
**/
diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php
index 32021d5b..0cebacc8 100644
--- a/admin/models/fields/articles.php
+++ b/admin/models/fields/articles.php
@@ -45,36 +45,36 @@ class JFormFieldArticles extends JFormFieldList
*/
protected function getInput()
{
- // [7685] see if we should add buttons
+ // [7684] see if we should add buttons
$setButton = $this->getAttribute('button');
- // [7687] get html
+ // [7686] get html
$html = parent::getInput();
- // [7689] if true set button
+ // [7688] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
- // [7693] only add if user allowed to create article
+ // [7692] only add if user allowed to create article
if ($user->authorise('core.create', 'com_sermondistributor'))
{
- // [7711] get the input from url
+ // [7710] get the input from url
$jinput = JFactory::getApplication()->input;
- // [7713] get the view name & id
+ // [7712] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
- // [7718] check if new item
+ // [7717] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
- // [7722] only load referal if not new item.
+ // [7721] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
- // [7725] build the button
+ // [7724] build the button
$button = '
' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . ' ';
- // [7729] return the button attached to input field
+ // [7728] return the button attached to input field
return $html . $button;
}
}
diff --git a/admin/models/fields/dropboxfiles.php b/admin/models/fields/dropboxfiles.php
index 8bbd4e31..fc2c4d10 100644
--- a/admin/models/fields/dropboxfiles.php
+++ b/admin/models/fields/dropboxfiles.php
@@ -45,36 +45,36 @@ class JFormFieldDropboxfiles extends JFormFieldList
*/
protected function getInput()
{
- // [7685] see if we should add buttons
+ // [7684] see if we should add buttons
$setButton = $this->getAttribute('button');
- // [7687] get html
+ // [7686] get html
$html = parent::getInput();
- // [7689] if true set button
+ // [7688] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
- // [7693] only add if user allowed to create
+ // [7692] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
- // [7711] get the input from url
+ // [7710] get the input from url
$jinput = JFactory::getApplication()->input;
- // [7713] get the view name & id
+ // [7712] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
- // [7718] check if new item
+ // [7717] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
- // [7722] only load referal if not new item.
+ // [7721] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
- // [7725] build the button
+ // [7724] build the button
$button = '
' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . ' ';
- // [7729] return the button attached to input field
+ // [7728] return the button attached to input field
return $html . $button;
}
}
diff --git a/admin/models/fields/localfiles.php b/admin/models/fields/localfiles.php
index 8a0b26d1..bd7821ac 100644
--- a/admin/models/fields/localfiles.php
+++ b/admin/models/fields/localfiles.php
@@ -45,36 +45,36 @@ class JFormFieldLocalfiles extends JFormFieldList
*/
protected function getInput()
{
- // [7685] see if we should add buttons
+ // [7684] see if we should add buttons
$setButton = $this->getAttribute('button');
- // [7687] get html
+ // [7686] get html
$html = parent::getInput();
- // [7689] if true set button
+ // [7688] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
- // [7693] only add if user allowed to create
+ // [7692] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
- // [7711] get the input from url
+ // [7710] get the input from url
$jinput = JFactory::getApplication()->input;
- // [7713] get the view name & id
+ // [7712] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
- // [7718] check if new item
+ // [7717] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
- // [7722] only load referal if not new item.
+ // [7721] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
- // [7725] build the button
+ // [7724] build the button
$button = '
' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . ' ';
- // [7729] return the button attached to input field
+ // [7728] return the button attached to input field
return $html . $button;
}
}
diff --git a/admin/models/fields/preachers.php b/admin/models/fields/preachers.php
index 7440bd72..7d687b93 100644
--- a/admin/models/fields/preachers.php
+++ b/admin/models/fields/preachers.php
@@ -45,36 +45,36 @@ class JFormFieldPreachers extends JFormFieldList
*/
protected function getInput()
{
- // [7685] see if we should add buttons
+ // [7684] see if we should add buttons
$setButton = $this->getAttribute('button');
- // [7687] get html
+ // [7686] get html
$html = parent::getInput();
- // [7689] if true set button
+ // [7688] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
- // [7693] only add if user allowed to create preacher
+ // [7692] only add if user allowed to create preacher
if ($user->authorise('preacher.create', 'com_sermondistributor'))
{
- // [7711] get the input from url
+ // [7710] get the input from url
$jinput = JFactory::getApplication()->input;
- // [7713] get the view name & id
+ // [7712] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
- // [7718] check if new item
+ // [7717] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
- // [7722] only load referal if not new item.
+ // [7721] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
- // [7725] build the button
+ // [7724] build the button
$button = '
' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . ' ';
- // [7729] return the button attached to input field
+ // [7728] return the button attached to input field
return $html . $button;
}
}
diff --git a/admin/models/fields/series.php b/admin/models/fields/series.php
index acfe742d..b61304aa 100644
--- a/admin/models/fields/series.php
+++ b/admin/models/fields/series.php
@@ -45,36 +45,36 @@ class JFormFieldSeries extends JFormFieldList
*/
protected function getInput()
{
- // [7685] see if we should add buttons
+ // [7684] see if we should add buttons
$setButton = $this->getAttribute('button');
- // [7687] get html
+ // [7686] get html
$html = parent::getInput();
- // [7689] if true set button
+ // [7688] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
- // [7693] only add if user allowed to create series
+ // [7692] only add if user allowed to create series
if ($user->authorise('series.create', 'com_sermondistributor'))
{
- // [7711] get the input from url
+ // [7710] get the input from url
$jinput = JFactory::getApplication()->input;
- // [7713] get the view name & id
+ // [7712] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
- // [7718] check if new item
+ // [7717] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
- // [7722] only load referal if not new item.
+ // [7721] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
- // [7725] build the button
+ // [7724] build the button
$button = '
' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . ' ';
- // [7729] return the button attached to input field
+ // [7728] return the button attached to input field
return $html . $button;
}
}
diff --git a/admin/models/fields/sermon.php b/admin/models/fields/sermon.php
index b4e35699..aeeaef05 100644
--- a/admin/models/fields/sermon.php
+++ b/admin/models/fields/sermon.php
@@ -45,36 +45,36 @@ class JFormFieldSermon extends JFormFieldList
*/
protected function getInput()
{
- // [7685] see if we should add buttons
+ // [7684] see if we should add buttons
$setButton = $this->getAttribute('button');
- // [7687] get html
+ // [7686] get html
$html = parent::getInput();
- // [7689] if true set button
+ // [7688] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
- // [7693] only add if user allowed to create sermon
+ // [7692] only add if user allowed to create sermon
if ($user->authorise('sermon.create', 'com_sermondistributor'))
{
- // [7711] get the input from url
+ // [7710] get the input from url
$jinput = JFactory::getApplication()->input;
- // [7713] get the view name & id
+ // [7712] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
- // [7718] check if new item
+ // [7717] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
- // [7722] only load referal if not new item.
+ // [7721] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
- // [7725] build the button
+ // [7724] build the button
$button = '
' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . ' ';
- // [7729] return the button attached to input field
+ // [7728] return the button attached to input field
return $html . $button;
}
}
diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js
index 6f96d02d..3c0df3ea 100644
--- a/admin/models/forms/help_document.js
+++ b/admin/models/forms/help_document.js
@@ -18,38 +18,38 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_qgvZjvNaOJ_required = false;
-jform_HkhDrQjmhr_required = false;
-jform_llHjuZwvZl_required = false;
-jform_clywlAZYIP_required = false;
+jform_pfUDjYGVoL_required = false;
+jform_cfyFlnvkzP_required = false;
+jform_SSRqCogOIY_required = false;
+jform_qdgfzreiiB_required = false;
// Initial Script
jQuery(document).ready(function()
{
- var location_UohYgsV = jQuery("#jform_location input[type='radio']:checked").val();
- UohYgsV(location_UohYgsV);
+ var location_YqmLlcw = jQuery("#jform_location input[type='radio']:checked").val();
+ YqmLlcw(location_YqmLlcw);
- var location_dmkgZVG = jQuery("#jform_location input[type='radio']:checked").val();
- dmkgZVG(location_dmkgZVG);
+ var location_ErKnwQB = jQuery("#jform_location input[type='radio']:checked").val();
+ ErKnwQB(location_ErKnwQB);
- var type_qgvZjvN = jQuery("#jform_type").val();
- qgvZjvN(type_qgvZjvN);
+ var type_pfUDjYG = jQuery("#jform_type").val();
+ pfUDjYG(type_pfUDjYG);
- var type_HkhDrQj = jQuery("#jform_type").val();
- HkhDrQj(type_HkhDrQj);
+ var type_cfyFlnv = jQuery("#jform_type").val();
+ cfyFlnv(type_cfyFlnv);
- var type_llHjuZw = jQuery("#jform_type").val();
- llHjuZw(type_llHjuZw);
+ var type_SSRqCog = jQuery("#jform_type").val();
+ SSRqCog(type_SSRqCog);
- var target_clywlAZ = jQuery("#jform_target input[type='radio']:checked").val();
- clywlAZ(target_clywlAZ);
+ var target_qdgfzre = jQuery("#jform_target input[type='radio']:checked").val();
+ qdgfzre(target_qdgfzre);
});
-// the UohYgsV function
-function UohYgsV(location_UohYgsV)
+// the YqmLlcw function
+function YqmLlcw(location_YqmLlcw)
{
- // [8002] set the function logic
- if (location_UohYgsV == 1)
+ // [8001] set the function logic
+ if (location_YqmLlcw == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
}
@@ -59,11 +59,11 @@ function UohYgsV(location_UohYgsV)
}
}
-// the dmkgZVG function
-function dmkgZVG(location_dmkgZVG)
+// the ErKnwQB function
+function ErKnwQB(location_ErKnwQB)
{
- // [8002] set the function logic
- if (location_dmkgZVG == 2)
+ // [8001] set the function logic
+ if (location_ErKnwQB == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
}
@@ -73,198 +73,198 @@ function dmkgZVG(location_dmkgZVG)
}
}
-// the qgvZjvN function
-function qgvZjvN(type_qgvZjvN)
+// the pfUDjYG function
+function pfUDjYG(type_pfUDjYG)
{
- if (isSet(type_qgvZjvN) && type_qgvZjvN.constructor !== Array)
+ if (isSet(type_pfUDjYG) && type_pfUDjYG.constructor !== Array)
{
- var temp_qgvZjvN = type_qgvZjvN;
- var type_qgvZjvN = [];
- type_qgvZjvN.push(temp_qgvZjvN);
+ var temp_pfUDjYG = type_pfUDjYG;
+ var type_pfUDjYG = [];
+ type_pfUDjYG.push(temp_pfUDjYG);
}
- else if (!isSet(type_qgvZjvN))
+ else if (!isSet(type_pfUDjYG))
{
- var type_qgvZjvN = [];
+ var type_pfUDjYG = [];
}
- var type = type_qgvZjvN.some(type_qgvZjvN_SomeFunc);
+ var type = type_pfUDjYG.some(type_pfUDjYG_SomeFunc);
- // [7980] set this function logic
+ // [7979] set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
- if (jform_qgvZjvNaOJ_required)
+ if (jform_pfUDjYGVoL_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
- jform_qgvZjvNaOJ_required = false;
+ jform_pfUDjYGVoL_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
- if (!jform_qgvZjvNaOJ_required)
+ if (!jform_pfUDjYGVoL_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
- jform_qgvZjvNaOJ_required = true;
+ jform_pfUDjYGVoL_required = true;
}
}
}
-// the qgvZjvN Some function
-function type_qgvZjvN_SomeFunc(type_qgvZjvN)
+// the pfUDjYG Some function
+function type_pfUDjYG_SomeFunc(type_pfUDjYG)
{
- // [7967] set the function logic
- if (type_qgvZjvN == 3)
+ // [7966] set the function logic
+ if (type_pfUDjYG == 3)
{
return true;
}
return false;
}
-// the HkhDrQj function
-function HkhDrQj(type_HkhDrQj)
+// the cfyFlnv function
+function cfyFlnv(type_cfyFlnv)
{
- if (isSet(type_HkhDrQj) && type_HkhDrQj.constructor !== Array)
+ if (isSet(type_cfyFlnv) && type_cfyFlnv.constructor !== Array)
{
- var temp_HkhDrQj = type_HkhDrQj;
- var type_HkhDrQj = [];
- type_HkhDrQj.push(temp_HkhDrQj);
+ var temp_cfyFlnv = type_cfyFlnv;
+ var type_cfyFlnv = [];
+ type_cfyFlnv.push(temp_cfyFlnv);
}
- else if (!isSet(type_HkhDrQj))
+ else if (!isSet(type_cfyFlnv))
{
- var type_HkhDrQj = [];
+ var type_cfyFlnv = [];
}
- var type = type_HkhDrQj.some(type_HkhDrQj_SomeFunc);
+ var type = type_cfyFlnv.some(type_cfyFlnv_SomeFunc);
- // [7980] set this function logic
+ // [7979] set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
- if (jform_HkhDrQjmhr_required)
+ if (jform_cfyFlnvkzP_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
- jform_HkhDrQjmhr_required = false;
+ jform_cfyFlnvkzP_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
- if (!jform_HkhDrQjmhr_required)
+ if (!jform_cfyFlnvkzP_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
- jform_HkhDrQjmhr_required = true;
+ jform_cfyFlnvkzP_required = true;
}
}
}
-// the HkhDrQj Some function
-function type_HkhDrQj_SomeFunc(type_HkhDrQj)
+// the cfyFlnv Some function
+function type_cfyFlnv_SomeFunc(type_cfyFlnv)
{
- // [7967] set the function logic
- if (type_HkhDrQj == 1)
+ // [7966] set the function logic
+ if (type_cfyFlnv == 1)
{
return true;
}
return false;
}
-// the llHjuZw function
-function llHjuZw(type_llHjuZw)
+// the SSRqCog function
+function SSRqCog(type_SSRqCog)
{
- if (isSet(type_llHjuZw) && type_llHjuZw.constructor !== Array)
+ if (isSet(type_SSRqCog) && type_SSRqCog.constructor !== Array)
{
- var temp_llHjuZw = type_llHjuZw;
- var type_llHjuZw = [];
- type_llHjuZw.push(temp_llHjuZw);
+ var temp_SSRqCog = type_SSRqCog;
+ var type_SSRqCog = [];
+ type_SSRqCog.push(temp_SSRqCog);
}
- else if (!isSet(type_llHjuZw))
+ else if (!isSet(type_SSRqCog))
{
- var type_llHjuZw = [];
+ var type_SSRqCog = [];
}
- var type = type_llHjuZw.some(type_llHjuZw_SomeFunc);
+ var type = type_SSRqCog.some(type_SSRqCog_SomeFunc);
- // [7980] set this function logic
+ // [7979] set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
- if (jform_llHjuZwvZl_required)
+ if (jform_SSRqCogOIY_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
- jform_llHjuZwvZl_required = false;
+ jform_SSRqCogOIY_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
- if (!jform_llHjuZwvZl_required)
+ if (!jform_SSRqCogOIY_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
- jform_llHjuZwvZl_required = true;
+ jform_SSRqCogOIY_required = true;
}
}
}
-// the llHjuZw Some function
-function type_llHjuZw_SomeFunc(type_llHjuZw)
+// the SSRqCog Some function
+function type_SSRqCog_SomeFunc(type_SSRqCog)
{
- // [7967] set the function logic
- if (type_llHjuZw == 2)
+ // [7966] set the function logic
+ if (type_SSRqCog == 2)
{
return true;
}
return false;
}
-// the clywlAZ function
-function clywlAZ(target_clywlAZ)
+// the qdgfzre function
+function qdgfzre(target_qdgfzre)
{
- // [8002] set the function logic
- if (target_clywlAZ == 1)
+ // [8001] set the function logic
+ if (target_qdgfzre == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
- if (jform_clywlAZYIP_required)
+ if (jform_qdgfzreiiB_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
- jform_clywlAZYIP_required = false;
+ jform_qdgfzreiiB_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
- if (!jform_clywlAZYIP_required)
+ if (!jform_qdgfzreiiB_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
- jform_clywlAZYIP_required = true;
+ jform_qdgfzreiiB_required = true;
}
}
}
diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml
index 169125c4..24e40154 100644
--- a/admin/models/forms/help_document.xml
+++ b/admin/models/forms/help_document.xml
@@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
JTRASHED
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION
@@ -137,7 +137,7 @@
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL
-
+
-
+
-
+
-
+
-
+
-
+
-
+
JGLOBAL_INDEX_NOFOLLOW
JGLOBAL_NOINDEX_NOFOLLOW
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
JTRASHED
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
JGLOBAL_INDEX_NOFOLLOW
JGLOBAL_NOINDEX_NOFOLLOW
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
JTRASHED
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
JGLOBAL_INDEX_NOFOLLOW
JGLOBAL_NOINDEX_NOFOLLOW
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
JTRASHED
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED
COM_SERMONDISTRIBUTOR_SERMON_DIRECT
-
+
-
+
COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE
@@ -199,7 +199,7 @@
COM_SERMONDISTRIBUTOR_SERMON_URL
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
COM_SERMONDISTRIBUTOR_SERMON_MANUAL
COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC
-
+
-
+
-
+
JGLOBAL_INDEX_NOFOLLOW
JGLOBAL_NOINDEX_NOFOLLOW
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -42,18 +42,18 @@
JTRASHED
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
JGLOBAL_INDEX_NOFOLLOW
JGLOBAL_NOINDEX_NOFOLLOW
-
+
-
+
-
+
-
+
-
+
loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -127,12 +127,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // [9644] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // [9649] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -140,34 +140,34 @@ class SermondistributorModelHelp_document extends JModelAdmin
$user = JFactory::getUser();
- // [9656] Check for existing item.
- // [9657] Modify the form based on Edit State access controls.
+ // [9655] Check for existing item.
+ // [9656] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $id))
|| ($id == 0 && !$user->authorise('help_document.edit.state', 'com_sermondistributor')))
{
- // [9670] Disable fields for display.
+ // [9669] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9673] Disable fields while saving.
+ // [9672] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9678] Modify the form based on Edit Creaded By access controls.
+ // [9677] Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
{
- // [9690] Disable fields for display.
+ // [9689] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9692] Disable fields for display.
+ // [9691] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9694] Disable fields while saving.
+ // [9693] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [9697] Modify the form based on Edit Creaded Date access controls.
+ // [9696] Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
{
- // [9709] Disable fields for display.
+ // [9708] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [9711] Disable fields while saving.
+ // [9710] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -203,7 +203,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
$user = JFactory::getUser();
- // [9861] The record has been set. Check the record permissions.
+ // [9860] The record has been set. Check the record permissions.
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
}
return false;
@@ -225,14 +225,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
if ($recordId)
{
- // [9948] The record has been set. Check the record permissions.
+ // [9947] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [9965] In the absense of better information, revert to the component permissions.
+ // [9964] In the absense of better information, revert to the component permissions.
return $user->authorise('help_document.edit.state', 'com_sermondistributor');
}
@@ -247,7 +247,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9773] Check specific edit permission then general edit permission.
+ // [9772] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('help_document.edit', 'com_sermondistributor.help_document.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('help_document.edit', 'com_sermondistributor');
@@ -346,20 +346,20 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
- // [8764] check if the not_required field is set
+ // [8763] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
- // [8769] now change the required field attributes value
+ // [8768] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
- // [8772] make sure there is a string value
+ // [8771] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
- // [8775] change to false
+ // [8774] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
- // [8777] also clear the data set
+ // [8776] also clear the data set
$data[$requiredField] = '';
}
}
@@ -490,7 +490,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4926] Set some needed variables.
+ // [4925] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -504,12 +504,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
- // [4946] get list of uniqe fields
+ // [4945] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [4948] remove move_copy from array
+ // [4947] remove move_copy from array
unset($values['move_copy']);
- // [4951] make sure published is set
+ // [4950] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -521,21 +521,21 @@ class SermondistributorModelHelp_document extends JModelAdmin
$newIds = array();
- // [4988] Parent exists so let's proceed
+ // [4987] Parent exists so let's proceed
while (!empty($pks))
{
- // [4991] Pop the first ID off the stack
+ // [4990] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [4996] only allow copy if user may edit this item.
+ // [4995] only allow copy if user may edit this item.
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
- // [5006] Not fatal error
+ // [5005] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -543,19 +543,19 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
- // [5011] Check that the row actually exists
+ // [5010] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5016] Fatal error
+ // [5015] Fatal error
$this->setError($error);
return false;
}
else
{
- // [5023] Not fatal error
+ // [5022] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -563,7 +563,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
- // [5059] insert all set values
+ // [5058] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -575,7 +575,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
- // [5071] update all uniqe fields
+ // [5070] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -584,13 +584,13 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
- // [5080] Reset the ID because we are making a copy
+ // [5079] Reset the ID because we are making a copy
$this->table->id = 0;
- // [5083] TODO: Deal with ordering?
- // [5084] $this->table->ordering = 1;
+ // [5082] TODO: Deal with ordering?
+ // [5083] $this->table->ordering = 1;
- // [5086] Check the row.
+ // [5085] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -603,7 +603,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5099] Store the row.
+ // [5098] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -611,14 +611,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
- // [5107] Get the new item ID
+ // [5106] Get the new item ID
$newId = $this->table->get('id');
- // [5110] Add the new ID to the array
+ // [5109] Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5114] Clean the cache
+ // [5113] Clean the cache
$this->cleanCache();
return $newIds;
@@ -639,7 +639,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4728] Set some needed variables.
+ // [4727] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -654,15 +654,15 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
- // [4750] make sure published only updates if user has the permission.
+ // [4749] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
{
unset($values['published']);
}
- // [4763] remove move_copy from array
+ // [4762] remove move_copy from array
unset($values['move_copy']);
- // [4784] Parent exists so we proceed
+ // [4783] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
@@ -672,30 +672,30 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
- // [4801] Check that the row actually exists
+ // [4800] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [4806] Fatal error
+ // [4805] Fatal error
$this->setError($error);
return false;
}
else
{
- // [4813] Not fatal error
+ // [4812] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [4819] insert all set values.
+ // [4818] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [4824] Do special action for access.
+ // [4823] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -708,7 +708,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
- // [4836] Check the row.
+ // [4835] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -721,7 +721,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [4849] Store the row.
+ // [4848] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -730,7 +730,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
- // [4858] Clean the cache
+ // [4857] Clean the cache
$this->cleanCache();
return true;
@@ -774,7 +774,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5140] Alter the title for save as copy
+ // [5139] Alter the title for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@@ -797,7 +797,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['published'] = 0;
}
- // [5167] Automatic handling of alias for empty fields
+ // [5166] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@@ -828,10 +828,10 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
- // [5206] Alter the uniqe field for save as copy
+ // [5205] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5209] Automatic handling of other uniqe fields
+ // [5208] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@@ -885,7 +885,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
- // [5240] Alter the title & alias
+ // [5239] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php
index baef363f..099ae9be 100644
--- a/admin/models/help_documents.php
+++ b/admin/models/help_documents.php
@@ -108,16 +108,16 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getItems()
{
- // [10530] check in items
+ // [10529] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -128,7 +128,7 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
- // [10676] decode groups
+ // [10675] decode groups
$groupsArray = json_decode($item->groups, true);
if (SermondistributorHelper::checkArray($groupsArray))
{
@@ -151,14 +151,14 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
- // [10871] set selection value to a translatable value
+ // [10870] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
- // [10878] convert type
+ // [10877] convert type
$item->type = $this->selectionTranslation($item->type, 'type');
- // [10878] convert location
+ // [10877] convert location
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
@@ -175,7 +175,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function selectionTranslation($value,$name)
{
- // [10904] Array of type language strings
+ // [10903] Array of type language strings
if ($name == 'type')
{
$typeArray = array(
@@ -184,20 +184,20 @@ class SermondistributorModelHelp_documents extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
- // [10904] Array of location language strings
+ // [10903] Array of location language strings
if ($name == 'location')
{
$locationArray = array(
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
{
return $locationArray[$value];
@@ -213,19 +213,19 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getListQuery()
{
- // [7391] Get the user object.
+ // [7390] Get the user object.
$user = JFactory::getUser();
- // [7393] Create a new query object.
+ // [7392] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7396] Select some fields
+ // [7395] Select some fields
$query->select('a.*');
- // [7403] From the sermondistributor_item table
+ // [7402] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
- // [7417] Filter by published state
+ // [7416] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@@ -236,21 +236,21 @@ class SermondistributorModelHelp_documents extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
- // [7429] Join over the asset groups.
+ // [7428] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [7432] Filter by access level.
+ // [7431] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [7437] Implement View Level Access
+ // [7436] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7514] Filter by search.
+ // [7513] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@@ -265,28 +265,28 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
- // [7757] Filter by Type.
+ // [7756] Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
}
- // [7757] Filter by Location.
+ // [7756] Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
- // [7757] Filter by Admin_view.
+ // [7756] Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
}
- // [7757] Filter by Site_view.
+ // [7756] Filter by Site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
}
- // [7473] Add the list ordering clause.
+ // [7472] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@@ -304,42 +304,42 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExportData($pks)
{
- // [7181] setup the query
+ // [7180] setup the query
if (SermondistributorHelper::checkArray($pks))
{
- // [7184] Get the user object.
+ // [7183] Get the user object.
$user = JFactory::getUser();
- // [7186] Create a new query object.
+ // [7185] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7189] Select some fields
+ // [7188] Select some fields
$query->select('a.*');
- // [7191] From the sermondistributor_help_document table
+ // [7190] From the sermondistributor_help_document table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
- // [7201] Implement View Level Access
+ // [7200] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7208] Order the results by ordering
+ // [7207] Order the results by ordering
$query->order('a.ordering ASC');
- // [7210] Load the items
+ // [7209] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -350,13 +350,13 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
- // [10818] unset the values we don't want exported.
+ // [10817] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
- // [10827] Add headers to items array.
+ // [10826] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@@ -375,13 +375,13 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExImPortHeaders()
{
- // [7230] Get a db connection.
+ // [7229] Get a db connection.
$db = JFactory::getDbo();
- // [7232] get the columns
+ // [7231] get the columns
$columns = $db->getTableColumns("#__sermondistributor_help_document");
if (SermondistributorHelper::checkArray($columns))
{
- // [7236] remove the headers you don't import/export.
+ // [7235] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@@ -403,7 +403,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getStoreId($id = '')
{
- // [10153] Compile the store id.
+ // [10152] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@@ -427,15 +427,15 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function checkInNow()
{
- // [10546] Get set check in time
+ // [10545] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
- // [10551] Get a db connection.
+ // [10550] Get a db connection.
$db = JFactory::getDbo();
- // [10553] reset query
+ // [10552] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_help_document'));
@@ -443,24 +443,24 @@ class SermondistributorModelHelp_documents extends JModelList
$db->execute();
if ($db->getNumRows())
{
- // [10561] Get Yesterdays date
+ // [10560] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
- // [10563] reset query
+ // [10562] reset query
$query = $db->getQuery(true);
- // [10565] Fields to update.
+ // [10564] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
- // [10570] Conditions for which records should be updated.
+ // [10569] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
- // [10575] Check table
+ // [10574] Check table
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);
diff --git a/admin/models/preacher.php b/admin/models/preacher.php
index dc7c1211..6acdee21 100644
--- a/admin/models/preacher.php
+++ b/admin/models/preacher.php
@@ -96,7 +96,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.preacher');
}
}
- $this->preacherhsyu = $item->id;
+ $this->preacherqkei = $item->id;
return $item;
}
@@ -106,74 +106,74 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getWcisermons()
+ public function getRiksermons()
{
- // [6939] Get the user object.
+ // [6938] Get the user object.
$user = JFactory::getUser();
- // [6941] Create a new query object.
+ // [6940] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [6944] Select some fields
+ // [6943] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
- // [6951] From the sermondistributor_sermon table
+ // [6950] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
- // [7544] From the sermondistributor_preacher table.
+ // [7543] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
- // [7544] From the sermondistributor_series table.
+ // [7543] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
- // [6967] Filter by preacherhsyu global.
- $preacherhsyu = $this->preacherhsyu;
- if (is_numeric($preacherhsyu ))
+ // [6966] Filter by preacherqkei global.
+ $preacherqkei = $this->preacherqkei;
+ if (is_numeric($preacherqkei ))
{
- $query->where('a.preacher = ' . (int) $preacherhsyu );
+ $query->where('a.preacher = ' . (int) $preacherqkei );
}
- elseif (is_string($preacherhsyu))
+ elseif (is_string($preacherqkei))
{
- $query->where('a.preacher = ' . $db->quote($preacherhsyu));
+ $query->where('a.preacher = ' . $db->quote($preacherqkei));
}
else
{
$query->where('a.preacher = -5');
}
- // [6984] Join over the asset groups.
+ // [6983] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [6987] Filter by access level.
+ // [6986] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [6992] Implement View Level Access
+ // [6991] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [6999] Order the results by ordering
+ // [6998] Order the results by ordering
$query->order('a.ordering ASC');
- // [7001] Load the items
+ // [7000] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -187,15 +187,15 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
- // [10871] set selection value to a translatable value
+ // [10870] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
- // [10878] convert link_type
- $item->link_type = $this->selectionTranslationWcisermons($item->link_type, 'link_type');
- // [10878] convert source
- $item->source = $this->selectionTranslationWcisermons($item->source, 'source');
+ // [10877] convert link_type
+ $item->link_type = $this->selectionTranslationRiksermons($item->link_type, 'link_type');
+ // [10877] convert source
+ $item->source = $this->selectionTranslationRiksermons($item->source, 'source');
}
}
@@ -209,22 +209,22 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return translatable string
*/
- public function selectionTranslationWcisermons($value,$name)
+ public function selectionTranslationRiksermons($value,$name)
{
- // [10904] Array of link_type language strings
+ // [10903] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
- // [10904] Array of source language strings
+ // [10903] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@@ -233,7 +233,7 @@ class SermondistributorModelPreacher extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@@ -253,7 +253,7 @@ class SermondistributorModelPreacher extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9560] Get the form.
+ { // [9559] Get the form.
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -263,12 +263,12 @@ class SermondistributorModelPreacher extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // [9644] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // [9649] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -276,36 +276,36 @@ class SermondistributorModelPreacher extends JModelAdmin
$user = JFactory::getUser();
- // [9656] Check for existing item.
- // [9657] Modify the form based on Edit State access controls.
+ // [9655] Check for existing item.
+ // [9656] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.state', 'com_sermondistributor')))
{
- // [9670] Disable fields for display.
+ // [9669] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9673] Disable fields while saving.
+ // [9672] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9678] Modify the form based on Edit Creaded By access controls.
+ // [9677] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created_by', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created_by', 'com_sermondistributor')))
{
- // [9690] Disable fields for display.
+ // [9689] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9692] Disable fields for display.
+ // [9691] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9694] Disable fields while saving.
+ // [9693] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [9697] Modify the form based on Edit Creaded Date access controls.
+ // [9696] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created', 'com_sermondistributor')))
{
- // [9709] Disable fields for display.
+ // [9708] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [9711] Disable fields while saving.
+ // [9710] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -341,7 +341,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
$user = JFactory::getUser();
- // [9861] The record has been set. Check the record permissions.
+ // [9860] The record has been set. Check the record permissions.
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
}
return false;
@@ -363,14 +363,14 @@ class SermondistributorModelPreacher extends JModelAdmin
if ($recordId)
{
- // [9948] The record has been set. Check the record permissions.
+ // [9947] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [9965] In the absense of better information, revert to the component permissions.
+ // [9964] In the absense of better information, revert to the component permissions.
return $user->authorise('preacher.edit.state', 'com_sermondistributor');
}
@@ -385,7 +385,7 @@ class SermondistributorModelPreacher extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9773] Check specific edit permission then general edit permission.
+ // [9772] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('preacher.edit', 'com_sermondistributor.preacher.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('preacher.edit', 'com_sermondistributor');
@@ -592,7 +592,7 @@ class SermondistributorModelPreacher extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4926] Set some needed variables.
+ // [4925] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -606,12 +606,12 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
- // [4946] get list of uniqe fields
+ // [4945] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [4948] remove move_copy from array
+ // [4947] remove move_copy from array
unset($values['move_copy']);
- // [4951] make sure published is set
+ // [4950] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -623,21 +623,21 @@ class SermondistributorModelPreacher extends JModelAdmin
$newIds = array();
- // [4988] Parent exists so let's proceed
+ // [4987] Parent exists so let's proceed
while (!empty($pks))
{
- // [4991] Pop the first ID off the stack
+ // [4990] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [4996] only allow copy if user may edit this item.
+ // [4995] only allow copy if user may edit this item.
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
{
- // [5006] Not fatal error
+ // [5005] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -645,19 +645,19 @@ class SermondistributorModelPreacher extends JModelAdmin
}
- // [5011] Check that the row actually exists
+ // [5010] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5016] Fatal error
+ // [5015] Fatal error
$this->setError($error);
return false;
}
else
{
- // [5023] Not fatal error
+ // [5022] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -665,7 +665,7 @@ class SermondistributorModelPreacher extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
- // [5059] insert all set values
+ // [5058] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -677,7 +677,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
- // [5071] update all uniqe fields
+ // [5070] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -686,13 +686,13 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
- // [5080] Reset the ID because we are making a copy
+ // [5079] Reset the ID because we are making a copy
$this->table->id = 0;
- // [5083] TODO: Deal with ordering?
- // [5084] $this->table->ordering = 1;
+ // [5082] TODO: Deal with ordering?
+ // [5083] $this->table->ordering = 1;
- // [5086] Check the row.
+ // [5085] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -705,7 +705,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5099] Store the row.
+ // [5098] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -713,14 +713,14 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
- // [5107] Get the new item ID
+ // [5106] Get the new item ID
$newId = $this->table->get('id');
- // [5110] Add the new ID to the array
+ // [5109] Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5114] Clean the cache
+ // [5113] Clean the cache
$this->cleanCache();
return $newIds;
@@ -741,7 +741,7 @@ class SermondistributorModelPreacher extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4728] Set some needed variables.
+ // [4727] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -756,15 +756,15 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
- // [4750] make sure published only updates if user has the permission.
+ // [4749] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('preacher.edit.state'))
{
unset($values['published']);
}
- // [4763] remove move_copy from array
+ // [4762] remove move_copy from array
unset($values['move_copy']);
- // [4784] Parent exists so we proceed
+ // [4783] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
@@ -774,30 +774,30 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
- // [4801] Check that the row actually exists
+ // [4800] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [4806] Fatal error
+ // [4805] Fatal error
$this->setError($error);
return false;
}
else
{
- // [4813] Not fatal error
+ // [4812] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [4819] insert all set values.
+ // [4818] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [4824] Do special action for access.
+ // [4823] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -810,7 +810,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
- // [4836] Check the row.
+ // [4835] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -823,7 +823,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [4849] Store the row.
+ // [4848] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -832,7 +832,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
- // [4858] Clean the cache
+ // [4857] Clean the cache
$this->cleanCache();
return true;
@@ -870,7 +870,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5140] Alter the name for save as copy
+ // [5139] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@@ -893,7 +893,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['published'] = 0;
}
- // [5167] Automatic handling of alias for empty fields
+ // [5166] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@@ -924,10 +924,10 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
- // [5206] Alter the uniqe field for save as copy
+ // [5205] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5209] Automatic handling of other uniqe fields
+ // [5208] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@@ -981,7 +981,7 @@ class SermondistributorModelPreacher extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
- // [5240] Alter the title & alias
+ // [5239] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
diff --git a/admin/models/preachers.php b/admin/models/preachers.php
index 30b1c88c..5a8d966b 100644
--- a/admin/models/preachers.php
+++ b/admin/models/preachers.php
@@ -96,16 +96,16 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getItems()
{
- // [10530] check in items
+ // [10529] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -130,19 +130,19 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getListQuery()
{
- // [7391] Get the user object.
+ // [7390] Get the user object.
$user = JFactory::getUser();
- // [7393] Create a new query object.
+ // [7392] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7396] Select some fields
+ // [7395] Select some fields
$query->select('a.*');
- // [7403] From the sermondistributor_item table
+ // [7402] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
- // [7417] Filter by published state
+ // [7416] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@@ -153,21 +153,21 @@ class SermondistributorModelPreachers extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
- // [7429] Join over the asset groups.
+ // [7428] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [7432] Filter by access level.
+ // [7431] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [7437] Implement View Level Access
+ // [7436] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7514] Filter by search.
+ // [7513] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@@ -183,7 +183,7 @@ class SermondistributorModelPreachers extends JModelList
}
- // [7473] Add the list ordering clause.
+ // [7472] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@@ -201,42 +201,42 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExportData($pks)
{
- // [7181] setup the query
+ // [7180] setup the query
if (SermondistributorHelper::checkArray($pks))
{
- // [7184] Get the user object.
+ // [7183] Get the user object.
$user = JFactory::getUser();
- // [7186] Create a new query object.
+ // [7185] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7189] Select some fields
+ // [7188] Select some fields
$query->select('a.*');
- // [7191] From the sermondistributor_preacher table
+ // [7190] From the sermondistributor_preacher table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
- // [7201] Implement View Level Access
+ // [7200] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7208] Order the results by ordering
+ // [7207] Order the results by ordering
$query->order('a.ordering ASC');
- // [7210] Load the items
+ // [7209] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -247,13 +247,13 @@ class SermondistributorModelPreachers extends JModelList
continue;
}
- // [10818] unset the values we don't want exported.
+ // [10817] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
- // [10827] Add headers to items array.
+ // [10826] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@@ -272,13 +272,13 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExImPortHeaders()
{
- // [7230] Get a db connection.
+ // [7229] Get a db connection.
$db = JFactory::getDbo();
- // [7232] get the columns
+ // [7231] get the columns
$columns = $db->getTableColumns("#__sermondistributor_preacher");
if (SermondistributorHelper::checkArray($columns))
{
- // [7236] remove the headers you don't import/export.
+ // [7235] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@@ -300,7 +300,7 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getStoreId($id = '')
{
- // [10153] Compile the store id.
+ // [10152] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@@ -321,15 +321,15 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function checkInNow()
{
- // [10546] Get set check in time
+ // [10545] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
- // [10551] Get a db connection.
+ // [10550] Get a db connection.
$db = JFactory::getDbo();
- // [10553] reset query
+ // [10552] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_preacher'));
@@ -337,24 +337,24 @@ class SermondistributorModelPreachers extends JModelList
$db->execute();
if ($db->getNumRows())
{
- // [10561] Get Yesterdays date
+ // [10560] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
- // [10563] reset query
+ // [10562] reset query
$query = $db->getQuery(true);
- // [10565] Fields to update.
+ // [10564] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
- // [10570] Conditions for which records should be updated.
+ // [10569] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
- // [10575] Check table
+ // [10574] Check table
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query);
diff --git a/admin/models/series.php b/admin/models/series.php
index ee43c284..01154fcc 100644
--- a/admin/models/series.php
+++ b/admin/models/series.php
@@ -96,7 +96,7 @@ class SermondistributorModelSeries extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.series');
}
}
- $this->serieseolv = $item->id;
+ $this->serieszeat = $item->id;
return $item;
}
@@ -106,74 +106,74 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getKcesermons()
+ public function getHvwsermons()
{
- // [6939] Get the user object.
+ // [6938] Get the user object.
$user = JFactory::getUser();
- // [6941] Create a new query object.
+ // [6940] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [6944] Select some fields
+ // [6943] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
- // [6951] From the sermondistributor_sermon table
+ // [6950] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
- // [7544] From the sermondistributor_preacher table.
+ // [7543] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
- // [7544] From the sermondistributor_series table.
+ // [7543] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
- // [6967] Filter by serieseolv global.
- $serieseolv = $this->serieseolv;
- if (is_numeric($serieseolv ))
+ // [6966] Filter by serieszeat global.
+ $serieszeat = $this->serieszeat;
+ if (is_numeric($serieszeat ))
{
- $query->where('a.series = ' . (int) $serieseolv );
+ $query->where('a.series = ' . (int) $serieszeat );
}
- elseif (is_string($serieseolv))
+ elseif (is_string($serieszeat))
{
- $query->where('a.series = ' . $db->quote($serieseolv));
+ $query->where('a.series = ' . $db->quote($serieszeat));
}
else
{
$query->where('a.series = -5');
}
- // [6984] Join over the asset groups.
+ // [6983] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [6987] Filter by access level.
+ // [6986] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [6992] Implement View Level Access
+ // [6991] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [6999] Order the results by ordering
+ // [6998] Order the results by ordering
$query->order('a.ordering ASC');
- // [7001] Load the items
+ // [7000] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -187,15 +187,15 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
- // [10871] set selection value to a translatable value
+ // [10870] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
- // [10878] convert link_type
- $item->link_type = $this->selectionTranslationKcesermons($item->link_type, 'link_type');
- // [10878] convert source
- $item->source = $this->selectionTranslationKcesermons($item->source, 'source');
+ // [10877] convert link_type
+ $item->link_type = $this->selectionTranslationHvwsermons($item->link_type, 'link_type');
+ // [10877] convert source
+ $item->source = $this->selectionTranslationHvwsermons($item->source, 'source');
}
}
@@ -209,22 +209,22 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return translatable string
*/
- public function selectionTranslationKcesermons($value,$name)
+ public function selectionTranslationHvwsermons($value,$name)
{
- // [10904] Array of link_type language strings
+ // [10903] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
- // [10904] Array of source language strings
+ // [10903] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@@ -233,7 +233,7 @@ class SermondistributorModelSeries extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@@ -253,7 +253,7 @@ class SermondistributorModelSeries extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9560] Get the form.
+ { // [9559] Get the form.
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -263,12 +263,12 @@ class SermondistributorModelSeries extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // [9644] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // [9649] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -276,36 +276,36 @@ class SermondistributorModelSeries extends JModelAdmin
$user = JFactory::getUser();
- // [9656] Check for existing item.
- // [9657] Modify the form based on Edit State access controls.
+ // [9655] Check for existing item.
+ // [9656] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.state', 'com_sermondistributor')))
{
- // [9670] Disable fields for display.
+ // [9669] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9673] Disable fields while saving.
+ // [9672] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9678] Modify the form based on Edit Creaded By access controls.
+ // [9677] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('series.edit.created_by', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created_by', 'com_sermondistributor')))
{
- // [9690] Disable fields for display.
+ // [9689] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9692] Disable fields for display.
+ // [9691] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9694] Disable fields while saving.
+ // [9693] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [9697] Modify the form based on Edit Creaded Date access controls.
+ // [9696] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('series.edit.created', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created', 'com_sermondistributor')))
{
- // [9709] Disable fields for display.
+ // [9708] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [9711] Disable fields while saving.
+ // [9710] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -341,7 +341,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
$user = JFactory::getUser();
- // [9861] The record has been set. Check the record permissions.
+ // [9860] The record has been set. Check the record permissions.
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
}
return false;
@@ -363,14 +363,14 @@ class SermondistributorModelSeries extends JModelAdmin
if ($recordId)
{
- // [9948] The record has been set. Check the record permissions.
+ // [9947] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [9965] In the absense of better information, revert to the component permissions.
+ // [9964] In the absense of better information, revert to the component permissions.
return $user->authorise('series.edit.state', 'com_sermondistributor');
}
@@ -385,7 +385,7 @@ class SermondistributorModelSeries extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9773] Check specific edit permission then general edit permission.
+ // [9772] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('series.edit', 'com_sermondistributor.series.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('series.edit', 'com_sermondistributor');
@@ -592,7 +592,7 @@ class SermondistributorModelSeries extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4926] Set some needed variables.
+ // [4925] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -606,12 +606,12 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
- // [4946] get list of uniqe fields
+ // [4945] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [4948] remove move_copy from array
+ // [4947] remove move_copy from array
unset($values['move_copy']);
- // [4951] make sure published is set
+ // [4950] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -623,21 +623,21 @@ class SermondistributorModelSeries extends JModelAdmin
$newIds = array();
- // [4988] Parent exists so let's proceed
+ // [4987] Parent exists so let's proceed
while (!empty($pks))
{
- // [4991] Pop the first ID off the stack
+ // [4990] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [4996] only allow copy if user may edit this item.
+ // [4995] only allow copy if user may edit this item.
if (!$this->user->authorise('series.edit', $contexts[$pk]))
{
- // [5006] Not fatal error
+ // [5005] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -645,19 +645,19 @@ class SermondistributorModelSeries extends JModelAdmin
}
- // [5011] Check that the row actually exists
+ // [5010] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5016] Fatal error
+ // [5015] Fatal error
$this->setError($error);
return false;
}
else
{
- // [5023] Not fatal error
+ // [5022] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -665,7 +665,7 @@ class SermondistributorModelSeries extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
- // [5059] insert all set values
+ // [5058] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -677,7 +677,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
- // [5071] update all uniqe fields
+ // [5070] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -686,13 +686,13 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
- // [5080] Reset the ID because we are making a copy
+ // [5079] Reset the ID because we are making a copy
$this->table->id = 0;
- // [5083] TODO: Deal with ordering?
- // [5084] $this->table->ordering = 1;
+ // [5082] TODO: Deal with ordering?
+ // [5083] $this->table->ordering = 1;
- // [5086] Check the row.
+ // [5085] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -705,7 +705,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5099] Store the row.
+ // [5098] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -713,14 +713,14 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
- // [5107] Get the new item ID
+ // [5106] Get the new item ID
$newId = $this->table->get('id');
- // [5110] Add the new ID to the array
+ // [5109] Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5114] Clean the cache
+ // [5113] Clean the cache
$this->cleanCache();
return $newIds;
@@ -741,7 +741,7 @@ class SermondistributorModelSeries extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4728] Set some needed variables.
+ // [4727] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -756,15 +756,15 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
- // [4750] make sure published only updates if user has the permission.
+ // [4749] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('series.edit.state'))
{
unset($values['published']);
}
- // [4763] remove move_copy from array
+ // [4762] remove move_copy from array
unset($values['move_copy']);
- // [4784] Parent exists so we proceed
+ // [4783] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('series.edit', $contexts[$pk]))
@@ -774,30 +774,30 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
- // [4801] Check that the row actually exists
+ // [4800] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [4806] Fatal error
+ // [4805] Fatal error
$this->setError($error);
return false;
}
else
{
- // [4813] Not fatal error
+ // [4812] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [4819] insert all set values.
+ // [4818] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [4824] Do special action for access.
+ // [4823] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -810,7 +810,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
- // [4836] Check the row.
+ // [4835] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -823,7 +823,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [4849] Store the row.
+ // [4848] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -832,7 +832,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
- // [4858] Clean the cache
+ // [4857] Clean the cache
$this->cleanCache();
return true;
@@ -870,7 +870,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5140] Alter the name for save as copy
+ // [5139] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@@ -893,7 +893,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['published'] = 0;
}
- // [5167] Automatic handling of alias for empty fields
+ // [5166] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@@ -924,10 +924,10 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
- // [5206] Alter the uniqe field for save as copy
+ // [5205] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5209] Automatic handling of other uniqe fields
+ // [5208] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@@ -981,7 +981,7 @@ class SermondistributorModelSeries extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
- // [5240] Alter the title & alias
+ // [5239] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
diff --git a/admin/models/series_list.php b/admin/models/series_list.php
index 469e215a..d3af41aa 100644
--- a/admin/models/series_list.php
+++ b/admin/models/series_list.php
@@ -92,16 +92,16 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getItems()
{
- // [10530] check in items
+ // [10529] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -126,19 +126,19 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getListQuery()
{
- // [7391] Get the user object.
+ // [7390] Get the user object.
$user = JFactory::getUser();
- // [7393] Create a new query object.
+ // [7392] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7396] Select some fields
+ // [7395] Select some fields
$query->select('a.*');
- // [7403] From the sermondistributor_item table
+ // [7402] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
- // [7417] Filter by published state
+ // [7416] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@@ -149,21 +149,21 @@ class SermondistributorModelSeries_list extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
- // [7429] Join over the asset groups.
+ // [7428] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [7432] Filter by access level.
+ // [7431] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [7437] Implement View Level Access
+ // [7436] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7514] Filter by search.
+ // [7513] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@@ -179,7 +179,7 @@ class SermondistributorModelSeries_list extends JModelList
}
- // [7473] Add the list ordering clause.
+ // [7472] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@@ -197,42 +197,42 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExportData($pks)
{
- // [7181] setup the query
+ // [7180] setup the query
if (SermondistributorHelper::checkArray($pks))
{
- // [7184] Get the user object.
+ // [7183] Get the user object.
$user = JFactory::getUser();
- // [7186] Create a new query object.
+ // [7185] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7189] Select some fields
+ // [7188] Select some fields
$query->select('a.*');
- // [7191] From the sermondistributor_series table
+ // [7190] From the sermondistributor_series table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
- // [7201] Implement View Level Access
+ // [7200] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7208] Order the results by ordering
+ // [7207] Order the results by ordering
$query->order('a.ordering ASC');
- // [7210] Load the items
+ // [7209] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -243,13 +243,13 @@ class SermondistributorModelSeries_list extends JModelList
continue;
}
- // [10818] unset the values we don't want exported.
+ // [10817] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
- // [10827] Add headers to items array.
+ // [10826] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@@ -268,13 +268,13 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExImPortHeaders()
{
- // [7230] Get a db connection.
+ // [7229] Get a db connection.
$db = JFactory::getDbo();
- // [7232] get the columns
+ // [7231] get the columns
$columns = $db->getTableColumns("#__sermondistributor_series");
if (SermondistributorHelper::checkArray($columns))
{
- // [7236] remove the headers you don't import/export.
+ // [7235] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@@ -296,7 +296,7 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getStoreId($id = '')
{
- // [10153] Compile the store id.
+ // [10152] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@@ -316,15 +316,15 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function checkInNow()
{
- // [10546] Get set check in time
+ // [10545] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
- // [10551] Get a db connection.
+ // [10550] Get a db connection.
$db = JFactory::getDbo();
- // [10553] reset query
+ // [10552] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_series'));
@@ -332,24 +332,24 @@ class SermondistributorModelSeries_list extends JModelList
$db->execute();
if ($db->getNumRows())
{
- // [10561] Get Yesterdays date
+ // [10560] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
- // [10563] reset query
+ // [10562] reset query
$query = $db->getQuery(true);
- // [10565] Fields to update.
+ // [10564] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
- // [10570] Conditions for which records should be updated.
+ // [10569] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
- // [10575] Check table
+ // [10574] Check table
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query);
diff --git a/admin/models/sermon.php b/admin/models/sermon.php
index f10120f6..0ed69f2f 100644
--- a/admin/models/sermon.php
+++ b/admin/models/sermon.php
@@ -108,7 +108,7 @@ class SermondistributorModelSermon extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.sermon');
}
}
- $this->sermonrwfz = $item->id;
+ $this->sermonkndl = $item->id;
return $item;
}
@@ -118,76 +118,76 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getXtqstastics()
+ public function getNjdstastics()
{
- // [6939] Get the user object.
+ // [6938] Get the user object.
$user = JFactory::getUser();
- // [6941] Create a new query object.
+ // [6940] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [6944] Select some fields
+ // [6943] Select some fields
$query->select('a.*');
- // [6951] From the sermondistributor_statistic table
+ // [6950] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
- // [7544] From the sermondistributor_sermon table.
+ // [7543] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
- // [7544] From the sermondistributor_preacher table.
+ // [7543] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
- // [7544] From the sermondistributor_series table.
+ // [7543] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
- // [6967] Filter by sermonrwfz global.
- $sermonrwfz = $this->sermonrwfz;
- if (is_numeric($sermonrwfz ))
+ // [6966] Filter by sermonkndl global.
+ $sermonkndl = $this->sermonkndl;
+ if (is_numeric($sermonkndl ))
{
- $query->where('a.sermon = ' . (int) $sermonrwfz );
+ $query->where('a.sermon = ' . (int) $sermonkndl );
}
- elseif (is_string($sermonrwfz))
+ elseif (is_string($sermonkndl))
{
- $query->where('a.sermon = ' . $db->quote($sermonrwfz));
+ $query->where('a.sermon = ' . $db->quote($sermonkndl));
}
else
{
$query->where('a.sermon = -5');
}
- // [6984] Join over the asset groups.
+ // [6983] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [6987] Filter by access level.
+ // [6986] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [6992] Implement View Level Access
+ // [6991] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [6999] Order the results by ordering
+ // [6998] Order the results by ordering
$query->order('a.ordering ASC');
- // [7001] Load the items
+ // [7000] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -216,7 +216,7 @@ class SermondistributorModelSermon extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9560] Get the form.
+ { // [9559] Get the form.
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -226,17 +226,17 @@ class SermondistributorModelSermon extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9587] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // [9586] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9592] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // [9591] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
- // [9597] Determine correct permissions to check.
+ // [9596] Determine correct permissions to check.
if ($this->getState('sermon.id'))
{
$id = $this->getState('sermon.id');
@@ -244,56 +244,56 @@ class SermondistributorModelSermon extends JModelAdmin
$catid = 0;
if (isset($this->getItem($id)->catid))
{
- // [9604] set catagory id
+ // [9603] set catagory id
$catid = $this->getItem($id)->catid;
- // [9606] Existing record. Can only edit in selected categories.
+ // [9605] Existing record. Can only edit in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit');
- // [9608] Existing record. Can only edit own items in selected categories.
+ // [9607] Existing record. Can only edit own items in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
}
}
else
{
- // [9614] New record. Can only create in selected categories.
+ // [9613] New record. Can only create in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.create');
}
$user = JFactory::getUser();
- // [9618] Check for existing item.
- // [9619] Modify the form based on Edit State access controls.
+ // [9617] Check for existing item.
+ // [9618] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $id))
|| (isset($catid) && $catid != 0 && !$user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $catid))
|| ($id == 0 && !$user->authorise('sermon.edit.state', 'com_sermondistributor')))
{
- // [9634] Disable fields for display.
+ // [9633] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9637] Disable fields while saving.
+ // [9636] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9678] Modify the form based on Edit Creaded By access controls.
+ // [9677] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created_by', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created_by', 'com_sermondistributor')))
{
- // [9690] Disable fields for display.
+ // [9689] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9692] Disable fields for display.
+ // [9691] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9694] Disable fields while saving.
+ // [9693] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [9697] Modify the form based on Edit Creaded Date access controls.
+ // [9696] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created', 'com_sermondistributor')))
{
- // [9709] Disable fields for display.
+ // [9708] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [9711] Disable fields while saving.
+ // [9710] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -333,7 +333,7 @@ class SermondistributorModelSermon extends JModelAdmin
if ($allow)
{
- // [9832] The record has been set. Check the record permissions.
+ // [9831] The record has been set. Check the record permissions.
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
}
return $allow;
@@ -357,14 +357,14 @@ class SermondistributorModelSermon extends JModelAdmin
if ($recordId)
{
- // [9905] The record has been set. Check the record permissions.
+ // [9904] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [9921] Check against the category.
+ // [9920] Check against the category.
if (!empty($record->catid))
{
$catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid);
@@ -373,7 +373,7 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
}
- // [9932] In the absense of better information, revert to the component permissions.
+ // [9931] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.edit.state', 'com_sermondistributor');
}
@@ -388,7 +388,7 @@ class SermondistributorModelSermon extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9773] Check specific edit permission then general edit permission.
+ // [9772] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('sermon.edit', 'com_sermondistributor.sermon.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('sermon.edit', 'com_sermondistributor');
@@ -487,20 +487,20 @@ class SermondistributorModelSermon extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
- // [8764] check if the not_required field is set
+ // [8763] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
- // [8769] now change the required field attributes value
+ // [8768] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
- // [8772] make sure there is a string value
+ // [8771] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
- // [8775] change to false
+ // [8774] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
- // [8777] also clear the data set
+ // [8776] also clear the data set
$data[$requiredField] = '';
}
}
@@ -631,7 +631,7 @@ class SermondistributorModelSermon extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4926] Set some needed variables.
+ // [4925] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -645,12 +645,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
- // [4946] get list of uniqe fields
+ // [4945] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [4948] remove move_copy from array
+ // [4947] remove move_copy from array
unset($values['move_copy']);
- // [4951] make sure published is set
+ // [4950] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -666,7 +666,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
- // [4976] move the category value to correct field name
+ // [4975] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@@ -677,21 +677,21 @@ class SermondistributorModelSermon extends JModelAdmin
$newIds = array();
- // [4988] Parent exists so let's proceed
+ // [4987] Parent exists so let's proceed
while (!empty($pks))
{
- // [4991] Pop the first ID off the stack
+ // [4990] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [4996] only allow copy if user may edit this item.
+ // [4995] only allow copy if user may edit this item.
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
{
- // [5006] Not fatal error
+ // [5005] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -699,19 +699,19 @@ class SermondistributorModelSermon extends JModelAdmin
}
- // [5011] Check that the row actually exists
+ // [5010] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5016] Fatal error
+ // [5015] Fatal error
$this->setError($error);
return false;
}
else
{
- // [5023] Not fatal error
+ // [5022] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -726,7 +726,7 @@ class SermondistributorModelSermon extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->generateNewTitle($this->table->catid, $this->table->alias, $this->table->name);
}
- // [5059] insert all set values
+ // [5058] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -738,7 +738,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
- // [5071] update all uniqe fields
+ // [5070] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -747,13 +747,13 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
- // [5080] Reset the ID because we are making a copy
+ // [5079] Reset the ID because we are making a copy
$this->table->id = 0;
- // [5083] TODO: Deal with ordering?
- // [5084] $this->table->ordering = 1;
+ // [5082] TODO: Deal with ordering?
+ // [5083] $this->table->ordering = 1;
- // [5086] Check the row.
+ // [5085] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -766,7 +766,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5099] Store the row.
+ // [5098] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -774,14 +774,14 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
- // [5107] Get the new item ID
+ // [5106] Get the new item ID
$newId = $this->table->get('id');
- // [5110] Add the new ID to the array
+ // [5109] Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5114] Clean the cache
+ // [5113] Clean the cache
$this->cleanCache();
return $newIds;
@@ -802,7 +802,7 @@ class SermondistributorModelSermon extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4728] Set some needed variables.
+ // [4727] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -817,12 +817,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
- // [4750] make sure published only updates if user has the permission.
+ // [4749] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('sermon.edit.state'))
{
unset($values['published']);
}
- // [4763] remove move_copy from array
+ // [4762] remove move_copy from array
unset($values['move_copy']);
if (isset($values['category']) && (int) $values['category'] > 0 && !static::checkCategoryId($values['category']))
@@ -831,7 +831,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
- // [4774] move the category value to correct field name
+ // [4773] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@@ -841,7 +841,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
- // [4784] Parent exists so we proceed
+ // [4783] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
@@ -851,30 +851,30 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
- // [4801] Check that the row actually exists
+ // [4800] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [4806] Fatal error
+ // [4805] Fatal error
$this->setError($error);
return false;
}
else
{
- // [4813] Not fatal error
+ // [4812] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [4819] insert all set values.
+ // [4818] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [4824] Do special action for access.
+ // [4823] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -887,7 +887,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
- // [4836] Check the row.
+ // [4835] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -900,7 +900,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [4849] Store the row.
+ // [4848] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -909,7 +909,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
- // [4858] Clean the cache
+ // [4857] Clean the cache
$this->cleanCache();
return true;
@@ -959,7 +959,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5140] Alter the name for save as copy
+ // [5139] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@@ -982,7 +982,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['published'] = 0;
}
- // [5167] Automatic handling of alias for empty fields
+ // [5166] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@@ -1013,10 +1013,10 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
- // [5206] Alter the uniqe field for save as copy
+ // [5205] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5209] Automatic handling of other uniqe fields
+ // [5208] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@@ -1070,7 +1070,7 @@ class SermondistributorModelSermon extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
- // [5240] Alter the title & alias
+ // [5239] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))
diff --git a/admin/models/sermondistributor.php b/admin/models/sermondistributor.php
index 5341c6fe..a8a791e9 100644
--- a/admin/models/sermondistributor.php
+++ b/admin/models/sermondistributor.php
@@ -40,7 +40,7 @@ class SermondistributorModelSermondistributor extends JModelList
$viewGroups = array(
'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.help_documents')
);
- // [12176] view access array
+ // [12175] view access array
$viewAccess = array(
'preacher.create' => 'preacher.create',
'preachers.access' => 'preacher.access',
diff --git a/admin/models/sermons.php b/admin/models/sermons.php
index c3bda643..56c84ec9 100644
--- a/admin/models/sermons.php
+++ b/admin/models/sermons.php
@@ -124,16 +124,16 @@ class SermondistributorModelSermons extends JModelList
*/
public function getItems()
{
- // [10530] check in items
+ // [10529] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -147,14 +147,14 @@ class SermondistributorModelSermons extends JModelList
}
}
- // [10871] set selection value to a translatable value
+ // [10870] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
- // [10878] convert link_type
+ // [10877] convert link_type
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
- // [10878] convert source
+ // [10877] convert source
$item->source = $this->selectionTranslation($item->source, 'source');
}
}
@@ -171,20 +171,20 @@ class SermondistributorModelSermons extends JModelList
*/
public function selectionTranslation($value,$name)
{
- // [10904] Array of link_type language strings
+ // [10903] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
- // [10904] Array of source language strings
+ // [10903] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@@ -193,7 +193,7 @@ class SermondistributorModelSermons extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
- // [10935] Now check if value is found in this array
+ // [10934] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@@ -209,29 +209,29 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getListQuery()
{
- // [7391] Get the user object.
+ // [7390] Get the user object.
$user = JFactory::getUser();
- // [7393] Create a new query object.
+ // [7392] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7396] Select some fields
+ // [7395] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
- // [7403] From the sermondistributor_item table
+ // [7402] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
- // [7544] From the sermondistributor_preacher table.
+ // [7543] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
- // [7544] From the sermondistributor_series table.
+ // [7543] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
- // [7417] Filter by published state
+ // [7416] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@@ -242,21 +242,21 @@ class SermondistributorModelSermons extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
- // [7429] Join over the asset groups.
+ // [7428] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [7432] Filter by access level.
+ // [7431] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [7437] Implement View Level Access
+ // [7436] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7514] Filter by search.
+ // [7513] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@@ -271,28 +271,28 @@ class SermondistributorModelSermons extends JModelList
}
}
- // [7748] Filter by preacher.
+ // [7747] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
- // [7748] Filter by series.
+ // [7747] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
- // [7757] Filter by Link_type.
+ // [7756] Filter by Link_type.
if ($link_type = $this->getState('filter.link_type'))
{
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
}
- // [7757] Filter by Source.
+ // [7756] Filter by Source.
if ($source = $this->getState('filter.source'))
{
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
}
- // [7451] Filter by a single or group of categories.
+ // [7450] Filter by a single or group of categories.
$baselevel = 1;
$categoryId = $this->getState('filter.category_id');
@@ -314,7 +314,7 @@ class SermondistributorModelSermons extends JModelList
}
- // [7473] Add the list ordering clause.
+ // [7472] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@@ -332,42 +332,42 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExportData($pks)
{
- // [7181] setup the query
+ // [7180] setup the query
if (SermondistributorHelper::checkArray($pks))
{
- // [7184] Get the user object.
+ // [7183] Get the user object.
$user = JFactory::getUser();
- // [7186] Create a new query object.
+ // [7185] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7189] Select some fields
+ // [7188] Select some fields
$query->select('a.*');
- // [7191] From the sermondistributor_sermon table
+ // [7190] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
- // [7201] Implement View Level Access
+ // [7200] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7208] Order the results by ordering
+ // [7207] Order the results by ordering
$query->order('a.ordering ASC');
- // [7210] Load the items
+ // [7209] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -378,13 +378,13 @@ class SermondistributorModelSermons extends JModelList
continue;
}
- // [10818] unset the values we don't want exported.
+ // [10817] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
- // [10827] Add headers to items array.
+ // [10826] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@@ -403,13 +403,13 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExImPortHeaders()
{
- // [7230] Get a db connection.
+ // [7229] Get a db connection.
$db = JFactory::getDbo();
- // [7232] get the columns
+ // [7231] get the columns
$columns = $db->getTableColumns("#__sermondistributor_sermon");
if (SermondistributorHelper::checkArray($columns))
{
- // [7236] remove the headers you don't import/export.
+ // [7235] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@@ -431,7 +431,7 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getStoreId($id = '')
{
- // [10153] Compile the store id.
+ // [10152] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@@ -459,15 +459,15 @@ class SermondistributorModelSermons extends JModelList
*/
protected function checkInNow()
{
- // [10546] Get set check in time
+ // [10545] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
- // [10551] Get a db connection.
+ // [10550] Get a db connection.
$db = JFactory::getDbo();
- // [10553] reset query
+ // [10552] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_sermon'));
@@ -475,24 +475,24 @@ class SermondistributorModelSermons extends JModelList
$db->execute();
if ($db->getNumRows())
{
- // [10561] Get Yesterdays date
+ // [10560] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
- // [10563] reset query
+ // [10562] reset query
$query = $db->getQuery(true);
- // [10565] Fields to update.
+ // [10564] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
- // [10570] Conditions for which records should be updated.
+ // [10569] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
- // [10575] Check table
+ // [10574] Check table
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query);
diff --git a/admin/models/statistic.php b/admin/models/statistic.php
index 04f987a7..eaef7da4 100644
--- a/admin/models/statistic.php
+++ b/admin/models/statistic.php
@@ -111,7 +111,7 @@ class SermondistributorModelStatistic extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
- { // [9560] Get the form.
+ { // [9559] Get the form.
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@@ -121,12 +121,12 @@ class SermondistributorModelStatistic extends JModelAdmin
$jinput = JFactory::getApplication()->input;
- // [9645] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ // [9644] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
- // [9650] The back end uses id so we use that the rest of the time and set it to 0 by default.
+ // [9649] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@@ -134,36 +134,36 @@ class SermondistributorModelStatistic extends JModelAdmin
$user = JFactory::getUser();
- // [9656] Check for existing item.
- // [9657] Modify the form based on Edit State access controls.
+ // [9655] Check for existing item.
+ // [9656] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.state', 'com_sermondistributor')))
{
- // [9670] Disable fields for display.
+ // [9669] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
- // [9673] Disable fields while saving.
+ // [9672] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
- // [9678] Modify the form based on Edit Creaded By access controls.
+ // [9677] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created_by', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created_by', 'com_sermondistributor')))
{
- // [9690] Disable fields for display.
+ // [9689] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
- // [9692] Disable fields for display.
+ // [9691] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
- // [9694] Disable fields while saving.
+ // [9693] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
- // [9697] Modify the form based on Edit Creaded Date access controls.
+ // [9696] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created', 'com_sermondistributor')))
{
- // [9709] Disable fields for display.
+ // [9708] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
- // [9711] Disable fields while saving.
+ // [9710] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@@ -199,7 +199,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
$user = JFactory::getUser();
- // [9861] The record has been set. Check the record permissions.
+ // [9860] The record has been set. Check the record permissions.
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
}
return false;
@@ -221,14 +221,14 @@ class SermondistributorModelStatistic extends JModelAdmin
if ($recordId)
{
- // [9948] The record has been set. Check the record permissions.
+ // [9947] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
- // [9965] In the absense of better information, revert to the component permissions.
+ // [9964] In the absense of better information, revert to the component permissions.
return $user->authorise('statistic.edit.state', 'com_sermondistributor');
}
@@ -243,7 +243,7 @@ class SermondistributorModelStatistic extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
- // [9773] Check specific edit permission then general edit permission.
+ // [9772] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('statistic.edit', 'com_sermondistributor.statistic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('statistic.edit', 'com_sermondistributor');
@@ -450,7 +450,7 @@ class SermondistributorModelStatistic extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4926] Set some needed variables.
+ // [4925] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -464,12 +464,12 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
- // [4946] get list of uniqe fields
+ // [4945] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
- // [4948] remove move_copy from array
+ // [4947] remove move_copy from array
unset($values['move_copy']);
- // [4951] make sure published is set
+ // [4950] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@@ -481,21 +481,21 @@ class SermondistributorModelStatistic extends JModelAdmin
$newIds = array();
- // [4988] Parent exists so let's proceed
+ // [4987] Parent exists so let's proceed
while (!empty($pks))
{
- // [4991] Pop the first ID off the stack
+ // [4990] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
- // [4996] only allow copy if user may edit this item.
+ // [4995] only allow copy if user may edit this item.
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
{
- // [5006] Not fatal error
+ // [5005] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@@ -503,19 +503,19 @@ class SermondistributorModelStatistic extends JModelAdmin
}
- // [5011] Check that the row actually exists
+ // [5010] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [5016] Fatal error
+ // [5015] Fatal error
$this->setError($error);
return false;
}
else
{
- // [5023] Not fatal error
+ // [5022] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@@ -523,7 +523,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->table->filename = $this->generateUniqe('filename',$this->table->filename);
- // [5059] insert all set values
+ // [5058] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@@ -535,7 +535,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
- // [5071] update all uniqe fields
+ // [5070] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@@ -544,13 +544,13 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
- // [5080] Reset the ID because we are making a copy
+ // [5079] Reset the ID because we are making a copy
$this->table->id = 0;
- // [5083] TODO: Deal with ordering?
- // [5084] $this->table->ordering = 1;
+ // [5082] TODO: Deal with ordering?
+ // [5083] $this->table->ordering = 1;
- // [5086] Check the row.
+ // [5085] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -563,7 +563,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [5099] Store the row.
+ // [5098] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -571,14 +571,14 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
- // [5107] Get the new item ID
+ // [5106] Get the new item ID
$newId = $this->table->get('id');
- // [5110] Add the new ID to the array
+ // [5109] Add the new ID to the array
$newIds[$pk] = $newId;
}
- // [5114] Clean the cache
+ // [5113] Clean the cache
$this->cleanCache();
return $newIds;
@@ -599,7 +599,7 @@ class SermondistributorModelStatistic extends JModelAdmin
{
if (empty($this->batchSet))
{
- // [4728] Set some needed variables.
+ // [4727] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@@ -614,15 +614,15 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
- // [4750] make sure published only updates if user has the permission.
+ // [4749] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('statistic.edit.state'))
{
unset($values['published']);
}
- // [4763] remove move_copy from array
+ // [4762] remove move_copy from array
unset($values['move_copy']);
- // [4784] Parent exists so we proceed
+ // [4783] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
@@ -632,30 +632,30 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
- // [4801] Check that the row actually exists
+ // [4800] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
- // [4806] Fatal error
+ // [4805] Fatal error
$this->setError($error);
return false;
}
else
{
- // [4813] Not fatal error
+ // [4812] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
- // [4819] insert all set values.
+ // [4818] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
- // [4824] Do special action for access.
+ // [4823] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@@ -668,7 +668,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
- // [4836] Check the row.
+ // [4835] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@@ -681,7 +681,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
- // [4849] Store the row.
+ // [4848] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@@ -690,7 +690,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
- // [4858] Clean the cache
+ // [4857] Clean the cache
$this->cleanCache();
return true;
@@ -728,10 +728,10 @@ class SermondistributorModelStatistic extends JModelAdmin
$data['params'] = (string) $params;
}
- // [5206] Alter the uniqe field for save as copy
+ // [5205] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
- // [5209] Automatic handling of other uniqe fields
+ // [5208] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@@ -784,7 +784,7 @@ class SermondistributorModelStatistic extends JModelAdmin
protected function _generateNewTitle($title)
{
- // [5264] Alter the title
+ // [5263] Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
diff --git a/admin/models/statistics.php b/admin/models/statistics.php
index b3707753..ebbb9732 100644
--- a/admin/models/statistics.php
+++ b/admin/models/statistics.php
@@ -108,16 +108,16 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getItems()
{
- // [10530] check in items
+ // [10529] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -142,31 +142,31 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getListQuery()
{
- // [7391] Get the user object.
+ // [7390] Get the user object.
$user = JFactory::getUser();
- // [7393] Create a new query object.
+ // [7392] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7396] Select some fields
+ // [7395] Select some fields
$query->select('a.*');
- // [7403] From the sermondistributor_item table
+ // [7402] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
- // [7544] From the sermondistributor_sermon table.
+ // [7543] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
- // [7544] From the sermondistributor_preacher table.
+ // [7543] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
- // [7544] From the sermondistributor_series table.
+ // [7543] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
- // [7417] Filter by published state
+ // [7416] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@@ -177,21 +177,21 @@ class SermondistributorModelStatistics extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
- // [7429] Join over the asset groups.
+ // [7428] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
- // [7432] Filter by access level.
+ // [7431] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
- // [7437] Implement View Level Access
+ // [7436] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7514] Filter by search.
+ // [7513] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@@ -206,23 +206,23 @@ class SermondistributorModelStatistics extends JModelList
}
}
- // [7748] Filter by sermon.
+ // [7747] Filter by sermon.
if ($sermon = $this->getState('filter.sermon'))
{
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
}
- // [7748] Filter by preacher.
+ // [7747] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
- // [7748] Filter by series.
+ // [7747] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
- // [7473] Add the list ordering clause.
+ // [7472] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@@ -240,42 +240,42 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExportData($pks)
{
- // [7181] setup the query
+ // [7180] setup the query
if (SermondistributorHelper::checkArray($pks))
{
- // [7184] Get the user object.
+ // [7183] Get the user object.
$user = JFactory::getUser();
- // [7186] Create a new query object.
+ // [7185] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
- // [7189] Select some fields
+ // [7188] Select some fields
$query->select('a.*');
- // [7191] From the sermondistributor_statistic table
+ // [7190] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
- // [7201] Implement View Level Access
+ // [7200] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
- // [7208] Order the results by ordering
+ // [7207] Order the results by ordering
$query->order('a.ordering ASC');
- // [7210] Load the items
+ // [7209] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
- // [10605] set values to display correctly.
+ // [10604] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
- // [10608] get user object.
+ // [10607] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@@ -286,13 +286,13 @@ class SermondistributorModelStatistics extends JModelList
continue;
}
- // [10818] unset the values we don't want exported.
+ // [10817] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
- // [10827] Add headers to items array.
+ // [10826] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@@ -311,13 +311,13 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExImPortHeaders()
{
- // [7230] Get a db connection.
+ // [7229] Get a db connection.
$db = JFactory::getDbo();
- // [7232] get the columns
+ // [7231] get the columns
$columns = $db->getTableColumns("#__sermondistributor_statistic");
if (SermondistributorHelper::checkArray($columns))
{
- // [7236] remove the headers you don't import/export.
+ // [7235] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@@ -339,7 +339,7 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getStoreId($id = '')
{
- // [10153] Compile the store id.
+ // [10152] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@@ -363,15 +363,15 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function checkInNow()
{
- // [10546] Get set check in time
+ // [10545] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
- // [10551] Get a db connection.
+ // [10550] Get a db connection.
$db = JFactory::getDbo();
- // [10553] reset query
+ // [10552] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_statistic'));
@@ -379,24 +379,24 @@ class SermondistributorModelStatistics extends JModelList
$db->execute();
if ($db->getNumRows())
{
- // [10561] Get Yesterdays date
+ // [10560] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
- // [10563] reset query
+ // [10562] reset query
$query = $db->getQuery(true);
- // [10565] Fields to update.
+ // [10564] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
- // [10570] Conditions for which records should be updated.
+ // [10569] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
- // [10575] Check table
+ // [10574] Check table
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query);
diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php
index b40c61bc..a6357aac 100644
--- a/admin/views/help_document/tmpl/edit.php
+++ b/admin/views/help_document/tmpl/edit.php
@@ -95,93 +95,93 @@ $componentParams = JComponentHelper::getParams('com_sermondistributor');