diff --git a/README.md b/README.md index b390f3e..16a6a26 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,18 @@ A component to keep track of release checking. + *Author*: [Joomla! Project](mailto:admin@joomla.org) + *Name*: [Track Release Checking](http://www.joomla.org) + *First Build*: 29th July, 2020 -+ *Last Build*: 19th November, 2020 ++ *Last Build*: 10th December, 2020 + *Version*: 1.0.x + *Copyright*: (C) 2020 Open Source Matters, Inc. + *License*: GNU General Public License version 2 or later; see LICENSE.txt ## Some Fun Numbers -+ *Line count*: **20351** -+ *File count*: **191** ++ *Line count*: **21121** ++ *File count*: **200** + *Folder count*: **56** -**57 Hours** or **7 Eight Hour Days** (actual time the author saved - +**59 Hours** or **7 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](http://joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, diff --git a/admin/README.txt b/admin/README.txt index b390f3e..16a6a26 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -8,18 +8,18 @@ A component to keep track of release checking. + *Author*: [Joomla! Project](mailto:admin@joomla.org) + *Name*: [Track Release Checking](http://www.joomla.org) + *First Build*: 29th July, 2020 -+ *Last Build*: 19th November, 2020 ++ *Last Build*: 10th December, 2020 + *Version*: 1.0.x + *Copyright*: (C) 2020 Open Source Matters, Inc. + *License*: GNU General Public License version 2 or later; see LICENSE.txt ## Some Fun Numbers -+ *Line count*: **20351** -+ *File count*: **191** ++ *Line count*: **21121** ++ *File count*: **200** + *Folder count*: **56** -**57 Hours** or **7 Eight Hour Days** (actual time the author saved - +**59 Hours** or **7 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](http://joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, diff --git a/admin/controllers/actions.php b/admin/controllers/actions.php index 537f223..3eb401a 100644 --- a/admin/controllers/actions.php +++ b/admin/controllers/actions.php @@ -53,7 +53,7 @@ class Release_checkingControllerActions extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - ArrayHelper::toInteger($pks); + $pks = ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Actions'); // get the data to export diff --git a/admin/controllers/contexts.php b/admin/controllers/contexts.php index 66a4442..89acc50 100644 --- a/admin/controllers/contexts.php +++ b/admin/controllers/contexts.php @@ -53,7 +53,7 @@ class Release_checkingControllerContexts extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - ArrayHelper::toInteger($pks); + $pks = ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Contexts'); // get the data to export diff --git a/admin/controllers/joomla_versions.php b/admin/controllers/joomla_versions.php index 4af5566..e8a293d 100644 --- a/admin/controllers/joomla_versions.php +++ b/admin/controllers/joomla_versions.php @@ -53,7 +53,7 @@ class Release_checkingControllerJoomla_versions extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - ArrayHelper::toInteger($pks); + $pks = ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Joomla_versions'); // get the data to export diff --git a/admin/controllers/release_checks.php b/admin/controllers/release_checks.php index 11ed94d..5f20b3d 100644 --- a/admin/controllers/release_checks.php +++ b/admin/controllers/release_checks.php @@ -53,7 +53,7 @@ class Release_checkingControllerRelease_checks extends JControllerAdmin $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input - ArrayHelper::toInteger($pks); + $pks = ArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Release_checks'); // get the data to export diff --git a/admin/language/en-GB/en-GB.com_release_checking.ini b/admin/language/en-GB/en-GB.com_release_checking.ini index 4bfa12b..799e630 100644 --- a/admin/language/en-GB/en-GB.com_release_checking.ini +++ b/admin/language/en-GB/en-GB.com_release_checking.ini @@ -166,6 +166,35 @@ COM_RELEASE_CHECKING_EDIT_VERSIONS_DESC="Allows users in this group to edit vers COM_RELEASE_CHECKING_EXPORT_DATA="Export Data" COM_RELEASE_CHECKING_EXPORT_DATA_DESC="Allows users in this group to export data." COM_RELEASE_CHECKING_EXPORT_FAILED="Export Failed" +COM_RELEASE_CHECKING_FILTER_ACTION_ASCENDING="Action ascending" +COM_RELEASE_CHECKING_FILTER_ACTION_DESCENDING="Action descending" +COM_RELEASE_CHECKING_FILTER_CONTEXT_ASCENDING="Context ascending" +COM_RELEASE_CHECKING_FILTER_CONTEXT_DESCENDING="Context descending" +COM_RELEASE_CHECKING_FILTER_CREATED_BY_ASCENDING="Created By ascending" +COM_RELEASE_CHECKING_FILTER_CREATED_BY_DESCENDING="Created By descending" +COM_RELEASE_CHECKING_FILTER_JOOMLA_VERSION_ASCENDING="Joomla Version ascending" +COM_RELEASE_CHECKING_FILTER_JOOMLA_VERSION_DESCENDING="Joomla Version descending" +COM_RELEASE_CHECKING_FILTER_NAME_ASCENDING="Name ascending" +COM_RELEASE_CHECKING_FILTER_NAME_DESCENDING="Name descending" +COM_RELEASE_CHECKING_FILTER_OUTCOME_ASCENDING="Outcome ascending" +COM_RELEASE_CHECKING_FILTER_OUTCOME_DESCENDING="Outcome descending" +COM_RELEASE_CHECKING_FILTER_PUBLISHED="Status" +COM_RELEASE_CHECKING_FILTER_PUBLISHED_ACTIONS="Status options for actions" +COM_RELEASE_CHECKING_FILTER_PUBLISHED_CONTEXTS="Status options for contexts" +COM_RELEASE_CHECKING_FILTER_PUBLISHED_JOOMLA_VERSIONS="Status options for joomla versions" +COM_RELEASE_CHECKING_FILTER_PUBLISHED_RELEASE_CHECKS="Status options for release checks" +COM_RELEASE_CHECKING_FILTER_SEARCH="Searchrelease checks" +COM_RELEASE_CHECKING_FILTER_SEARCH_ACTIONS="Search the action items. Prefix with ID: to search for an item by ID." +COM_RELEASE_CHECKING_FILTER_SEARCH_CONTEXTS="Search the context items. Prefix with ID: to search for an item by ID." +COM_RELEASE_CHECKING_FILTER_SEARCH_JOOMLA_VERSIONS="Search the joomla version items. Prefix with ID: to search for an item by ID." +COM_RELEASE_CHECKING_FILTER_SEARCH_RELEASE_CHECKS="Search the release check items. Prefix with ID: to search for an item by ID." +COM_RELEASE_CHECKING_FILTER_SELECT_ACCESS="Select Access" +COM_RELEASE_CHECKING_FILTER_SELECT_ACTION="Select Action" +COM_RELEASE_CHECKING_FILTER_SELECT_CONTEXT="Select Context" +COM_RELEASE_CHECKING_FILTER_SELECT_CREATED_BY="Select Created By" +COM_RELEASE_CHECKING_FILTER_SELECT_JOOMLA_VERSION="Select Joomla Version" +COM_RELEASE_CHECKING_FILTER_SELECT_NAME="Select Name" +COM_RELEASE_CHECKING_FILTER_SELECT_OUTCOME="Select Outcome" COM_RELEASE_CHECKING_HELP_MANAGER="Help" COM_RELEASE_CHECKING_IMPORT_CONTINUE="Continue" COM_RELEASE_CHECKING_IMPORT_DATA="Import Data" diff --git a/admin/layouts/joomla_version/details_left.php b/admin/layouts/joomla_version/details_left.php new file mode 100644 index 0000000..82352ad --- /dev/null +++ b/admin/layouts/joomla_version/details_left.php @@ -0,0 +1,40 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'name' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/joomla_version/details_above.php b/admin/layouts/joomla_version/details_right.php similarity index 73% rename from admin/layouts/joomla_version/details_above.php rename to admin/layouts/joomla_version/details_right.php index 3bac9b4..3118483 100644 --- a/admin/layouts/joomla_version/details_above.php +++ b/admin/layouts/joomla_version/details_right.php @@ -24,7 +24,6 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( - 'name', 'alias' ); @@ -32,12 +31,10 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> -
- - - setFieldAttribute($field, 'type', 'hidden'); ?> - - renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> - -
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/models/actions.php b/admin/models/actions.php index 73769e8..c023e59 100644 --- a/admin/models/actions.php +++ b/admin/models/actions.php @@ -24,21 +24,28 @@ class Release_checkingModelActions extends JModelList $config['filter_fields'] = array( 'a.id','id', 'a.published','published', + 'a.access','access', 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', 'a.name','name', - 'g.name' + 'g.name','context' ); } parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -48,30 +55,46 @@ class Release_checkingModelActions extends JModelList if ($layout = $app->input->get('layout')) { $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'); + 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); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } $context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context'); - $this->setState('filter.context', $context); - - $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); - $this->setState('filter.sorting', $sorting); - - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); - - $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); - $this->setState('filter.search', $search); - - $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); - $this->setState('filter.published', $published); - - $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); - $this->setState('filter.created_by', $created_by); - - $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); - $this->setState('filter.created', $created); + if ($formSubmited) + { + $context = $app->input->post->get('context'); + $this->setState('filter.context', $context); + } // List state information. parent::populateState($ordering, $direction); @@ -132,9 +155,17 @@ class Release_checkingModelActions extends JModelList $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Filter by access level. - if ($access = $this->getState('filter.access')) + $_access = $this->getState('filter.access'); + if ($_access && is_numeric($_access)) { - $query->where('a.access = ' . (int) $access); + $query->where('a.access = ' . (int) $_access); + } + elseif (Release_checkingHelper::checkArray($_access)) + { + // Secure the array for the query + $_access = ArrayHelper::toInteger($_access); + // Filter by the Access Array. + $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access if (!$user->authorise('core.options', 'com_release_checking')) @@ -158,9 +189,21 @@ class Release_checkingModelActions extends JModelList } // Filter by Name. - if ($name = $this->getState('filter.name')) + $_name = $this->getState('filter.name'); + if (is_numeric($_name)) { - $query->where('a.name = ' . $db->quote($db->escape($name))); + if (is_float($_name)) + { + $query->where('a.name = ' . (float) $_name); + } + else + { + $query->where('a.name = ' . (int) $_name); + } + } + elseif (Release_checkingHelper::checkString($_name)) + { + $query->where('a.name = ' . $db->quote($db->escape($_name))); } // Add the list ordering clause. @@ -310,6 +353,18 @@ class Release_checkingModelActions extends JModelList $id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); + // Check if the value is an array + $_access = $this->getState('filter.access'); + if (Release_checkingHelper::checkArray($_access)) + { + $id .= ':' . implode(':', $_access); + } + // Check if this is only an int or string + elseif (is_numeric($_access) + || Release_checkingHelper::checkString($_access)) + { + $id .= ':' . $_access; + } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); diff --git a/admin/models/contexts.php b/admin/models/contexts.php index 38b0e6f..948b713 100644 --- a/admin/models/contexts.php +++ b/admin/models/contexts.php @@ -24,6 +24,7 @@ class Release_checkingModelContexts extends JModelList $config['filter_fields'] = array( 'a.id','id', 'a.published','published', + 'a.access','access', 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', @@ -33,11 +34,17 @@ class Release_checkingModelContexts extends JModelList parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -47,27 +54,39 @@ class Release_checkingModelContexts extends JModelList if ($layout = $app->input->get('layout')) { $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'); + 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); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); - - $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); - $this->setState('filter.sorting', $sorting); - - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); - - $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); - $this->setState('filter.search', $search); - - $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); - $this->setState('filter.published', $published); - - $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); - $this->setState('filter.created_by', $created_by); - - $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); - $this->setState('filter.created', $created); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); @@ -124,9 +143,17 @@ class Release_checkingModelContexts extends JModelList $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Filter by access level. - if ($access = $this->getState('filter.access')) + $_access = $this->getState('filter.access'); + if ($_access && is_numeric($_access)) { - $query->where('a.access = ' . (int) $access); + $query->where('a.access = ' . (int) $_access); + } + elseif (Release_checkingHelper::checkArray($_access)) + { + // Secure the array for the query + $_access = ArrayHelper::toInteger($_access); + // Filter by the Access Array. + $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access if (!$user->authorise('core.options', 'com_release_checking')) @@ -150,9 +177,21 @@ class Release_checkingModelContexts extends JModelList } // Filter by Name. - if ($name = $this->getState('filter.name')) + $_name = $this->getState('filter.name'); + if (is_numeric($_name)) { - $query->where('a.name = ' . $db->quote($db->escape($name))); + if (is_float($_name)) + { + $query->where('a.name = ' . (float) $_name); + } + else + { + $query->where('a.name = ' . (int) $_name); + } + } + elseif (Release_checkingHelper::checkString($_name)) + { + $query->where('a.name = ' . $db->quote($db->escape($_name))); } // Add the list ordering clause. @@ -294,6 +333,18 @@ class Release_checkingModelContexts extends JModelList $id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); + // Check if the value is an array + $_access = $this->getState('filter.access'); + if (Release_checkingHelper::checkArray($_access)) + { + $id .= ':' . implode(':', $_access); + } + // Check if this is only an int or string + elseif (is_numeric($_access) + || Release_checkingHelper::checkString($_access)) + { + $id .= ':' . $_access; + } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); diff --git a/admin/models/fields/actions.php b/admin/models/fields/actions.php index 8461ace..805f598 100644 --- a/admin/models/fields/actions.php +++ b/admin/models/fields/actions.php @@ -162,7 +162,9 @@ class JFormFieldActions extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an action'); + if ($this->multiple === false) { + $options[] = JHtml::_('select.option', '', 'Select an option'); + } foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->action_name); diff --git a/admin/models/fields/actionsfiltername.php b/admin/models/fields/actionsfiltername.php new file mode 100644 index 0000000..1041bbc --- /dev/null +++ b/admin/models/fields/actionsfiltername.php @@ -0,0 +1,65 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Actionsfiltername Form Field class for the Release_checking component + */ +class JFormFieldActionsfiltername extends JFormFieldList +{ + /** + * The actionsfiltername field type. + * + * @var string + */ + public $type = 'actionsfiltername'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('name')); + $query->from($db->quoteName('#__release_checking_action')); + $query->order($db->quoteName('name') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_NAME') . ' -'); + + if ($results) + { + $results = array_unique($results); + foreach ($results as $name) + { + // Now add the name and its text to the options array + $_filter[] = JHtml::_('select.option', $name, $name); + } + } + return $_filter; + } +} diff --git a/admin/models/fields/contexts.php b/admin/models/fields/contexts.php index 9f2059d..7713b1b 100644 --- a/admin/models/fields/contexts.php +++ b/admin/models/fields/contexts.php @@ -161,7 +161,9 @@ class JFormFieldContexts extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); + if ($this->multiple === false) { + $options[] = JHtml::_('select.option', '', 'Select an option'); + } foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->context_name); diff --git a/admin/models/fields/contextsfiltername.php b/admin/models/fields/contextsfiltername.php new file mode 100644 index 0000000..555915e --- /dev/null +++ b/admin/models/fields/contextsfiltername.php @@ -0,0 +1,65 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Contextsfiltername Form Field class for the Release_checking component + */ +class JFormFieldContextsfiltername extends JFormFieldList +{ + /** + * The contextsfiltername field type. + * + * @var string + */ + public $type = 'contextsfiltername'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('name')); + $query->from($db->quoteName('#__release_checking_context')); + $query->order($db->quoteName('name') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_NAME') . ' -'); + + if ($results) + { + $results = array_unique($results); + foreach ($results as $name) + { + // Now add the name and its text to the options array + $_filter[] = JHtml::_('select.option', $name, $name); + } + } + return $_filter; + } +} diff --git a/admin/models/fields/joomlaversions.php b/admin/models/fields/joomlaversions.php index 73b81ee..d203861 100644 --- a/admin/models/fields/joomlaversions.php +++ b/admin/models/fields/joomlaversions.php @@ -161,7 +161,9 @@ class JFormFieldJoomlaversions extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); + if ($this->multiple === false) { + $options[] = JHtml::_('select.option', '', 'Select an option'); + } foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->joomla_version_name); diff --git a/admin/models/fields/releasechecksfiltercreatedby.php b/admin/models/fields/releasechecksfiltercreatedby.php new file mode 100644 index 0000000..2b06c97 --- /dev/null +++ b/admin/models/fields/releasechecksfiltercreatedby.php @@ -0,0 +1,64 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Releasechecksfiltercreatedby Form Field class for the Release_checking component + */ +class JFormFieldReleasechecksfiltercreatedby extends JFormFieldList +{ + /** + * The releasechecksfiltercreatedby field type. + * + * @var string + */ + public $type = 'releasechecksfiltercreatedby'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('created_by')); + $query->from($db->quoteName('#__release_checking_release_check')); + $query->order($db->quoteName('created_by') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + $_filter = array(); + + if ($results) + { + $results = array_unique($results); + foreach ($results as $created_by) + { + // Now add the created_by and its text to the options array + $_filter[] = JHtml::_('select.option', $created_by, JFactory::getUser($created_by)->name); + } + } + return $_filter; + } +} diff --git a/admin/models/fields/releasechecksfilteroutcome.php b/admin/models/fields/releasechecksfilteroutcome.php new file mode 100644 index 0000000..393ca15 --- /dev/null +++ b/admin/models/fields/releasechecksfilteroutcome.php @@ -0,0 +1,68 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Releasechecksfilteroutcome Form Field class for the Release_checking component + */ +class JFormFieldReleasechecksfilteroutcome extends JFormFieldList +{ + /** + * The releasechecksfilteroutcome field type. + * + * @var string + */ + public $type = 'releasechecksfilteroutcome'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('outcome')); + $query->from($db->quoteName('#__release_checking_release_check')); + $query->order($db->quoteName('outcome') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + $_filter = array(); + + if ($results) + { + // get release_checksmodel + $model = Release_checkingHelper::getModel('release_checks'); + $results = array_unique($results); + foreach ($results as $outcome) + { + // Translate the outcome selection + $text = $model->selectionTranslation($outcome,'outcome'); + // Now add the outcome and its text to the options array + $_filter[] = JHtml::_('select.option', $outcome, JText::_($text)); + } + } + return $_filter; + } +} diff --git a/admin/models/forms/filter_actions.xml b/admin/models/forms/filter_actions.xml new file mode 100644 index 0000000..6d9fed5 --- /dev/null +++ b/admin/models/forms/filter_actions.xml @@ -0,0 +1,76 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_contexts.xml b/admin/models/forms/filter_contexts.xml new file mode 100644 index 0000000..f571790 --- /dev/null +++ b/admin/models/forms/filter_contexts.xml @@ -0,0 +1,74 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_joomla_versions.xml b/admin/models/forms/filter_joomla_versions.xml new file mode 100644 index 0000000..c247b8c --- /dev/null +++ b/admin/models/forms/filter_joomla_versions.xml @@ -0,0 +1,67 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/filter_release_checks.xml b/admin/models/forms/filter_release_checks.xml new file mode 100644 index 0000000..0ddaae3 --- /dev/null +++ b/admin/models/forms/filter_release_checks.xml @@ -0,0 +1,115 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/joomla_version.php b/admin/models/joomla_version.php index 33c4be5..101d0c9 100644 --- a/admin/models/joomla_version.php +++ b/admin/models/joomla_version.php @@ -26,8 +26,10 @@ class Release_checkingModelJoomla_version extends JModelAdmin */ protected $tabLayoutFields = array( 'details' => array( - 'above' => array( - 'name', + 'left' => array( + 'name' + ), + 'right' => array( 'alias' ) ) diff --git a/admin/models/joomla_versions.php b/admin/models/joomla_versions.php index 7443894..043f28c 100644 --- a/admin/models/joomla_versions.php +++ b/admin/models/joomla_versions.php @@ -24,6 +24,7 @@ class Release_checkingModelJoomla_versions extends JModelList $config['filter_fields'] = array( 'a.id','id', 'a.published','published', + 'a.access','access', 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', @@ -33,11 +34,17 @@ class Release_checkingModelJoomla_versions extends JModelList parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -47,27 +54,39 @@ class Release_checkingModelJoomla_versions extends JModelList if ($layout = $app->input->get('layout')) { $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'); + 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); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); - - $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); - $this->setState('filter.sorting', $sorting); - - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); - - $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); - $this->setState('filter.search', $search); - - $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); - $this->setState('filter.published', $published); - - $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); - $this->setState('filter.created_by', $created_by); - - $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); - $this->setState('filter.created', $created); + if ($formSubmited) + { + $name = $app->input->post->get('name'); + $this->setState('filter.name', $name); + } // List state information. parent::populateState($ordering, $direction); @@ -124,9 +143,17 @@ class Release_checkingModelJoomla_versions extends JModelList $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Filter by access level. - if ($access = $this->getState('filter.access')) + $_access = $this->getState('filter.access'); + if ($_access && is_numeric($_access)) { - $query->where('a.access = ' . (int) $access); + $query->where('a.access = ' . (int) $_access); + } + elseif (Release_checkingHelper::checkArray($_access)) + { + // Secure the array for the query + $_access = ArrayHelper::toInteger($_access); + // Filter by the Access Array. + $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access if (!$user->authorise('core.options', 'com_release_checking')) @@ -289,6 +316,18 @@ class Release_checkingModelJoomla_versions extends JModelList $id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); + // Check if the value is an array + $_access = $this->getState('filter.access'); + if (Release_checkingHelper::checkArray($_access)) + { + $id .= ':' . implode(':', $_access); + } + // Check if this is only an int or string + elseif (is_numeric($_access) + || Release_checkingHelper::checkString($_access)) + { + $id .= ':' . $_access; + } $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); diff --git a/admin/models/release_checks.php b/admin/models/release_checks.php index 195f1fa..032fd54 100644 --- a/admin/models/release_checks.php +++ b/admin/models/release_checks.php @@ -24,23 +24,30 @@ class Release_checkingModelRelease_checks extends JModelList $config['filter_fields'] = array( 'a.id','id', 'a.published','published', + 'a.access','access', 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'g.name', - 'h.name', + 'g.name','context', + 'h.name','action', 'a.outcome','outcome', - 'i.name' + 'i.name','joomla_version' ); } parent::__construct($config); } - + /** * Method to auto-populate the model state. * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * * @return void + * */ protected function populateState($ordering = null, $direction = null) { @@ -50,39 +57,64 @@ class Release_checkingModelRelease_checks extends JModelList if ($layout = $app->input->get('layout')) { $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'); + 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); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + $context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context'); - $this->setState('filter.context', $context); + if ($formSubmited) + { + $context = $app->input->post->get('context'); + $this->setState('filter.context', $context); + } $action = $this->getUserStateFromRequest($this->context . '.filter.action', 'filter_action'); - $this->setState('filter.action', $action); + if ($formSubmited) + { + $action = $app->input->post->get('action'); + $this->setState('filter.action', $action); + } $outcome = $this->getUserStateFromRequest($this->context . '.filter.outcome', 'filter_outcome'); - $this->setState('filter.outcome', $outcome); + if ($formSubmited) + { + $outcome = $app->input->post->get('outcome'); + $this->setState('filter.outcome', $outcome); + } $joomla_version = $this->getUserStateFromRequest($this->context . '.filter.joomla_version', 'filter_joomla_version'); - $this->setState('filter.joomla_version', $joomla_version); + if ($formSubmited) + { + $joomla_version = $app->input->post->get('joomla_version'); + $this->setState('filter.joomla_version', $joomla_version); + } $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by'); - $this->setState('filter.created_by', $created_by); - - $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); - $this->setState('filter.sorting', $sorting); - - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - $this->setState('filter.access', $access); - - $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); - $this->setState('filter.search', $search); - - $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); - $this->setState('filter.published', $published); - - $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); - $this->setState('filter.created_by', $created_by); - - $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); - $this->setState('filter.created', $created); + if ($formSubmited) + { + $created_by = $app->input->post->get('created_by'); + $this->setState('filter.created_by', $created_by); + } // List state information. parent::populateState($ordering, $direction); @@ -203,9 +235,17 @@ class Release_checkingModelRelease_checks extends JModelList $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Filter by access level. - if ($access = $this->getState('filter.access')) + $_access = $this->getState('filter.access'); + if ($_access && is_numeric($_access)) { - $query->where('a.access = ' . (int) $access); + $query->where('a.access = ' . (int) $_access); + } + elseif (Release_checkingHelper::checkArray($_access)) + { + // Secure the array for the query + $_access = ArrayHelper::toInteger($_access); + // Filter by the Access Array. + $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access if (!$user->authorise('core.options', 'com_release_checking')) @@ -228,30 +268,205 @@ class Release_checkingModelRelease_checks extends JModelList } } - // Filter by context. - if ($context = $this->getState('filter.context')) + // Filter by Context. + $_context = $this->getState('filter.context'); + if (is_numeric($_context)) { - $query->where('a.context = ' . $db->quote($db->escape($context))); + if (is_float($_context)) + { + $query->where('a.context = ' . (float) $_context); + } + else + { + $query->where('a.context = ' . (int) $_context); + } } - // Filter by action. - if ($action = $this->getState('filter.action')) + elseif (Release_checkingHelper::checkString($_context)) { - $query->where('a.action = ' . $db->quote($db->escape($action))); + $query->where('a.context = ' . $db->quote($db->escape($_context))); + } + elseif (Release_checkingHelper::checkArray($_context)) + { + // Secure the array for the query + $_context = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (Release_checkingHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_context); + // Filter by the Context Array. + $query->where('a.context IN (' . implode(',', $_context) . ')'); + } + // Filter by Action. + $_action = $this->getState('filter.action'); + if (is_numeric($_action)) + { + if (is_float($_action)) + { + $query->where('a.action = ' . (float) $_action); + } + else + { + $query->where('a.action = ' . (int) $_action); + } + } + elseif (Release_checkingHelper::checkString($_action)) + { + $query->where('a.action = ' . $db->quote($db->escape($_action))); + } + elseif (Release_checkingHelper::checkArray($_action)) + { + // Secure the array for the query + $_action = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (Release_checkingHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_action); + // Filter by the Action Array. + $query->where('a.action IN (' . implode(',', $_action) . ')'); } // Filter by Outcome. - if ($outcome = $this->getState('filter.outcome')) + $_outcome = $this->getState('filter.outcome'); + if (is_numeric($_outcome)) { - $query->where('a.outcome = ' . $db->quote($db->escape($outcome))); + if (is_float($_outcome)) + { + $query->where('a.outcome = ' . (float) $_outcome); + } + else + { + $query->where('a.outcome = ' . (int) $_outcome); + } } - // Filter by joomla_version. - if ($joomla_version = $this->getState('filter.joomla_version')) + elseif (Release_checkingHelper::checkString($_outcome)) { - $query->where('a.joomla_version = ' . $db->quote($db->escape($joomla_version))); + $query->where('a.outcome = ' . $db->quote($db->escape($_outcome))); + } + elseif (Release_checkingHelper::checkArray($_outcome)) + { + // Secure the array for the query + $_outcome = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (Release_checkingHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_outcome); + // Filter by the Outcome Array. + $query->where('a.outcome IN (' . implode(',', $_outcome) . ')'); + } + // Filter by Joomla_version. + $_joomla_version = $this->getState('filter.joomla_version'); + if (is_numeric($_joomla_version)) + { + if (is_float($_joomla_version)) + { + $query->where('a.joomla_version = ' . (float) $_joomla_version); + } + else + { + $query->where('a.joomla_version = ' . (int) $_joomla_version); + } + } + elseif (Release_checkingHelper::checkString($_joomla_version)) + { + $query->where('a.joomla_version = ' . $db->quote($db->escape($_joomla_version))); + } + elseif (Release_checkingHelper::checkArray($_joomla_version)) + { + // Secure the array for the query + $_joomla_version = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (Release_checkingHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_joomla_version); + // Filter by the Joomla_version Array. + $query->where('a.joomla_version IN (' . implode(',', $_joomla_version) . ')'); } // Filter by Created_by. - if ($created_by = $this->getState('filter.created_by')) + $_created_by = $this->getState('filter.created_by'); + if (is_numeric($_created_by)) { - $query->where('a.created_by = ' . $db->quote($db->escape($created_by))); + if (is_float($_created_by)) + { + $query->where('a.created_by = ' . (float) $_created_by); + } + else + { + $query->where('a.created_by = ' . (int) $_created_by); + } + } + elseif (Release_checkingHelper::checkString($_created_by)) + { + $query->where('a.created_by = ' . $db->quote($db->escape($_created_by))); + } + elseif (Release_checkingHelper::checkArray($_created_by)) + { + // Secure the array for the query + $_created_by = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (Release_checkingHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_created_by); + // Filter by the Created_by Array. + $query->where('a.created_by IN (' . implode(',', $_created_by) . ')'); } // Add the list ordering clause. @@ -428,13 +643,68 @@ class Release_checkingModelRelease_checks extends JModelList $id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); + // Check if the value is an array + $_access = $this->getState('filter.access'); + if (Release_checkingHelper::checkArray($_access)) + { + $id .= ':' . implode(':', $_access); + } + // Check if this is only an int or string + elseif (is_numeric($_access) + || Release_checkingHelper::checkString($_access)) + { + $id .= ':' . $_access; + } $id .= ':' . $this->getState('filter.ordering'); - $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.context'); - $id .= ':' . $this->getState('filter.action'); - $id .= ':' . $this->getState('filter.outcome'); - $id .= ':' . $this->getState('filter.joomla_version'); + // Check if the value is an array + $_context = $this->getState('filter.context'); + if (Release_checkingHelper::checkArray($_context)) + { + $id .= ':' . implode(':', $_context); + } + // Check if this is only an int or string + elseif (is_numeric($_context) + || Release_checkingHelper::checkString($_context)) + { + $id .= ':' . $_context; + } + // Check if the value is an array + $_action = $this->getState('filter.action'); + if (Release_checkingHelper::checkArray($_action)) + { + $id .= ':' . implode(':', $_action); + } + // Check if this is only an int or string + elseif (is_numeric($_action) + || Release_checkingHelper::checkString($_action)) + { + $id .= ':' . $_action; + } + // Check if the value is an array + $_outcome = $this->getState('filter.outcome'); + if (Release_checkingHelper::checkArray($_outcome)) + { + $id .= ':' . implode(':', $_outcome); + } + // Check if this is only an int or string + elseif (is_numeric($_outcome) + || Release_checkingHelper::checkString($_outcome)) + { + $id .= ':' . $_outcome; + } + // Check if the value is an array + $_joomla_version = $this->getState('filter.joomla_version'); + if (Release_checkingHelper::checkArray($_joomla_version)) + { + $id .= ':' . implode(':', $_joomla_version); + } + // Check if this is only an int or string + elseif (is_numeric($_joomla_version) + || Release_checkingHelper::checkString($_joomla_version)) + { + $id .= ':' . $_joomla_version; + } return parent::getStoreId($id); } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index f31e7b4..ca74baf 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -282,9 +282,4 @@ INSERT INTO `#__release_checking_action` (`id`, `alias`, `context`, `description -- -- Always insure this column rules is large enough for all the access control values. -- -ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.'; - --- --- Always insure this column name is large enough for long component and view names. --- -ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.'; +ALTER TABLE `#__assets` CHANGE `rules` `rules` TEXT NOT NULL COMMENT 'JSON encoded access control.'; diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index db7a0d2..c582b85 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -2,3 +2,9 @@ DROP TABLE IF EXISTS `#__release_checking_release_check`; DROP TABLE IF EXISTS `#__release_checking_joomla_version`; DROP TABLE IF EXISTS `#__release_checking_context`; DROP TABLE IF EXISTS `#__release_checking_action`; + + +-- +-- Always insure this column rules is reversed to Joomla defaults on uninstall. (as on 1st Dec 2020) +-- +ALTER TABLE `#__assets` CHANGE `rules` `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.'; diff --git a/admin/views/action/tmpl/edit.php b/admin/views/action/tmpl/edit.php index 3a7a862..96adad7 100644 --- a/admin/views/action/tmpl/edit.php +++ b/admin/views/action/tmpl/edit.php @@ -10,10 +10,10 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); $componentParams = $this->params; // will be removed just use $this->params instead ?> diff --git a/admin/views/actions/tmpl/default.php b/admin/views/actions/tmpl/default.php index cd582c3..0f0fc91 100644 --- a/admin/views/actions/tmpl/default.php +++ b/admin/views/actions/tmpl/default.php @@ -10,74 +10,55 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_release_checking&task=actions.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'actionList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_RELEASE_CHECKING_ACTIONS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_RELEASE_CHECKING_ACTIONS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/actions/tmpl/default_body.php b/admin/views/actions/tmpl/default_body.php index b541054..fe021de 100644 --- a/admin/views/actions/tmpl/default_body.php +++ b/admin/views/actions/tmpl/default_body.php @@ -23,11 +23,8 @@ $edit = "index.php?option=com_release_checking&view=actions&task=action.edit"; get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/actions/tmpl/default_head.php b/admin/views/actions/tmpl/default_head.php index 6c57f78..07dd4cb 100644 --- a/admin/views/actions/tmpl/default_head.php +++ b/admin/views/actions/tmpl/default_head.php @@ -14,7 +14,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -28,17 +28,17 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -46,6 +46,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/actions/view.html.php b/admin/views/actions/view.html.php index 6a5c471..a183ad2 100644 --- a/admin/views/actions/view.html.php +++ b/admin/views/actions/view.html.php @@ -32,10 +32,14 @@ class Release_checkingViewActions extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -150,69 +154,46 @@ class Release_checkingViewActions extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_release_checking'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } - // Set Name Selection - $this->nameOptions = $this->getTheNameSelections(); - // We do some sanitation for Name filter - if (Release_checkingHelper::checkArray($this->nameOptions) && - isset($this->nameOptions[0]->value) && - !Release_checkingHelper::checkString($this->nameOptions[0]->value)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - unset($this->nameOptions[0]); - } - // Only load Name filter if it has values - if (Release_checkingHelper::checkArray($this->nameOptions)) - { - // Name Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL').' -', - 'filter_name', - JHtml::_('select.options', $this->nameOptions, 'value', 'text', $this->state->get('filter.name')) + JHtmlBatch_::addListSelection( + JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Name Selection + $this->nameOptions = JFormHelper::loadFieldType('actionsfiltername')->options; + // We do some sanitation for Name filter + if (Release_checkingHelper::checkArray($this->nameOptions) && + isset($this->nameOptions[0]->value) && + !Release_checkingHelper::checkString($this->nameOptions[0]->value)) { - // Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL').' -', - 'batch[name]', - JHtml::_('select.options', $this->nameOptions, 'value', 'text') - ); + unset($this->nameOptions[0]); } + // Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL').' -', + 'batch[name]', + JHtml::_('select.options', $this->nameOptions, 'value', 'text') + ); } } @@ -257,43 +238,11 @@ class Release_checkingViewActions extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_RELEASE_CHECKING_ACTION_NAME_LABEL'), 'g.name' => JText::_('COM_RELEASE_CHECKING_ACTION_CONTEXT_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheNameSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('name')); - $query->from($db->quoteName('#__release_checking_action')); - $query->order($db->quoteName('name') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - $results = array_unique($results); - $_filter = array(); - foreach ($results as $name) - { - // Now add the name and its text to the options array - $_filter[] = JHtml::_('select.option', $name, $name); - } - return $_filter; - } - return false; } } diff --git a/admin/views/context/tmpl/edit.php b/admin/views/context/tmpl/edit.php index 9bedfad..5ac045d 100644 --- a/admin/views/context/tmpl/edit.php +++ b/admin/views/context/tmpl/edit.php @@ -10,10 +10,10 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); $componentParams = $this->params; // will be removed just use $this->params instead ?> diff --git a/admin/views/contexts/tmpl/default.php b/admin/views/contexts/tmpl/default.php index 412e121..5e0af44 100644 --- a/admin/views/contexts/tmpl/default.php +++ b/admin/views/contexts/tmpl/default.php @@ -10,74 +10,55 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -// load tooltip behavior -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.multiselect'); -JHtml::_('dropdown.init'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_RELEASE_CHECKING_FILTER_SELECT_ACCESS') . ' -')); JHtml::_('formbehavior.chosen', 'select'); - if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_release_checking&task=contexts.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'contextList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } - ?> - -
-sidebar)): ?> -
- sidebar; ?> -
-
- -
- -items)): ?> - loadTemplate('toolbar');?> -
- -
- - loadTemplate('toolbar');?> - - loadTemplate('head');?> - loadTemplate('foot');?> - loadTemplate('body');?> -
- - canCreate && $this->canEdit) : ?> - JText::_('COM_RELEASE_CHECKING_CONTEXTS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> - - - - -
- - - - \ No newline at end of file +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_RELEASE_CHECKING_CONTEXTS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + diff --git a/admin/views/contexts/tmpl/default_body.php b/admin/views/contexts/tmpl/default_body.php index 50fffb8..422331d 100644 --- a/admin/views/contexts/tmpl/default_body.php +++ b/admin/views/contexts/tmpl/default_body.php @@ -23,11 +23,8 @@ $edit = "index.php?option=com_release_checking&view=contexts&task=context.edit"; get('core.edit.state')): ?> saveOrder) - { - $iconClass = ' inactive'; - } - else + $iconClass = ''; + if (!$this->saveOrder) { $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); } diff --git a/admin/views/contexts/tmpl/default_head.php b/admin/views/contexts/tmpl/default_head.php index b190651..6ffef1f 100644 --- a/admin/views/contexts/tmpl/default_head.php +++ b/admin/views/contexts/tmpl/default_head.php @@ -14,7 +14,7 @@ defined('_JEXEC') or die('Restricted access'); canEdit&& $this->canState): ?> - ', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> @@ -28,11 +28,11 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> @@ -40,6 +40,6 @@ defined('_JEXEC') or die('Restricted access'); - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> \ No newline at end of file diff --git a/admin/views/contexts/view.html.php b/admin/views/contexts/view.html.php index f544d06..3d3324e 100644 --- a/admin/views/contexts/view.html.php +++ b/admin/views/contexts/view.html.php @@ -32,10 +32,14 @@ class Release_checkingViewContexts extends JViewLegacy $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); // Add the list ordering clause. $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); - $this->saveOrder = $this->listOrder == 'ordering'; + $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions @@ -150,69 +154,46 @@ class Release_checkingViewContexts extends JViewLegacy if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { JToolBarHelper::preferences('com_release_checking'); - } - - if ($this->canState) - { - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), - 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) - ); - // only load if batch allowed - if ($this->canBatch) - { - JHtmlBatch_::addListSelection( - JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_STATE'), - 'batch[published]', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) - ); - } - } - - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), - 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - JHtmlBatch_::addListSelection( - JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_ACCESS'), - 'batch[access]', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') - ); } - // Set Name Selection - $this->nameOptions = $this->getTheNameSelections(); - // We do some sanitation for Name filter - if (Release_checkingHelper::checkArray($this->nameOptions) && - isset($this->nameOptions[0]->value) && - !Release_checkingHelper::checkString($this->nameOptions[0]->value)) + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) { - unset($this->nameOptions[0]); - } - // Only load Name filter if it has values - if (Release_checkingHelper::checkArray($this->nameOptions)) - { - // Name Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL').' -', - 'filter_name', - JHtml::_('select.options', $this->nameOptions, 'value', 'text', $this->state->get('filter.name')) + JHtmlBatch_::addListSelection( + JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) ); + } - if ($this->canBatch && $this->canCreate && $this->canEdit) + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_RELEASE_CHECKING_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Name Selection + $this->nameOptions = JFormHelper::loadFieldType('contextsfiltername')->options; + // We do some sanitation for Name filter + if (Release_checkingHelper::checkArray($this->nameOptions) && + isset($this->nameOptions[0]->value) && + !Release_checkingHelper::checkString($this->nameOptions[0]->value)) { - // Name Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL').' -', - 'batch[name]', - JHtml::_('select.options', $this->nameOptions, 'value', 'text') - ); + unset($this->nameOptions[0]); } + // Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL').' -', + 'batch[name]', + JHtml::_('select.options', $this->nameOptions, 'value', 'text') + ); } } @@ -257,42 +238,10 @@ class Release_checkingViewContexts extends JViewLegacy protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.name' => JText::_('COM_RELEASE_CHECKING_CONTEXT_NAME_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); - } - - protected function getTheNameSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('name')); - $query->from($db->quoteName('#__release_checking_context')); - $query->order($db->quoteName('name') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - $results = array_unique($results); - $_filter = array(); - foreach ($results as $name) - { - // Now add the name and its text to the options array - $_filter[] = JHtml::_('select.option', $name, $name); - } - return $_filter; - } - return false; } } diff --git a/admin/views/joomla_version/tmpl/edit.php b/admin/views/joomla_version/tmpl/edit.php index ae2d6a1..6d9aace 100644 --- a/admin/views/joomla_version/tmpl/edit.php +++ b/admin/views/joomla_version/tmpl/edit.php @@ -10,10 +10,10 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); $componentParams = $this->params; // will be removed just use $this->params instead ?> @@ -42,13 +42,18 @@ $componentParams = $this->params; // will be removed just use $this->params inst