diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a1941fc..ac12bf22 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v3.0.3
+
+- Removed the not_required field from the sermon model. #36
+
# v3.0.2
- Add the HTML class to the site default layout.
diff --git a/README.md b/README.md
index 0714487a..9344c167 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
-+ *Last Build*: 10th February, 2024
++ *Last Build*: 11th February, 2024
+ *Version*: 3.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@@ -37,8 +37,8 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (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*: **86974**
-+ *File count*: **594**
++ *Line count*: **87039**
++ *File count*: **595**
+ *Folder count*: **113**
**160 Hours** or **20 Eight Hour Days** (the actual time the author spent)
diff --git a/admin/README.txt b/admin/README.txt
index 0714487a..9344c167 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -24,7 +24,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
-+ *Last Build*: 10th February, 2024
++ *Last Build*: 11th February, 2024
+ *Version*: 3.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@@ -37,8 +37,8 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (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*: **86974**
-+ *File count*: **594**
++ *Line count*: **87039**
++ *File count*: **595**
+ *Folder count*: **113**
**160 Hours** or **20 Eight Hour Days** (the actual time the author spent)
diff --git a/admin/sql/updates/mysql/3.0.2.sql b/admin/sql/updates/mysql/3.0.2.sql
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/admin/sql/updates/mysql/3.0.2.sql
@@ -0,0 +1 @@
+
diff --git a/script.php b/script.php
index bcc17568..e3854fef 100644
--- a/script.php
+++ b/script.php
@@ -1847,7 +1847,7 @@ class Com_SermondistributorInstallerScript
echo '
-
Upgrade to Version 3.0.2 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 3.0.3 Was Successful! Let us know if anything is not working as expected.
';
// Set db if not set already.
if (!isset($db))
diff --git a/sermondistributor.xml b/sermondistributor.xml
index 4000b4d8..cfee3b03 100644
--- a/sermondistributor.xml
+++ b/sermondistributor.xml
@@ -1,15 +1,15 @@
COM_SERMONDISTRIBUTOR
- 10th February, 2024
+ 11th February, 2024
Llewellyn van der Merwe
joomla@vdm.io
https://www.vdm.io/
Copyright (C) 2015. All Rights Reserved
GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
- 3.0.2
+ 3.0.3
Sermon Distributor (v.3.0.2)
+ Sermon Distributor (v.3.0.3)
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.
Created by Llewellyn van der Merwe
Development started 22nd October, 2015
diff --git a/sermondistributor_update_server.xml b/sermondistributor_update_server.xml
index f8edac84..f7d2ab9e 100644
--- a/sermondistributor_update_server.xml
+++ b/sermondistributor_update_server.xml
@@ -139,4 +139,22 @@
https://www.vdm.io/
+
+ Sermon Distributor
+ A sermon distributor that links to Dropbox.
+ pkg_sermondistributor
+ package
+ site
+ 3.0.3
+ https://www.vdm.io/
+
+ https://git.vdm.dev/api/v1/repos/christian/pkg-sermondistributor/archive/v3.0.3.zip
+
+
+ stable
+
+ Llewellyn van der Merwe
+ https://www.vdm.io/
+
+
\ No newline at end of file
diff --git a/site/models/ajax.php b/site/models/ajax.php
index 148dca1d..663aecb0 100644
--- a/site/models/ajax.php
+++ b/site/models/ajax.php
@@ -171,7 +171,7 @@ class SermondistributorModelAjax extends ListModel
// make sure the lock is removed
unset($sermon->lock);
// convert the placeholders to json object
- $registry = new JRegistry;
+ $registry = new Registry;
$registry->loadArray($sermon->auto_sermons);
$sermon->auto_sermons = (string) $registry;
// always the same
@@ -397,23 +397,23 @@ class SermondistributorModelAjax extends ListModel
{
// Only process once per/sermon
$bad_characters = array("\"", "<", ">");
- $this->sermons->$key->metadesc = JString::str_ireplace($bad_characters, "", $description); // just to be save
+ $this->sermons->$key->metadesc = \JString::str_ireplace($bad_characters, "", $description); // just to be save
}
// Array of characters to remove.
$bad_characters = array("\n", "\r", "\"", "<", ">");
// set the meta key words
- $this->sermons->$key->metakey[] = trim(JString::str_ireplace($bad_characters, '', $name)); // just to be save
+ $this->sermons->$key->metakey[] = trim(\JString::str_ireplace($bad_characters, '', $name)); // just to be save
if ($series)
{
- $this->sermons->$key->metakey[] = trim(JString::str_ireplace($bad_characters, '', $seriesName)); // just to be save
+ $this->sermons->$key->metakey[] = trim(\JString::str_ireplace($bad_characters, '', $seriesName)); // just to be save
}
if ($preacher)
{
- $this->sermons->$key->metakey[] = trim(JString::str_ireplace($bad_characters, '', $preacherName)); // just to be save
+ $this->sermons->$key->metakey[] = trim(\JString::str_ireplace($bad_characters, '', $preacherName)); // just to be save
}
if ($category)
{
- $this->sermons->$key->metakey[] = trim(JString::str_ireplace($bad_characters, '', $categoryName)); // just to be save
+ $this->sermons->$key->metakey[] = trim(\JString::str_ireplace($bad_characters, '', $categoryName)); // just to be save
}
$author = ($preacher) ? trim($preacherName): '';
$this->sermons->$key->metadata = '{"robots":"","author":"'.$author.'","rights":"See our site terms."}';
@@ -426,11 +426,11 @@ class SermondistributorModelAjax extends ListModel
// sanitize the name to an alias
if (Factory::getConfig()->get('unicodeslugs') == 1)
{
- $alias = JFilterOutput::stringURLUnicodeSlug($name);
+ $alias = \JFilterOutput::stringURLUnicodeSlug($name);
}
else
{
- $alias = JFilterOutput::stringURLSafe($name);
+ $alias = \JFilterOutput::stringURLSafe($name);
}
if ($type)
{
@@ -537,8 +537,8 @@ class SermondistributorModelAjax extends ListModel
protected function createCategory($name,$alias)
{
// load the category table
- JTable::addIncludePath(JPATH_LIBRARIES . '/joomla/database/table');
- $category = JTable::getInstance('Category');
+ \JTable::addIncludePath(JPATH_LIBRARIES . '/joomla/database/table');
+ $category = \JTable::getInstance('Category');
$category->extension = 'com_sermondistributor.sermons';
$category->title = $name;
$category->alias = $alias;
@@ -568,7 +568,7 @@ class SermondistributorModelAjax extends ListModel
// insure the filed is always uniqe
while (isset($this->uniqeValueArray[$type][$field][$value]))
{
- $value = JString::increment($value, 'dash');
+ $value = \JString::increment($value, 'dash');
}
$this->uniqeValueArray[$type][$field][$value] = $value;
return $value;
diff --git a/site/models/sermon.php b/site/models/sermon.php
index 26f8d74b..63eb9b08 100644
--- a/site/models/sermon.php
+++ b/site/models/sermon.php
@@ -137,8 +137,8 @@ class SermondistributorModelSermon extends ItemModel
// Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
- array('a.id','a.asset_id','a.name','a.alias','a.preacher','a.short_description','a.icon','a.scripture','a.series','a.catid','a.description','a.link_type','a.source','a.build','a.manual_files','a.local_files','a.url','a.not_required','a.auto_sermons','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering','a.metadesc','a.metakey','a.metadata'),
- array('id','asset_id','name','alias','preacher','short_description','icon','scripture','series','catid','description','link_type','source','build','manual_files','local_files','url','not_required','auto_sermons','published','created_by','modified_by','created','modified','version','hits','ordering','metadesc','metakey','metadata')));
+ array('a.id','a.asset_id','a.name','a.alias','a.preacher','a.short_description','a.icon','a.scripture','a.series','a.catid','a.description','a.link_type','a.source','a.build','a.manual_files','a.local_files','a.url','a.auto_sermons','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering','a.metadesc','a.metakey','a.metadata'),
+ array('id','asset_id','name','alias','preacher','short_description','icon','scripture','series','catid','description','link_type','source','build','manual_files','local_files','url','auto_sermons','published','created_by','modified_by','created','modified','version','hits','ordering','metadesc','metakey','metadata')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// Get from #__sermondistributor_series as b
diff --git a/site/views/categories/view.html.php b/site/views/categories/view.html.php
index 4730df1c..3704443c 100644
--- a/site/views/categories/view.html.php
+++ b/site/views/categories/view.html.php
@@ -60,7 +60,7 @@ class SermondistributorViewCategories extends HtmlView
{
foreach ($this->items as $nr => &$item)
{
- $item->link = JRoute::_(SermondistributorHelperRoute::getCategoryRoute($item->slug));
+ $item->link = \JRoute::_(SermondistributorHelperRoute::getCategoryRoute($item->slug));
}
}
// set the FooTable style
diff --git a/site/views/category/tmpl/default.php b/site/views/category/tmpl/default.php
index ab73e0b3..ff9ef70f 100644
--- a/site/views/category/tmpl/default.php
+++ b/site/views/category/tmpl/default.php
@@ -54,20 +54,31 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
loadTemplate('sermons-list'); ?>
diff --git a/site/views/category/view.html.php b/site/views/category/view.html.php
index 859f7046..a7381195 100644
--- a/site/views/category/view.html.php
+++ b/site/views/category/view.html.php
@@ -109,7 +109,7 @@ class SermondistributorViewCategory extends HtmlView
parent::display($tpl);
}
- /**
+ /**
* Increment the hit counter for the category.
*
* @param integer $pk Primary key of the category to increment.
diff --git a/site/views/preacher/tmpl/default.php b/site/views/preacher/tmpl/default.php
index 54928edb..87239458 100644
--- a/site/views/preacher/tmpl/default.php
+++ b/site/views/preacher/tmpl/default.php
@@ -54,20 +54,31 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
loadTemplate('sermons-list'); ?>
diff --git a/site/views/preacher/view.html.php b/site/views/preacher/view.html.php
index 21658582..f8e2481d 100644
--- a/site/views/preacher/view.html.php
+++ b/site/views/preacher/view.html.php
@@ -133,8 +133,7 @@ class SermondistributorViewPreacher extends HtmlView
return $db->execute();
}
return false;
- }
-
+ }
/**
* Prepares the document
diff --git a/site/views/preachers/view.html.php b/site/views/preachers/view.html.php
index f1064704..1238854c 100644
--- a/site/views/preachers/view.html.php
+++ b/site/views/preachers/view.html.php
@@ -60,7 +60,7 @@ class SermondistributorViewPreachers extends HtmlView
{
foreach ($this->items as $nr => &$item)
{
- $item->link = JRoute::_(SermondistributorHelperRoute::getPreacherRoute($item->slug));
+ $item->link = \JRoute::_(SermondistributorHelperRoute::getPreacherRoute($item->slug));
}
}
// set the FooTable style
diff --git a/site/views/series/tmpl/default.php b/site/views/series/tmpl/default.php
index d39c77b2..16a4d125 100644
--- a/site/views/series/tmpl/default.php
+++ b/site/views/series/tmpl/default.php
@@ -29,6 +29,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Session\Session;
?>