Fixed the compiler to insure the getExImPortHeaders method is added even when no custom script has been set
This commit is contained in:
parent
189a8723ac
commit
f692e573f6
@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.6.12
|
||||
+ *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*: **180823**
|
||||
+ *Line count*: **181174**
|
||||
+ *Field count*: **1573**
|
||||
+ *File count*: **1160**
|
||||
+ *Folder count*: **186**
|
||||
|
@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.6.12
|
||||
+ *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*: **180823**
|
||||
+ *Line count*: **181174**
|
||||
+ *Field count*: **1573**
|
||||
+ *File count*: **1160**
|
||||
+ *Folder count*: **186**
|
||||
|
@ -8104,6 +8104,34 @@ class Interpretation extends Fields
|
||||
$query .= PHP_EOL . "\t\treturn false;";
|
||||
$query .= PHP_EOL . "\t}";
|
||||
|
||||
// set a default script for those with no custom script
|
||||
$default = PHP_EOL . PHP_EOL . "\t/**";
|
||||
$default .= PHP_EOL . "\t* Method to get header.";
|
||||
$default .= PHP_EOL . "\t*";
|
||||
$default .= PHP_EOL . "\t* @return mixed An array of data items on success, false on failure.";
|
||||
$default .= PHP_EOL . "\t*/";
|
||||
$default .= PHP_EOL . "\tpublic function getExImPortHeaders()";
|
||||
$default .= PHP_EOL . "\t{";
|
||||
$default .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get a db connection.";
|
||||
$default .= PHP_EOL . "\t\t\$db = JFactory::getDbo();";
|
||||
$default .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " get the columns";
|
||||
$default .= PHP_EOL . "\t\t\$columns = \$db->getTableColumns(" . '"#__' . $this->fileContentStatic['###component###'] . '_' . $viewName_single . '");';
|
||||
$default .= PHP_EOL . "\t\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkArray(\$columns))";
|
||||
$default .= PHP_EOL . "\t\t{";
|
||||
$default .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " remove the headers you don't import/export.";
|
||||
$default .= PHP_EOL . "\t\t\tunset(\$columns['asset_id']);";
|
||||
$default .= PHP_EOL . "\t\t\tunset(\$columns['checked_out']);";
|
||||
$default .= PHP_EOL . "\t\t\tunset(\$columns['checked_out_time']);";
|
||||
$default .= PHP_EOL . "\t\t\t\$headers = new stdClass();";
|
||||
$default .= PHP_EOL . "\t\t\tforeach (\$columns as \$column => \$type)";
|
||||
$default .= PHP_EOL . "\t\t\t{";
|
||||
$default .= PHP_EOL . "\t\t\t\t\$headers->{\$column} = \$column;";
|
||||
$default .= PHP_EOL . "\t\t\t}";
|
||||
$default .= PHP_EOL . "\t\t\treturn \$headers;";
|
||||
$default .= PHP_EOL . "\t\t}";
|
||||
$default .= PHP_EOL . "\t\treturn false;";
|
||||
$default .= PHP_EOL . "\t}";
|
||||
|
||||
// set some placeholders just incase
|
||||
if (!isset($this->placeholders['###view###']) && !isset($this->placeholders['[[[view]]]']))
|
||||
{
|
||||
@ -8119,7 +8147,7 @@ class Interpretation extends Fields
|
||||
}
|
||||
|
||||
// add getExImPortHeaders
|
||||
$query .= $this->getCustomScriptBuilder('php_import_headers', 'import_' . $viewName_list, PHP_EOL . PHP_EOL, null, true);
|
||||
$query .= $this->getCustomScriptBuilder('php_import_headers', 'import_' . $viewName_list, PHP_EOL . PHP_EOL, null, true, $default);
|
||||
|
||||
// remove place holders if not needed (to not be suprized)
|
||||
if (isset($_viewSet))
|
||||
|
@ -348,6 +348,33 @@ class ComponentbuilderModelAdmin_views 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_admin_view");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -308,6 +308,33 @@ class ComponentbuilderModelCustom_admin_views 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_custom_admin_view");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -408,6 +408,33 @@ class ComponentbuilderModelCustom_codes 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_custom_code");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -353,6 +353,33 @@ class ComponentbuilderModelDynamic_gets 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_dynamic_get");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -456,6 +456,33 @@ class ComponentbuilderModelFields 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_field");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -308,6 +308,33 @@ class ComponentbuilderModelFieldtypes 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_fieldtype");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -283,6 +283,33 @@ class ComponentbuilderModelFtps 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_ftp");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -375,6 +375,33 @@ class ComponentbuilderModelHelp_documents 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_help_document");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -272,6 +272,33 @@ class ComponentbuilderModelLanguages 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_language");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -293,6 +293,33 @@ class ComponentbuilderModelLayouts 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_layout");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -308,6 +308,33 @@ class ComponentbuilderModelSite_views 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_site_view");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -418,6 +418,33 @@ class ComponentbuilderModelSnippets 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_snippet");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
@ -284,6 +284,33 @@ class ComponentbuilderModelTemplates 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_template");
|
||||
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 a store id based on model configuration state.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user