forked from joomla/Component-Builder
Fixed gh-422 to insure the details tab always gets added if no custom tab names are found. Added the option to run the expantion option without installing the components locally.
This commit is contained in:
parent
2fb4a1ae43
commit
8acbb3b3a4
@ -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**
|
||||
|
||||
|
@ -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**
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -713,6 +713,21 @@
|
||||
default="0"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Install Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="install"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_TRUE</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_FALSE</option>
|
||||
</field>
|
||||
<!-- Backup Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
|
@ -2996,6 +2996,7 @@ COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_DESCRIPTION="Enter website address"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_HINT="http://www.example.com"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL="Website"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_MESSAGE="Error! Please add website here."
|
||||
COM_COMPONENTBUILDER_CONFIG_FALSE="False"
|
||||
COM_COMPONENTBUILDER_CONFIG_FLAT_LOAD="Flat"
|
||||
COM_COMPONENTBUILDER_CONFIG_FOLDER_PATHS="Folder Paths"
|
||||
COM_COMPONENTBUILDER_CONFIG_FORCE_LOAD="Force"
|
||||
@ -3011,6 +3012,8 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
|
||||
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
|
||||
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
|
||||
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
|
||||
COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION="Component locally"
|
||||
COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL="Install"
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area. "
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories"
|
||||
@ -3133,6 +3136,7 @@ COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION="How long should th
|
||||
COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle"
|
||||
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation"
|
||||
COM_COMPONENTBUILDER_CONFIG_TLS="TLS"
|
||||
COM_COMPONENTBUILDER_CONFIG_TRUE="True"
|
||||
COM_COMPONENTBUILDER_CONFIG_UIKIT_DESC="<b>The Parameters for the uikit are set here.</b><br />Uikit is a lightweight and modular front-end framework
|
||||
for developing fast and powerful web interfaces. For more info visit <a href="https://getuikit.com/v2/" target="_blank">https://getuikit.com/v2/</a>"
|
||||
COM_COMPONENTBUILDER_CONFIG_UIKIT_LABEL="Uikit2 Settings"
|
||||
|
@ -77,6 +77,9 @@ class JFormFieldViewtabs extends JFormFieldList
|
||||
if (isset($item->addtabs) && ComponentbuilderHelper::checkJson($item->addtabs))
|
||||
{
|
||||
$items = json_decode($item->addtabs, true);
|
||||
// check if the array has values
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
$nr = 1;
|
||||
foreach($items as $itemName)
|
||||
{
|
||||
@ -84,7 +87,9 @@ class JFormFieldViewtabs extends JFormFieldList
|
||||
$nr++;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
// check if any were loaded
|
||||
if (!ComponentbuilderHelper::checkArray($options))
|
||||
{
|
||||
$options[] = JHtml::_('select.option', 1, JText::_('COM_COMPONENTBUILDER_DETAILS'));
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>13th June, 2019</creationDate>
|
||||
<creationDate>17th June, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -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 <b>%s</b> server!"
|
||||
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for <b>(ID: %s)</b> 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!"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user