Added the phpseclib librarie for ssh/ftps server protocol as explained in gh-230. Extended the Component Files & Folders concept to allow adding files and folder from anywhere where PHP/Apache has permission to read, resolved gh-231

This commit is contained in:
2018-02-16 23:53:43 +02:00
parent 0c798d9579
commit c7551c6edd
63 changed files with 37151 additions and 166 deletions

View File

@ -111,6 +111,22 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
$item->addfolders = $addfolders->toArray();
}
if (!empty($item->addfilesfullpath))
{
// Convert the addfilesfullpath field to an array.
$addfilesfullpath = new Registry;
$addfilesfullpath->loadString($item->addfilesfullpath);
$item->addfilesfullpath = $addfilesfullpath->toArray();
}
if (!empty($item->addfoldersfullpath))
{
// Convert the addfoldersfullpath field to an array.
$addfoldersfullpath = new Registry;
$addfoldersfullpath->loadString($item->addfoldersfullpath);
$item->addfoldersfullpath = $addfoldersfullpath->toArray();
}
// update the fields
$objectUpdate = new stdClass();
$objectUpdate->id = (int) $item->id;
@ -856,6 +872,32 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
{
// Set the empty addfolders to data
$data['addfolders'] = '';
}
// Set the addfilesfullpath items to data.
if (isset($data['addfilesfullpath']) && is_array($data['addfilesfullpath']))
{
$addfilesfullpath = new JRegistry;
$addfilesfullpath->loadArray($data['addfilesfullpath']);
$data['addfilesfullpath'] = (string) $addfilesfullpath;
}
elseif (!isset($data['addfilesfullpath']))
{
// Set the empty addfilesfullpath to data
$data['addfilesfullpath'] = '';
}
// Set the addfoldersfullpath items to data.
if (isset($data['addfoldersfullpath']) && is_array($data['addfoldersfullpath']))
{
$addfoldersfullpath = new JRegistry;
$addfoldersfullpath->loadArray($data['addfoldersfullpath']);
$data['addfoldersfullpath'] = (string) $addfoldersfullpath;
}
elseif (!isset($data['addfoldersfullpath']))
{
// Set the empty addfoldersfullpath to data
$data['addfoldersfullpath'] = '';
}
// Set the Params Items to data