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 + *Version*: 2.6.13
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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** + *Field count*: **1577**
+ *File count*: **1161** + *File count*: **1161**
+ *Folder count*: **186** + *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 + *Version*: 2.6.13
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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** + *Field count*: **1577**
+ *File count*: **1161** + *File count*: **1161**
+ *Folder count*: **186** + *Folder count*: **186**

View File

@ -2265,10 +2265,16 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
break; break;
case 'joomla_component': 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 ... // 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 $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 else
{ {

View File

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