Release of v5.1.0
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed. Started compiling JCB5 on Joomla 5 with PHP 8.2. Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically). Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned. Move all internal ID linking to GUID inside of JCB 5. Updated the admin-tab-fields in add-fields view. #1205. Remove Custom Import Tab from admin view. Improved the customcode and placeholder search features.
This commit is contained in:
@@ -31,6 +31,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
|
||||
// No direct access to this file
|
||||
@@ -156,37 +157,6 @@ class Component_mysql_tweaksModel extends AdminModel
|
||||
$sql_tweak->loadString($item->sql_tweak);
|
||||
$item->sql_tweak = $sql_tweak->toArray();
|
||||
}
|
||||
|
||||
// update the fields
|
||||
$objectUpdate = new \stdClass();
|
||||
$objectUpdate->id = (int) $item->id;
|
||||
// repeatable values to check
|
||||
$arrayChecker = array(
|
||||
'sql_tweak' => 'adminview'
|
||||
);
|
||||
foreach ($arrayChecker as $_value => $checker)
|
||||
{
|
||||
// check what type of array we have here (should be subform... but just in case)
|
||||
// This could happen due to huge data sets
|
||||
if (isset($item->{$_value}) && isset($item->{$_value}[$checker]))
|
||||
{
|
||||
$bucket = array();
|
||||
foreach($item->{$_value} as $option => $values)
|
||||
{
|
||||
foreach($values as $nr => $value)
|
||||
{
|
||||
$bucket[$_value.$nr][$option] = $value;
|
||||
}
|
||||
}
|
||||
$item->{$_value} = $bucket;
|
||||
$objectUpdate->{$_value} = json_encode($bucket);
|
||||
}
|
||||
}
|
||||
// be sure to update the table if we found repeatable fields that are still not converted
|
||||
if (count((array) $objectUpdate) > 1)
|
||||
{
|
||||
$this->_db->updateObject('#__componentbuilder_component_mysql_tweaks', $objectUpdate, 'id');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
@@ -298,6 +268,19 @@ class Component_mysql_tweaksModel extends AdminModel
|
||||
// Now set the local-redirected field default value
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
$initDefaults = $jinput->get('init_defaults', null, 'STRING');
|
||||
if (!empty($initDefaults))
|
||||
{
|
||||
// Now check if this json values are valid
|
||||
$initDefaults = json_decode(urldecode($initDefaults), true);
|
||||
if (is_array($initDefaults))
|
||||
{
|
||||
foreach ($initDefaults as $field => $value)
|
||||
{
|
||||
$form->setValue($field, null, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $form;
|
||||
}
|
||||
@@ -906,7 +889,7 @@ class Component_mysql_tweaksModel extends AdminModel
|
||||
|
||||
|
||||
// check if we have a clone moment
|
||||
if (isset($data['clone_me']) && $data['clone_me'] > 0)
|
||||
if (isset($data['clone_me']) && GuidHelper::valid($data['clone_me']))
|
||||
{
|
||||
// get sql_tweak data from clone_me (component_mysql_tweaks)
|
||||
$data['sql_tweak'] = GetHelper::var('component_mysql_tweaks', $data['clone_me'], 'joomla_component', 'sql_tweak');
|
||||
|
Reference in New Issue
Block a user