Skip to content

Commit

Permalink
Addes more support for array values in the filter area.
Browse files Browse the repository at this point in the history
  • Loading branch information
Llewellynvdm committed Dec 31, 2020
1 parent 10946ba commit 152026d
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 49 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 3rd December, 2020
+ *Last Build*: 4th December, 2020
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -36,7 +36,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **72786**
+ *Line count*: **72798**
+ *File count*: **459**
+ *Folder count*: **93**

Expand Down
4 changes: 2 additions & 2 deletions admin/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 3rd December, 2020
+ *Last Build*: 4th December, 2020
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -36,7 +36,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)

+ *Line count*: **72786**
+ *Line count*: **72798**
+ *File count*: **459**
+ *Folder count*: **93**

Expand Down
12 changes: 8 additions & 4 deletions admin/models/external_sources.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -91,9 +98,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$externalsources = $this->getUserStateFromRequest($this->context . '.filter.externalsources', 'filter_externalsources');
if ($formSubmited)
{
Expand Down
12 changes: 8 additions & 4 deletions admin/models/help_documents.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -93,9 +100,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
if ($formSubmited)
{
Expand Down
12 changes: 8 additions & 4 deletions admin/models/local_listings.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -92,9 +99,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$build = $this->getUserStateFromRequest($this->context . '.filter.build', 'filter_build');
if ($formSubmited)
{
Expand Down
12 changes: 8 additions & 4 deletions admin/models/preachers.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -90,9 +97,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
if ($formSubmited)
{
Expand Down
12 changes: 8 additions & 4 deletions admin/models/series_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -89,9 +96,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
if ($formSubmited)
{
Expand Down
12 changes: 8 additions & 4 deletions admin/models/sermons.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -97,9 +104,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$preacher = $this->getUserStateFromRequest($this->context . '.filter.preacher', 'filter_preacher');
if ($formSubmited)
{
Expand Down
12 changes: 8 additions & 4 deletions admin/models/statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ protected function populateState($ordering = null, $direction = null)
$this->context .= '.' . $layout;
}

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
Expand All @@ -93,9 +100,6 @@ protected function populateState($ordering = null, $direction = null)
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');

$sermon = $this->getUserStateFromRequest($this->context . '.filter.sermon', 'filter_sermon');
if ($formSubmited)
{
Expand Down
2 changes: 1 addition & 1 deletion sermondistributor.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_SERMONDISTRIBUTOR</name>
<creationDate>3rd December, 2020</creationDate>
<creationDate>4th December, 2020</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>
Expand Down
2 changes: 0 additions & 2 deletions site/views/api/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('api');
Expand Down
2 changes: 0 additions & 2 deletions site/views/categories/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('categories');
Expand Down
2 changes: 0 additions & 2 deletions site/views/category/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('category');
Expand Down
2 changes: 0 additions & 2 deletions site/views/preacher/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preacher');
Expand Down
2 changes: 0 additions & 2 deletions site/views/preachers/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preachers');
Expand Down
2 changes: 0 additions & 2 deletions site/views/series/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('series');
Expand Down
2 changes: 0 additions & 2 deletions site/views/serieslist/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('serieslist');
Expand Down
2 changes: 0 additions & 2 deletions site/views/sermon/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ protected function _prepareDocument()
*/
protected function addToolBar()
{
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('sermon');
Expand Down

0 comments on commit 152026d

Please sign in to comment.