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\Joomla\Utilities\GuidHelper;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use Joomla\CMS\Filesystem\Folder as FilesystemFolder;
|
||||
|
||||
// No direct access to this file
|
||||
\defined('_JEXEC') or die;
|
||||
@ -205,7 +206,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
// set auto loader
|
||||
ComponentbuilderHelper::autoLoader('smart');
|
||||
// get install folder
|
||||
$dir = JFile::stripExt($package['dir']);
|
||||
$dir = File::stripExt($package['dir']);
|
||||
// remove unziped folder
|
||||
ComponentbuilderHelper::removeFolder($dir);
|
||||
}
|
||||
@ -311,7 +312,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
// set auto loader
|
||||
ComponentbuilderHelper::autoLoader('smart');
|
||||
// extract the package
|
||||
if (JFile::exists($package['dir']))
|
||||
if (is_file($package['dir']))
|
||||
{
|
||||
// does this package pass a checksum
|
||||
$checksum = false;
|
||||
@ -359,12 +360,12 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
// get the zip adapter
|
||||
$zip = JArchive::getAdapter('zip');
|
||||
// set the directory name
|
||||
$this->dir = JFile::stripExt($package['dir']);
|
||||
$this->dir = File::stripExt($package['dir']);
|
||||
// unzip the package
|
||||
$zip->extract($package['dir'], $this->dir);
|
||||
// check for database file
|
||||
$infoFile = $this->dir . '/info.vdm';
|
||||
if (JFile::exists($infoFile))
|
||||
if (is_file($infoFile))
|
||||
{
|
||||
// load the data
|
||||
if ($info = FileHelper::getContent($infoFile))
|
||||
@ -635,13 +636,13 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
// set auto loader
|
||||
ComponentbuilderHelper::autoLoader('smart');
|
||||
// extract the package
|
||||
if (JFile::exists($package['dir']))
|
||||
if (is_file($package['dir']))
|
||||
{
|
||||
// set the directory name
|
||||
$this->dir = JFile::stripExt($package['dir']);
|
||||
$this->dir = File::stripExt($package['dir']);
|
||||
// check for database file
|
||||
$dbFile = $this->dir . '/db.vdm';
|
||||
if (!JFile::exists($dbFile))
|
||||
if (!is_file($dbFile))
|
||||
{
|
||||
// get the zip adapter
|
||||
$zip = JArchive::getAdapter('zip');
|
||||
@ -649,7 +650,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
$zip->extract($package['dir'], $this->dir);
|
||||
}
|
||||
// check again
|
||||
if (JFile::exists($dbFile))
|
||||
if (is_file($dbFile))
|
||||
{
|
||||
// load the data
|
||||
if ($data = FileHelper::getContent($dbFile))
|
||||
@ -942,10 +943,10 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
$success = true;
|
||||
// check if we have custom files
|
||||
$customDir = str_replace('//', '/', $this->dir . '/custom');
|
||||
if (JFolder::exists($customDir))
|
||||
if (is_dir($customDir))
|
||||
{
|
||||
// great we have some custom stuff lets move it
|
||||
if (!JFolder::copy($customDir, $customPath,'',true))
|
||||
if (!FilesystemFolder::copy($customDir, $customPath,'',true))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
|
||||
$success = false;
|
||||
@ -958,10 +959,10 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
}
|
||||
// check if we have images
|
||||
$imageDir = str_replace('//', '/', $this->dir . '/images');
|
||||
if (JFolder::exists($imageDir))
|
||||
if (is_dir($imageDir))
|
||||
{
|
||||
// great we have some images lets move them
|
||||
if (!JFolder::copy($imageDir, $imagesPath,'',true))
|
||||
if (!FilesystemFolder::copy($imageDir, $imagesPath,'',true))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
|
||||
$success = false;
|
||||
@ -974,10 +975,10 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
}
|
||||
// now move the dynamic files if found
|
||||
$dynamicDir = str_replace('//', '/', $this->dir . '/dynamic');
|
||||
if (JFolder::exists($dynamicDir))
|
||||
if (is_dir($dynamicDir))
|
||||
{
|
||||
// get a list of folders
|
||||
$folders = JFolder::folders($dynamicDir);
|
||||
$folders = FilesystemFolder::folders($dynamicDir);
|
||||
// check if we have files
|
||||
if(UtilitiesArrayHelper::check($folders))
|
||||
{
|
||||
@ -985,7 +986,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
{
|
||||
$destination = $this->setDynamicPath($folder);
|
||||
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
|
||||
if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true))
|
||||
if (!is_dir($fullPath) || !FilesystemFolder::copy($fullPath, $destination,'',true))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error');
|
||||
$success = false;
|
||||
@ -998,7 +999,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
}
|
||||
}
|
||||
// get a list of files
|
||||
$files = JFolder::files($dynamicDir);
|
||||
$files = FilesystemFolder::files($dynamicDir);
|
||||
// check if we have files
|
||||
if(UtilitiesArrayHelper::check($files))
|
||||
{
|
||||
@ -1006,7 +1007,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
{
|
||||
$destination = $this->setDynamicPath($file);
|
||||
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
|
||||
if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination))
|
||||
if (!is_file($fullPath) || !File::copy($fullPath, $destination))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error');
|
||||
$success = false;
|
||||
@ -1041,7 +1042,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
{
|
||||
$subPath = str_replace('//', '/', $this->dir . '/' . $folder);
|
||||
// go to the package sub folder if found
|
||||
if (JFolder::exists($subPath))
|
||||
if (is_dir($subPath))
|
||||
{
|
||||
$this->unLockFile($subPath);
|
||||
}
|
||||
@ -1061,7 +1062,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
|
||||
// we are changing the working directory to the tmp path (important)
|
||||
chdir($tmpPath);
|
||||
// get a list of files in the current directory tree (all)
|
||||
$files = JFolder::files('.', '.', true, true);
|
||||
$files = FilesystemFolder::files('.', '.', true, true);
|
||||
// read in the file content
|
||||
foreach ($files as $file)
|
||||
{
|
||||
|
Reference in New Issue
Block a user