diff --git a/README.md b/README.md
index 8f374c176..c742a1cee 100644
--- a/README.md
+++ b/README.md
@@ -146,12 +146,12 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 13th June, 2019
++ *Last Build*: 17th June, 2019
+ *Version*: 2.9.20
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **206816**
-+ *Field count*: **1140**
++ *Line count*: **206865**
++ *Field count*: **1141**
+ *File count*: **1346**
+ *Folder count*: **209**
diff --git a/admin/README.txt b/admin/README.txt
index 8f374c176..c742a1cee 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -146,12 +146,12 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 13th June, 2019
++ *Last Build*: 17th June, 2019
+ *Version*: 2.9.20
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **206816**
-+ *Field count*: **1140**
++ *Line count*: **206865**
++ *Field count*: **1141**
+ *File count*: **1346**
+ *Folder count*: **209**
diff --git a/admin/compiler/joomla_3/JControllerForm_site.php b/admin/compiler/joomla_3/JControllerForm_site.php
index 01a76de19..5ccd4c362 100644
--- a/admin/compiler/joomla_3/JControllerForm_site.php
+++ b/admin/compiler/joomla_3/JControllerForm_site.php
@@ -42,7 +42,7 @@ class ###Component###Controller###View### extends JControllerForm
{
$this->view_list = '###SITE_DEFAULT_VIEW###'; // safeguard for setting the return view listing to the default site view.
parent::__construct($config);
- }
+ }###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/**
* Method override to check if you can add a new record.
@@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
- $return = $this->input->get('return', null, 'base64');
+ $return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL###
$cancel = parent::cancel($key);
@@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm
'index.php?option=' . $this->option . $redirect, false
)
);
- }
+ }###JCONTROLLERFORM_AFTERCANCEL###
return $cancel;
}
diff --git a/admin/config.xml b/admin/config.xml
index b5e9f989e..220ced4d6 100644
--- a/admin/config.xml
+++ b/admin/config.xml
@@ -713,6 +713,21 @@
default="0"
button="false"
/>
+
+
+
+
+
+
https://getuikit.com/v2/"
COM_COMPONENTBUILDER_CONFIG_UIKIT_LABEL="Uikit2 Settings"
diff --git a/admin/models/fields/viewtabs.php b/admin/models/fields/viewtabs.php
index 8fda47d15..1fec7ef29 100644
--- a/admin/models/fields/viewtabs.php
+++ b/admin/models/fields/viewtabs.php
@@ -35,7 +35,7 @@ class JFormFieldViewtabs extends JFormFieldList
*/
protected function getOptions()
{
- // get the input from url
+ // get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$fieldsID = $jinput->getInt('id', 0);
@@ -77,14 +77,19 @@ class JFormFieldViewtabs extends JFormFieldList
if (isset($item->addtabs) && ComponentbuilderHelper::checkJson($item->addtabs))
{
$items = json_decode($item->addtabs, true);
- $nr = 1;
- foreach($items as $itemName)
+ // check if the array has values
+ if (ComponentbuilderHelper::checkArray($items))
{
- $options[] = JHtml::_('select.option', $nr, $itemName['name']);
- $nr++;
+ $nr = 1;
+ foreach($items as $itemName)
+ {
+ $options[] = JHtml::_('select.option', $nr, $itemName['name']);
+ $nr++;
+ }
}
}
- else
+ // check if any were loaded
+ if (!ComponentbuilderHelper::checkArray($options))
{
$options[] = JHtml::_('select.option', 1, JText::_('COM_COMPONENTBUILDER_DETAILS'));
}
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 76127e790..e1f1bffa5 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 13th June, 2019
+ 17th June, 2019
Llewellyn van der Merwe
llewellyn@joomlacomponentbuilder.com
http://www.joomlacomponentbuilder.com
diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini
index 91d40c2c6..8afbb7c78 100644
--- a/site/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/site/language/en-GB/en-GB.com_componentbuilder.ini
@@ -82,6 +82,8 @@ COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="T
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for %s server!"
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for (ID: %s) could not be retrieved!"
COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_AND_IS_STILL_IN_THE_TEMP_FOLDER="The %s was not Installed and is still in the temp folder."
+COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_BY_YOUR_REQUEST_AND_IS_ALSO_REMOVED_FROM_TEMP_FOLDER="The %s was not Installed by your request and is also removed from temp folder."
+COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_BY_YOUR_REQUEST_AND_IS_STILL_IN_THE_TEMP_FOLDER="The %s was not Installed by your request and is still in the temp folder."
COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_COMPILED="The %s was successfully compiled."
COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_INSTALLED_AND_REMOVED_FROM_TEMP_FOLDER="The %s was successfully Installed and removed from temp folder."
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
diff --git a/site/models/api.php b/site/models/api.php
index 2602d7713..45f94e0ee 100644
--- a/site/models/api.php
+++ b/site/models/api.php
@@ -191,6 +191,7 @@ class ComponentbuilderModelApi extends JModelItem
{
$values = array(
'version' => 3,
+ 'install' => 1,
'component' => 0,
'backup' => 0,
'repository' => 0,
@@ -224,11 +225,28 @@ class ComponentbuilderModelApi extends JModelItem
// get compiler model to run the installer
$model = ComponentbuilderHelper::getModel('compiler', JPATH_COMPONENT_ADMINISTRATOR);
// now install components
- if ($model->install($this->compiler->componentFolderName.'.zip'))
+ if (1 == $values['install'] && $model->install($this->compiler->componentFolderName.'.zip'))
{
// component was installed
$this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_INSTALLED_AND_REMOVED_FROM_TEMP_FOLDER', $this->compiler->componentFolderName);
}
+ elseif (1 != $values['install'])
+ {
+ jimport('joomla.filesystem.file');
+ $config = JFactory::getConfig();
+ $package = $config->get('tmp_path') . '/' . $this->compiler->componentFolderName.'.zip';
+ // just remove from temp
+ if (JFile::delete($package) && !is_file($package))
+ {
+ // component was installed
+ $this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_BY_YOUR_REQUEST_AND_IS_ALSO_REMOVED_FROM_TEMP_FOLDER', $this->compiler->componentFolderName);
+ }
+ else
+ {
+ // component was not installed
+ $this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_BY_YOUR_REQUEST_AND_IS_STILL_IN_THE_TEMP_FOLDER', $this->compiler->componentFolderName);
+ }
+ }
else
{
// component was not installed