52
0

Update on v1.0.2 (beta for next version)

Here's an update on the current version, which includes changes towards the next release still in beta.
This commit is contained in:
Robot 2023-10-18 09:28:04 +02:00
parent 148a03203e
commit 85610e0f7a
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
2 changed files with 8 additions and 5 deletions

View File

@ -14,7 +14,10 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Registry\Registry;
use Joomla\Registry\Registry;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
@ -52,8 +55,8 @@ class PlgExtensionComponentbuilderFieldOrderingCompiler extends CMSPlugin
public function jcb_ce_onBeforeModelViewData(&$context, &$view, &$placeholders)
{
// add the privacy
$view->params = (isset($view->params) && ComponentbuilderHelper::checkJson($view->params)) ? json_decode($view->params, true) : $view->params;
if (ComponentbuilderHelper::checkArray($view->params) && isset($view->params['fieldordering']) && ComponentbuilderHelper::checkArray($view->params['fieldordering']))
$view->params = (isset($view->params) && JsonHelper::check($view->params)) ? json_decode($view->params, true) : $view->params;
if (ArrayHelper::check($view->params) && isset($view->params['fieldordering']) && ArrayHelper::check($view->params['fieldordering']))
{
if ($view->params['fieldordering']['add_admin_ordering'] == 1
|| $view->params['fieldordering']['add_linked_ordering'] == 1)
@ -61,7 +64,7 @@ class PlgExtensionComponentbuilderFieldOrderingCompiler extends CMSPlugin
// activate the load of the privacy plugin
$this->loadFieldordering = true;
// setup the view key name
$name_list = ComponentbuilderHelper::safeString($view->name_list);
$name_list = StringHelper::safe($view->name_list);
// load the admin view details
$this->activeViews[$name_list] = $view->params['fieldordering'];
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER</name>
<creationDate>2nd May, 2023</creationDate>
<creationDate>18th October, 2023</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl>