Release of v4.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 JCB4 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 4 tables to utf8mb4_unicode_ci collation if misaligned. Move all internal ID linking to GUID inside of JCB 4. 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:
2025-02-14 23:01:37 +02:00
parent 4e968e96ab
commit 8549348a61
644 changed files with 42268 additions and 18453 deletions

View File

@@ -49,8 +49,6 @@ class AjaxController extends BaseController
$this->app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$this->app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
$this->registerTask('getComponentDetails', 'ajax');
$this->registerTask('getCronPath', 'ajax');
$this->registerTask('getWiki', 'ajax');
@@ -80,6 +78,9 @@ class AjaxController extends BaseController
$this->registerTask('getEditCustomCodeButtons', 'ajax');
$this->registerTask('placedin', 'ajax');
$this->registerTask('checkPlaceholderName', 'ajax');
$this->registerTask('snippetDetails', 'ajax');
$this->registerTask('setSnippetGithub', 'ajax');
$this->registerTask('getSnippets', 'ajax');
$this->registerTask('getExistingValidationRuleCode', 'ajax');
$this->registerTask('getValidationRulesTable', 'ajax');
$this->registerTask('checkRuleName', 'ajax');
@@ -91,9 +92,6 @@ class AjaxController extends BaseController
$this->registerTask('getSearchValue', 'ajax');
$this->registerTask('getReplaceValue', 'ajax');
$this->registerTask('setValue', 'ajax');
$this->registerTask('snippetDetails', 'ajax');
$this->registerTask('setSnippetGithub', 'ajax');
$this->registerTask('getSnippets', 'ajax');
}
/**
@@ -120,108 +118,10 @@ class AjaxController extends BaseController
$task = $this->getTask();
switch($task)
{
case 'isNew':
try
{
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->isNew($noticeValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'isRead':
try
{
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->isRead($noticeValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getComponentDetails':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
if($idValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
@@ -565,7 +465,7 @@ class AjaxController extends BaseController
case 'getClassCode':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $user->id != 0 && $typeValue)
{
@@ -615,7 +515,7 @@ class AjaxController extends BaseController
case 'getClassCodeIds':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
$typeValue = $jinput->get('type', NULL, 'WORD');
$keyValue = $jinput->get('key', 1, 'INT');
if($idValue && $user->id != 0 && $typeValue)
@@ -666,7 +566,7 @@ class AjaxController extends BaseController
case 'getClassHeaderCode':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $user->id != 0 && $typeValue)
{
@@ -765,7 +665,7 @@ class AjaxController extends BaseController
case 'fieldSelectOptions':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
if($idValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
@@ -1308,7 +1208,7 @@ class AjaxController extends BaseController
case 'viewTableColumns':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
$asValue = $jinput->get('as', NULL, 'WORD');
$typeValue = $jinput->get('type', NULL, 'INT');
if($idValue && $user->id != 0 && $asValue && $typeValue)
@@ -1359,7 +1259,7 @@ class AjaxController extends BaseController
case 'getDynamicValues':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
$viewValue = $jinput->get('view', NULL, 'WORD');
if($idValue && $user->id != 0 && $viewValue)
{
@@ -1461,8 +1361,8 @@ class AjaxController extends BaseController
{
$functioNameValue = $jinput->get('functioName', NULL, 'WORD');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'WORD');
if($functioNameValue && $user->id != 0 && $idValue && $targetValue)
$targetValue = $jinput->get('target', NULL, 'ALNUM');
if($functioNameValue && $user->id != 0 && $idValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
@@ -1561,8 +1461,8 @@ class AjaxController extends BaseController
{
$placeholderValue = $jinput->get('placeholder', NULL, 'WORD');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'WORD');
if($placeholderValue && $user->id != 0 && $idValue && $targetValue)
$targetValue = $jinput->get('target', NULL, 'ALNUM');
if($placeholderValue && $user->id != 0 && $idValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
@@ -1657,6 +1557,154 @@ class AjaxController extends BaseController
}
}
break;
case 'snippetDetails':
try
{
$idValue = $jinput->get('id', NULL, 'STRING');
if($idValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->getSnippetDetails($idValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'setSnippetGithub':
try
{
$pathValue = $jinput->get('path', NULL, 'STRING');
$statusValue = $jinput->get('status', NULL, 'WORD');
if($pathValue && $user->id != 0 && $statusValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->setSnippetGithub($pathValue, $statusValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getSnippets':
try
{
$librariesValue = $jinput->get('libraries', NULL, 'STRING');
if($librariesValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->getSnippets($librariesValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getExistingValidationRuleCode':
try
{
@@ -1808,7 +1856,7 @@ class AjaxController extends BaseController
case 'fieldTypeProperties':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
$idValue = $jinput->get('id', NULL, 'STRING');
if($idValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
@@ -1907,7 +1955,7 @@ class AjaxController extends BaseController
case 'getCodeGlueOptions':
try
{
$listfieldValue = $jinput->get('listfield', NULL, 'INT');
$listfieldValue = $jinput->get('listfield', NULL, 'STRING');
$joinfieldsValue = $jinput->get('joinfields', NULL, 'STRING');
$typeValue = $jinput->get('type', NULL, 'INT');
$areaValue = $jinput->get('area', NULL, 'INT');
@@ -2231,154 +2279,6 @@ class AjaxController extends BaseController
}
}
break;
case 'snippetDetails':
try
{
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->getSnippetDetails($idValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'setSnippetGithub':
try
{
$pathValue = $jinput->get('path', NULL, 'STRING');
$statusValue = $jinput->get('status', NULL, 'WORD');
if($pathValue && $user->id != 0 && $statusValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->setSnippetGithub($pathValue, $statusValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getSnippets':
try
{
$librariesValue = $jinput->get('libraries', NULL, 'STRING');
if($librariesValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->getSnippets($librariesValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}
else