Fixed gh-373 so that the auto update of selection is only triggered when toggling the all selection button.

This commit is contained in:
2019-02-06 11:32:38 +02:00
parent 1a538e71d7
commit 104c4e6bae
8 changed files with 22 additions and 26 deletions

View File

@ -44,13 +44,13 @@ class ComponentbuilderControllerApi extends JControllerForm
$model = componentbuilderHelper::getModel('joomla_components', JPATH_ADMINISTRATOR . '/components/com_componentbuilder');
// set user
$model->user = $this->getApiUser();
// make sure to set active type (adding this script from custom code :)
$model->activeType = 'backup';
// check if export is allowed for this user. (we need this sorry)
if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
{
// get all component IDs to backup
$pks = componentbuilderHelper::getComponentIDs();
// make sure to set active type to backup
$model->activeType = 'backup';
// set auto loader
ComponentbuilderHelper::autoLoader('smart');
// manual backup message
@ -171,7 +171,7 @@ class ComponentbuilderControllerApi extends JControllerForm
}
}
// quite only if auto backup (adding this script from custom code :)
if ('backup' === 'backup')
if ('backup' === $model->activeType)
{
echo "# " . $backupNoticeStatus . "\n" .implode("\n", $backupNotice);
// clear session
@ -182,7 +182,7 @@ class ComponentbuilderControllerApi extends JControllerForm
return;
}
// quite only if auto backup (adding this script from custom code :)
if ('backup' === 'backup')
if ('backup' === $model->activeType)
{
echo "# Error\n" . JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED');
// clear session