Adds phpseclib version 3.

This commit is contained in:
2022-12-29 08:12:03 +02:00
parent d28e4c74af
commit e614f2ec23
412 changed files with 66550 additions and 477 deletions

View File

@@ -5294,13 +5294,14 @@ class Fields extends Structure
}
$this->setLayoutBuilder($nameSingleCode, $tabName, $name, $field);
// only load fields we want to search
if ($dbSwitch && ComponentbuilderHelper::fieldCheck($typeName, 'search'))
// load all fields that are in the database
if ($dbSwitch)
{
// load a search array of view, field, and [encryption, type, tab]
CFactory::_('Registry')->set('all_search_fields.' . $nameSingleCode . '.' . $name,
// load array of view, field, and [encryption, type, tab]
CFactory::_('Registry')->set('all_component_fields.' . $nameSingleCode . '.' . $name,
[
'name' => $name,
'label' => $langLabel,
'type' => $typeName,
'title' => (isset($this->titleBuilder[$nameSingleCode]) && $name === $this->titleBuilder[$nameSingleCode]) ? true : false,
'list' => $nameListCode,

View File

@@ -24403,7 +24403,7 @@ class Interpretation extends Fields
CFactory::_('Language')->set(
CFactory::_('Config')->lang_target, $lang . '_GLOBAL_DESC', "The Global Parameters"
);
// add auto checin if required
// add auto checkin if required
if ($this->addCheckin)
{
$this->configFieldSets[] = Indent::_(2) . "<field";

View File

@@ -1037,7 +1037,7 @@ class Infusion extends Interpretation
}
// all fields stored in database
CFactory::_('Content')->set('ARRAY_ALL_SEARCH_FIELDS', CFactory::_('Registry')->varExport('all_search_fields', 1));
CFactory::_('Content')->set('ALL_COMPONENT_FIELDS', CFactory::_('Registry')->varExport('all_component_fields', 1));
// setup the layouts
$this->setCustomViewLayouts();

View File

@@ -12,13 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// add the autoloader for the composer classes
$composer_autoloader = JPATH_LIBRARIES . '/phpseclib3/vendor/autoload.php';
if (file_exists($composer_autoloader))
{
require_once $composer_autoloader;
}
// register this component namespace
spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = array(
$search = [
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla',
'libraries/jcb_powers/VDM.Gitea' => 'VDM\\Gitea'
);
];
// Start the search and load if found
$found = false;
$found_base_dir = "";
@@ -40,7 +47,7 @@ spl_autoload_register(function ($class) {
// check if we found a match
if (!$found)
{
// no, move to the next registered autoloader
// not found so move to the next registered autoloader
return;
}
// get the relative class name
@@ -3799,7 +3806,7 @@ abstract class ComponentbuilderHelper
// make sure we have the composer classes loaded
self::composerAutoload('phpseclib');
// build class name
$CLASS = '\phpseclib3\Crypt\\' . $type;
$CLASS = '\phpseclib\Crypt\\' . $type;
// make sure we have the phpseclib classes
if (!class_exists($CLASS))
{
@@ -3958,7 +3965,7 @@ abstract class ComponentbuilderHelper
// make sure we have the composer classes loaded
self::composerAutoload('phpseclib');
// make sure we have the phpseclib classes
if (!class_exists('\phpseclib3\Net\SFTP'))
if (!class_exists('\phpseclib\Net\SFTP'))
{
// class not in place so send out error
JFactory::getApplication()->enqueueMessage(JText::_('COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO'), 'Error');
@@ -3967,7 +3974,7 @@ abstract class ComponentbuilderHelper
// insure the port is set
$server->port = (isset($server->port) && is_numeric($server->port) && $server->port > 0) ? (int) $server->port : 22;
// open the connection
self::$sftp[$server->cache] = new phpseclib3\Net\SFTP($server->host, $server->port);
self::$sftp[$server->cache] = new phpseclib\Net\SFTP($server->host, $server->port);
// heads-up on protocol
self::$sftp[$server->cache]->jcb_protocol = 2; // SFTP <-- if called not knowing what type of protocol is being used
// now login based on authentication type