Made little fix to search of local Joomla component on JCB package import

This commit is contained in:
Llewellyn van der Merwe 2018-01-24 14:47:57 +02:00
parent f98240d566
commit f048c5c29f
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
4 changed files with 34 additions and 28 deletions

View File

@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.6.13
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **180832**
+ *Line count*: **180838**
+ *Field count*: **1577**
+ *File count*: **1161**
+ *Folder count*: **186**

View File

@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.6.13
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **180832**
+ *Line count*: **180838**
+ *Field count*: **1577**
+ *File count*: **1161**
+ *Folder count*: **186**

View File

@ -2265,10 +2265,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
break;
case 'joomla_component':
if ($retry == 2)
if ($retry == 3)
{
// get by name only
$getter = array('name', 'name_code'); // risky will look at this again
}
elseif ($retry == 2)
{
// get by name ...
$getter = array('name', 'name_code', 'short_description', 'author', 'email', 'component_version', 'companyname', 'system_name', 'website', 'bom', 'copyright', 'license'); // risky will look at this again
$retryAgain = 3;
}
else
{

View File

@ -1586,31 +1586,31 @@ class ComponentbuilderModelJoomla_components extends JModelList
return false;
}
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__componentbuilder_joomla_component");
if (ComponentbuilderHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__componentbuilder_joomla_component");
if (ComponentbuilderHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
}
/**