Stable release of v3.1.19
We fixed #972 so that custom code (in the header) will be added after the power namespaces. We added a message to show when a server move failed. We fixed the BaseConfig to not use '_' as separator. We fixed the footable loading issue. We removed the need for passing placeholders by reference. We added the option to generate a CHANGELOG. We fixed the server class to load new client if server details changed. We fixed the readme placeholder issue #978. We fixed the empty server url issue #978. Fixed Package import to now use the phplibsec version 3.
This commit is contained in:
@ -707,12 +707,20 @@ class Compiler extends Infusion
|
||||
&& ($update_server = CFactory::_('Component')->get('update_server')) !== null)
|
||||
{
|
||||
// move to server
|
||||
CFactory::_('Server')->legacyMove(
|
||||
if (!CFactory::_('Server')->legacyMove(
|
||||
$update_server_xml_path,
|
||||
$this->updateServerFileName . '.xml',
|
||||
(int) $update_server,
|
||||
CFactory::_('Component')->get('update_server_protocol')
|
||||
);
|
||||
))
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'Upload of component (%s) update server XML failed.',
|
||||
CFactory::_('Component')->get('system_name')
|
||||
), 'Error'
|
||||
);
|
||||
}
|
||||
// remove the local file
|
||||
File::delete($update_server_xml_path);
|
||||
}
|
||||
@ -738,12 +746,20 @@ class Compiler extends Infusion
|
||||
))
|
||||
{
|
||||
// move to server
|
||||
CFactory::_('Server')->legacyMove(
|
||||
if (!CFactory::_('Server')->legacyMove(
|
||||
$module->update_server_xml_path,
|
||||
$module->update_server_xml_file_name,
|
||||
(int) $module->update_server,
|
||||
$module->update_server_protocol
|
||||
);
|
||||
))
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'Upload of module (%s) update server XML failed.',
|
||||
$module->name
|
||||
), 'Error'
|
||||
);
|
||||
}
|
||||
// remove the local file
|
||||
File::delete($module->update_server_xml_path);
|
||||
}
|
||||
@ -771,12 +787,20 @@ class Compiler extends Infusion
|
||||
))
|
||||
{
|
||||
// move to server
|
||||
CFactory::_('Server')->legacyMove(
|
||||
if (!CFactory::_('Server')->legacyMove(
|
||||
$plugin->update_server_xml_path,
|
||||
$plugin->update_server_xml_file_name,
|
||||
(int) $plugin->update_server,
|
||||
$plugin->update_server_protocol
|
||||
);
|
||||
))
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'Upload of plugin (%s) update server XML failed.',
|
||||
$plugin->name
|
||||
), 'Error'
|
||||
);
|
||||
}
|
||||
// remove the local file
|
||||
File::delete($plugin->update_server_xml_path);
|
||||
}
|
||||
@ -844,6 +868,13 @@ class Compiler extends Infusion
|
||||
{
|
||||
// do a final run to update the readme file
|
||||
$two = 0;
|
||||
// counter data if not set already
|
||||
if (!CFactory::_('Content')->exist('LINE_COUNT')
|
||||
|| CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Utilities.Counter')->line)
|
||||
{
|
||||
CFactory::_('Utilities.Counter')->set();
|
||||
}
|
||||
// search for the readme
|
||||
foreach (CFactory::_('Utilities.Files')->get('static') as $static)
|
||||
{
|
||||
if (('README.md' === $static['name']
|
||||
@ -864,12 +895,6 @@ class Compiler extends Infusion
|
||||
|
||||
private function setReadMe($path)
|
||||
{
|
||||
// set readme data if not set already
|
||||
if (!CFactory::_('Content')->exist('LINE_COUNT')
|
||||
|| CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Utilities.Counter')->line)
|
||||
{
|
||||
CFactory::_('Utilities.Counter')->set();
|
||||
}
|
||||
// get the file
|
||||
$string = FileHelper::getContent($path);
|
||||
// update the file
|
||||
@ -1063,12 +1088,20 @@ class Compiler extends Infusion
|
||||
&$component_sales_name, &$this->componentData)
|
||||
);
|
||||
// move to server
|
||||
CFactory::_('Server')->legacyMove(
|
||||
if (!CFactory::_('Server')->legacyMove(
|
||||
$this->filepath['component'],
|
||||
$component_sales_name . '.zip',
|
||||
(int) CFactory::_('Component')->get('sales_server'),
|
||||
CFactory::_('Component')->get('sales_server_protocol')
|
||||
);
|
||||
))
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'Upload of component (%s) zip file failed.',
|
||||
CFactory::_('Component')->get('system_name')
|
||||
), 'Error'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterZipComponent
|
||||
@ -1158,12 +1191,20 @@ class Compiler extends Infusion
|
||||
&$module)
|
||||
);
|
||||
// move to server
|
||||
CFactory::_('Server')->legacyMove(
|
||||
if (!CFactory::_('Server')->legacyMove(
|
||||
$this->filepath['modules'][$module->id],
|
||||
$module->zip_name . '.zip',
|
||||
(int) $module->sales_server,
|
||||
$module->sales_server_protocol
|
||||
);
|
||||
))
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'Upload of module (%s) zip file failed.',
|
||||
$module->name
|
||||
), 'Error'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterZipModule
|
||||
@ -1252,12 +1293,20 @@ class Compiler extends Infusion
|
||||
&$plugin)
|
||||
);
|
||||
// move to server
|
||||
CFactory::_('Server')->legacyMove(
|
||||
if (!CFactory::_('Server')->legacyMove(
|
||||
$this->filepath['plugins'][$plugin->id],
|
||||
$plugin->zip_name . '.zip',
|
||||
(int) $plugin->sales_server,
|
||||
$plugin->sales_server_protocol
|
||||
);
|
||||
))
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'Upload of plugin (%s) zip file failed.',
|
||||
$plugin->name
|
||||
), 'Error'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterZipPlugin
|
||||
|
@ -1064,7 +1064,8 @@ class Interpretation extends Fields
|
||||
$addActive = true;
|
||||
if (CFactory::_('Component')->isArray('version_update'))
|
||||
{
|
||||
foreach (CFactory::_('Component')->get('version_update') as $nr => &$update)
|
||||
$updates = CFactory::_('Component')->get('version_update');
|
||||
foreach ($updates as $nr => &$update)
|
||||
{
|
||||
$this->setUpdateXMLSQL($update, $updateXML, $addDynamicSQL);
|
||||
|
||||
@ -1074,6 +1075,7 @@ class Interpretation extends Fields
|
||||
$addActive = false;
|
||||
}
|
||||
}
|
||||
CFactory::_('Component')->set('version_update', $updates);
|
||||
}
|
||||
// add the dynamic sql if not already added
|
||||
if ($addDynamicSQL
|
||||
@ -1094,7 +1096,7 @@ class Interpretation extends Fields
|
||||
$this->setDynamicUpdateXMLSQL($updateXML, $addActive);
|
||||
}
|
||||
// add the update server file
|
||||
if (CFactory::_('Component')->get('add_update_server', 3) != 3)
|
||||
if (CFactory::_('Component')->get('update_server_target', 3) != 3)
|
||||
{
|
||||
$updateXML[] = '</updates>';
|
||||
// UPDATE_SERVER_XML
|
||||
@ -15450,6 +15452,18 @@ class Interpretation extends Fields
|
||||
CFactory::_('Content')->set_('import_' . $nameListCode, 'VIEWS', 'IMPORT_' . CFactory::_('Placeholder')->get_h('VIEWS'));
|
||||
CFactory::_('Content')->set_('import_' . $nameListCode, 'Views', 'Import_' . CFactory::_('Placeholder')->get_h('views'));
|
||||
CFactory::_('Content')->set_('import_' . $nameListCode, 'views', 'import_' . CFactory::_('Placeholder')->get_h('views'));
|
||||
|
||||
// IMPORT_CUSTOM_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
||||
CFactory::_('Content')->set_('import_' . $nameListCode, 'IMPORT_CUSTOM_CONTROLLER_HEADER', $this->setFileHeader(
|
||||
'import.custom.controller',
|
||||
$nameListCode
|
||||
));
|
||||
|
||||
// IMPORT_CUSTOM_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
||||
CFactory::_('Content')->set_('import_' . $nameListCode, 'IMPORT_CUSTOM_MODEL_HEADER', $this->setFileHeader(
|
||||
'import.custom.model',
|
||||
$nameListCode
|
||||
));
|
||||
}
|
||||
|
||||
public function setListQuery(&$nameSingleCode, &$nameListCode)
|
||||
@ -22183,9 +22197,19 @@ class Interpretation extends Fields
|
||||
$headers[] = 'use Joomla\Utilities\ArrayHelper;';
|
||||
break;
|
||||
case 'custom.admin.view.controller':
|
||||
case 'import.custom.controller':
|
||||
case 'import.controller':
|
||||
$headers[] = 'use Joomla\CMS\MVC\Controller\BaseController;';
|
||||
$headers[] = 'use Joomla\Utilities\ArrayHelper;';
|
||||
break;
|
||||
case 'import.custom.model':
|
||||
case 'import.model':
|
||||
$headers[] = 'use Joomla\CMS\MVC\Model\BaseDatabaseModel;';
|
||||
$headers[] = 'use Joomla\CMS\Filesystem\File;';
|
||||
$headers[] = 'use Joomla\CMS\Filesystem\Folder;';
|
||||
$headers[] = 'use Joomla\Utilities\ArrayHelper;';
|
||||
$headers[] = 'use PhpOffice\PhpSpreadsheet\IOFactory;';
|
||||
break;
|
||||
case 'admin.views.controller':
|
||||
case 'custom.admin.views.controller':
|
||||
case 'dashboard.controller':
|
||||
|
@ -625,8 +625,7 @@ class Infusion extends Interpretation
|
||||
if (isset($view['port']) && $view['port']
|
||||
|| 1 == $view['settings']->add_custom_import)
|
||||
{
|
||||
$this->eximportView[$nameListCode]
|
||||
= true;
|
||||
$this->eximportView[$nameListCode] = true;
|
||||
if (1 == $view['settings']->add_custom_import)
|
||||
{
|
||||
// this view has custom import scripting
|
||||
@ -1382,6 +1381,14 @@ class Infusion extends Interpretation
|
||||
CFactory::_('Content')->set_('import', 'IMPORT_SAVE_METHOD', PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update_(
|
||||
ComponentbuilderHelper::getDynamicScripts('save')
|
||||
));
|
||||
// IMPORT_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
||||
CFactory::_('Content')->set_('import', 'IMPORT_CONTROLLER_HEADER', $this->setFileHeader(
|
||||
'import.controller', 'import'
|
||||
));
|
||||
// IMPORT_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
||||
CFactory::_('Content')->set_('import', 'IMPORT_MODEL_HEADER', $this->setFileHeader(
|
||||
'import.model', 'import'
|
||||
));
|
||||
}
|
||||
|
||||
// ensure that the ajax model and controller is set if needed
|
||||
@ -1798,6 +1805,12 @@ class Infusion extends Interpretation
|
||||
CFactory::_('Content')->set('README', CFactory::_('Component')->get('readme'));
|
||||
}
|
||||
|
||||
// CHANGELOG
|
||||
if (($changelog = CFactory::_('Component')->get('changelog')) !== null)
|
||||
{
|
||||
CFactory::_('Content')->set('CHANGELOG', $changelog);
|
||||
}
|
||||
|
||||
// Infuse POWERS
|
||||
CFactory::_('Power.Infusion')->set();
|
||||
|
||||
|
Reference in New Issue
Block a user