Improved the export feature to allow bulk custom overide, and dynamic behaviour towards larger sets. Added function name to custom buttons as a class for CSS styling.
This commit is contained in:
@ -342,7 +342,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -360,7 +360,24 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
|
||||
// From the componentbuilder_admin_view table
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -287,7 +287,24 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
|
||||
// From the componentbuilder_class_method table
|
||||
$query->from($db->quoteName('#__componentbuilder_class_method', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -287,7 +287,24 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
|
||||
// From the componentbuilder_class_property table
|
||||
$query->from($db->quoteName('#__componentbuilder_class_property', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -301,7 +301,24 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
|
||||
// From the componentbuilder_custom_admin_view table
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -334,7 +334,24 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
|
||||
// From the componentbuilder_custom_code table
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_code', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -266,7 +266,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -284,7 +284,24 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
|
||||
// From the componentbuilder_dynamic_get table
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -382,7 +382,7 @@ class ComponentbuilderModelFields extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -400,7 +400,24 @@ class ComponentbuilderModelFields extends JModelList
|
||||
|
||||
// From the componentbuilder_field table
|
||||
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ class ComponentbuilderModelFieldtypes extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -253,7 +253,24 @@ class ComponentbuilderModelFieldtypes extends JModelList
|
||||
|
||||
// From the componentbuilder_fieldtype table
|
||||
$query->from($db->quoteName('#__componentbuilder_fieldtype', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -296,7 +296,24 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
|
||||
// From the componentbuilder_help_document table
|
||||
$query->from($db->quoteName('#__componentbuilder_help_document', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
|
||||
// Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
@ -2252,7 +2252,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -2270,7 +2270,24 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
|
||||
// From the componentbuilder_joomla_component table
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -267,7 +267,24 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
|
||||
// From the componentbuilder_language_translation table
|
||||
$query->from($db->quoteName('#__componentbuilder_language_translation', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -340,7 +340,24 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
|
||||
// From the componentbuilder_language table
|
||||
$query->from($db->quoteName('#__componentbuilder_language', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ class ComponentbuilderModelLayouts extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -273,7 +273,24 @@ class ComponentbuilderModelLayouts extends JModelList
|
||||
|
||||
// From the componentbuilder_layout table
|
||||
$query->from($db->quoteName('#__componentbuilder_layout', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ class ComponentbuilderModelPlaceholders extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -219,7 +219,24 @@ class ComponentbuilderModelPlaceholders extends JModelList
|
||||
|
||||
// From the componentbuilder_placeholder table
|
||||
$query->from($db->quoteName('#__componentbuilder_placeholder', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -244,7 +244,7 @@ class ComponentbuilderModelServers extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -262,7 +262,24 @@ class ComponentbuilderModelServers extends JModelList
|
||||
|
||||
// From the componentbuilder_server table
|
||||
$query->from($db->quoteName('#__componentbuilder_server', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -287,7 +287,7 @@ class ComponentbuilderModelSite_views extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -305,7 +305,24 @@ class ComponentbuilderModelSite_views extends JModelList
|
||||
|
||||
// From the componentbuilder_site_view table
|
||||
$query->from($db->quoteName('#__componentbuilder_site_view', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ class ComponentbuilderModelSnippets extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -361,7 +361,24 @@ class ComponentbuilderModelSnippets extends JModelList
|
||||
|
||||
// From the componentbuilder_snippet table
|
||||
$query->from($db->quoteName('#__componentbuilder_snippet', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ class ComponentbuilderModelTemplates extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -273,7 +273,24 @@ class ComponentbuilderModelTemplates extends JModelList
|
||||
|
||||
// From the componentbuilder_template table
|
||||
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -199,7 +199,7 @@ class ComponentbuilderModelValidation_rules extends JModelList
|
||||
public function getExportData($pks, $user = null)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
|
||||
{
|
||||
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
|
||||
$_export = true;
|
||||
@ -217,7 +217,24 @@ class ComponentbuilderModelValidation_rules extends JModelList
|
||||
|
||||
// From the componentbuilder_validation_rule table
|
||||
$query->from($db->quoteName('#__componentbuilder_validation_rule', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// The bulk export path
|
||||
if ('bulk' === $pks)
|
||||
{
|
||||
$query->where('a.id > 0');
|
||||
}
|
||||
// A large array of ID's will not work out well
|
||||
elseif ($pks_size > 500)
|
||||
{
|
||||
// Use lowest ID
|
||||
$query->where('a.id >= ' . (int) min($pks));
|
||||
// Use highest ID
|
||||
$query->where('a.id <= ' . (int) max($pks));
|
||||
}
|
||||
// The normal default path
|
||||
else
|
||||
{
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
{
|
||||
|
Reference in New Issue
Block a user