Improved the compiler getDynamicScript to also use function tabs. Moved the fucntion tab to helper class. Added dynamic title and description insertion options to permissions area.

This commit is contained in:
Llewellyn van der Merwe 2019-09-04 13:52:31 +02:00
parent 9781910dd3
commit 3cbe21f57d
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
29 changed files with 1632 additions and 1456 deletions

View File

@ -146,11 +146,11 @@ 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*: 2nd September, 2019
+ *Last Build*: 4th September, 2019
+ *Version*: 2.10.1
+ *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*: **250924**
+ *Line count*: **251119**
+ *Field count*: **1343**
+ *File count*: **1608**
+ *Folder count*: **253**

View File

@ -146,11 +146,11 @@ 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*: 2nd September, 2019
+ *Last Build*: 4th September, 2019
+ *Version*: 2.10.1
+ *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*: **250924**
+ *Line count*: **251119**
+ *Field count*: **1343**
+ *File count*: **1608**
+ *Folder count*: **253**

View File

@ -93,16 +93,25 @@ class Compiler extends Infusion
$componentXML = str_replace(array('<files folder="site">' . $textToSite . "</files>", '<languages folder="site">' . $textToSiteLang . "</languages>"), array('', ''), $componentXML);
$this->writeFile($xmlPath, $componentXML);
}
// Trigger Event: jcb_ce_onBeforeUpdateFiles
$this->triggerEvent('jcb_ce_onBeforeUpdateFiles', array(&$this->componentContext, $this));
// now update the files
if (!$this->updateFiles())
{
return false;
}
// Trigger Event: jcb_ce_onBeforeGetCustomCode
$this->triggerEvent('jcb_ce_onBeforeGetCustomCode', array(&$this->componentContext, $this));
// now insert into the new files
if ($this->getCustomCode())
{
// Trigger Event: jcb_ce_onBeforeAddCustomCode
$this->triggerEvent('jcb_ce_onBeforeAddCustomCode', array(&$this->componentContext, $this));
$this->addCustomCode();
}
// Trigger Event: jcb_ce_onBeforeSetLangFileData
$this->triggerEvent('jcb_ce_onBeforeSetLangFileData', array(&$this->componentContext, $this));
// set the lang data now
$this->setLangFileData();
// set the language notice if it was set

View File

@ -724,20 +724,6 @@ class Get
*/
public $setTidyWarning = false;
/**
* Tab/spacer bucket (to speed-up the build)
*
* @var array
*/
public $tabSpacerBucket = array();
/**
* Set tab/spacer
*
* @var string
*/
public $tabSpacer = "\t";
/**
* mysql table setting keys
*
@ -894,14 +880,8 @@ class Get
*/
public function _t($nr)
{
// check if we already have the string
if (!isset($this->tabSpacerBucket[$nr]))
{
// get the string
$this->tabSpacerBucket[$nr] = str_repeat($this->tabSpacer, (int) $nr);
}
// return stored string
return $this->tabSpacerBucket[$nr];
// use global method for conformity
return ComponentbuilderHelper::_t($nr);
}
/**

View File

@ -9139,15 +9139,18 @@ class Interpretation extends Fields
$query .= PHP_EOL . $this->_t(1) . " *";
$query .= PHP_EOL . $this->_t(1) . " * @return mixed An array of data items on success, false on failure.";
$query .= PHP_EOL . $this->_t(1) . " */";
$query .= PHP_EOL . $this->_t(1) . "public function getExportData(\$pks)";
$query .= PHP_EOL . $this->_t(1) . "public function getExportData(\$pks, \$user = null)";
$query .= PHP_EOL . $this->_t(1) . "{";
$query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " setup the query";
$query .= PHP_EOL . $this->_t(2) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkArray(\$pks))";
$query .= PHP_EOL . $this->_t(2) . "{";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set a value to know this is exporting method.";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)";
$query .= PHP_EOL . $this->_t(3) . "\$_export = true;";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the user object.";
$query .= PHP_EOL . $this->_t(3) . "\$user = JFactory::getUser();";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the user object if not set.";
$query .= PHP_EOL . $this->_t(3) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkObject(\$user))";
$query .= PHP_EOL . $this->_t(3) . "{";
$query .= PHP_EOL . $this->_t(4) . "\$user = JFactory::getUser();";
$query .= PHP_EOL . $this->_t(3) . "}";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create a new query object.";
$query .= PHP_EOL . $this->_t(3) . "\$db = JFactory::getDBO();";
$query .= PHP_EOL . $this->_t(3) . "\$query = \$db->getQuery(true);";
@ -16103,93 +16106,133 @@ function vdm_dkim() {
$w_NameList = $view['settings']->name;
$w_NameSingle = $view['settings']->name;
}
// set the title based on the name builder
switch ($nameBuilder)
// set title (only if not set already)
if (!isset($permission['title']) || !ComponentbuilderHelper::checkString($permission['title']))
{
case 'edit':
// set edit title
$permission['title'] = $W_NameList . ' Edit';
// set edit description
$permission['description'] = ' Allows the users in this group to edit the ' . $w_NameSingle;
break;
case 'edit___own':
// set edit title
$permission['title'] = $W_NameList . ' Edit Own';
// set edit description
$permission['description'] = ' Allows the users in this group to edit ' . $w_NameList . ' created by them';
break;
case 'edit___access':
// set edit title
$permission['title'] = $W_NameList . ' Edit Access';
// set edit description
$permission['description'] = ' Allows the users in this group to change the access of the ' . $w_NameList;
break;
case 'edit___state':
// set edit title
$permission['title'] = $W_NameList . ' Edit State';
// set edit description
$permission['description'] = ' Allows the users in this group to update the state of the ' . $w_NameSingle;
break;
case 'edit___created_by':
// set edit title
$permission['title'] = $W_NameList . ' Edit Created By';
// set edit description
$permission['description'] = ' Allows the users in this group to update the created by of the ' . $w_NameList;
break;
case 'edit___created':
// set edit title
$permission['title'] = $W_NameList . ' Edit Created Date';
// set edit description
$permission['description'] = ' Allows the users in this group to update the created date of the ' . $w_NameList;
break;
case 'create':
// set edit title
$permission['title'] = $W_NameList . ' Create';
// set edit description
$permission['description'] = ' Allows the users in this group to create ' . $w_NameList;
break;
case 'delete':
// set edit title
$permission['title'] = $W_NameList . ' Delete';
// set edit description
$permission['description'] = ' Allows the users in this group to delete ' . $w_NameList;
break;
case 'access':
// set edit title
$permission['title'] = $W_NameList . ' Access';
// set edit description
$permission['description'] = ' Allows the users in this group to access ' . $w_NameList;
break;
case 'export':
// set edit title
$permission['title'] = $W_NameList . ' Export';
// set edit description
$permission['description'] = ' Allows the users in this group to export ' . $w_NameList;
break;
case 'import':
// set edit title
$permission['title'] = $W_NameList . ' Import';
// set edit description
$permission['description'] = ' Allows the users in this group to import ' . $w_NameList;
break;
case 'version':
// set edit title
$permission['title'] = $W_NameList . ' Edit Version';
// set edit description
$permission['description'] = ' Allows users in this group to edit versions of ' . $w_NameList;
break;
case 'batch':
// set edit title
$permission['title'] = $W_NameList . ' Batch Use';
// set edit description
$permission['description'] = ' Allows users in this group to use batch copy/update method of ' . $w_NameList;
break;
default:
// set edit title
$permission['title'] = $W_NameList . ' ' . ComponentbuilderHelper::safeString($customName, 'W');
// set edit description
$permission['description'] = ' Allows the users in this group to ' . ComponentbuilderHelper::safeString($customName, 'w') . ' of ' . $w_NameSingle;
break;
// set the title based on the name builder
switch ($nameBuilder)
{
case 'edit':
// set edit title
$permission['title'] = $W_NameList . ' Edit';
break;
case 'edit___own':
// set edit title
$permission['title'] = $W_NameList . ' Edit Own';
break;
case 'edit___access':
// set edit title
$permission['title'] = $W_NameList . ' Edit Access';
break;
case 'edit___state':
// set edit title
$permission['title'] = $W_NameList . ' Edit State';
break;
case 'edit___created_by':
// set edit title
$permission['title'] = $W_NameList . ' Edit Created By';
break;
case 'edit___created':
// set edit title
$permission['title'] = $W_NameList . ' Edit Created Date';
break;
case 'create':
// set edit title
$permission['title'] = $W_NameList . ' Create';
break;
case 'delete':
// set edit title
$permission['title'] = $W_NameList . ' Delete';
break;
case 'access':
// set edit title
$permission['title'] = $W_NameList . ' Access';
break;
case 'export':
// set edit title
$permission['title'] = $W_NameList . ' Export';
break;
case 'import':
// set edit title
$permission['title'] = $W_NameList . ' Import';
break;
case 'version':
// set edit title
$permission['title'] = $W_NameList . ' Edit Version';
break;
case 'batch':
// set edit title
$permission['title'] = $W_NameList . ' Batch Use';
break;
default:
// set edit title
$permission['title'] = $W_NameList . ' ' . ComponentbuilderHelper::safeString($customName, 'W');
break;
}
}
// set description (only if not set already)
if (!isset($permission['description']) || !ComponentbuilderHelper::checkString($permission['description']))
{
// set the title based on the name builder
switch ($nameBuilder)
{
case 'edit':
// set edit description
$permission['description'] = ' Allows the users in this group to edit the ' . $w_NameSingle;
break;
case 'edit___own':
// set edit description
$permission['description'] = ' Allows the users in this group to edit ' . $w_NameList . ' created by them';
break;
case 'edit___access':
// set edit description
$permission['description'] = ' Allows the users in this group to change the access of the ' . $w_NameList;
break;
case 'edit___state':
// set edit description
$permission['description'] = ' Allows the users in this group to update the state of the ' . $w_NameSingle;
break;
case 'edit___created_by':
// set edit description
$permission['description'] = ' Allows the users in this group to update the created by of the ' . $w_NameList;
break;
case 'edit___created':
// set edit description
$permission['description'] = ' Allows the users in this group to update the created date of the ' . $w_NameList;
break;
case 'create':
// set edit description
$permission['description'] = ' Allows the users in this group to create ' . $w_NameList;
break;
case 'delete':
// set edit description
$permission['description'] = ' Allows the users in this group to delete ' . $w_NameList;
break;
case 'access':
// set edit description
$permission['description'] = ' Allows the users in this group to access ' . $w_NameList;
break;
case 'export':
// set edit description
$permission['description'] = ' Allows the users in this group to export ' . $w_NameList;
break;
case 'import':
// set edit description
$permission['description'] = ' Allows the users in this group to import ' . $w_NameList;
break;
case 'version':
// set edit description
$permission['description'] = ' Allows users in this group to edit versions of ' . $w_NameList;
break;
case 'batch':
// set edit description
$permission['description'] = ' Allows users in this group to use batch copy/update method of ' . $w_NameList;
break;
default:
// set edit description
$permission['description'] = ' Allows the users in this group to ' . ComponentbuilderHelper::safeString($customName, 'w') . ' of ' . $w_NameSingle;
break;
}
}
// if core is not used update all core strings
$coreCheck = explode('.', $action);

View File

@ -1172,6 +1172,7 @@ class Infusion extends Interpretation
*/
public function setLangFileData()
{
// reset values
$values = array();
$mainLangLoader = array();
// check the admin lang is set

File diff suppressed because it is too large Load Diff

View File

@ -328,15 +328,18 @@ class ComponentbuilderModelAdmin_views extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -255,15 +255,18 @@ class ComponentbuilderModelClass_methods extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -255,15 +255,18 @@ class ComponentbuilderModelClass_properties extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -269,15 +269,18 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -302,15 +302,18 @@ class ComponentbuilderModelCustom_codes extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -252,15 +252,18 @@ class ComponentbuilderModelDynamic_gets extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -367,15 +367,18 @@ class ComponentbuilderModelFields extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -221,15 +221,18 @@ class ComponentbuilderModelFieldtypes extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -273,15 +273,18 @@ class ComponentbuilderModelHelp_documents extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -2137,15 +2137,18 @@ class ComponentbuilderModelJoomla_components extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -270,15 +270,18 @@ class ComponentbuilderModelLanguage_translations extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -308,15 +308,18 @@ class ComponentbuilderModelLanguages extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -241,15 +241,18 @@ class ComponentbuilderModelLayouts extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -187,15 +187,18 @@ class ComponentbuilderModelPlaceholders extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -230,15 +230,18 @@ class ComponentbuilderModelServers extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -273,15 +273,18 @@ class ComponentbuilderModelSite_views extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -329,15 +329,18 @@ class ComponentbuilderModelSnippets extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -241,15 +241,18 @@ class ComponentbuilderModelTemplates extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -185,15 +185,18 @@ class ComponentbuilderModelValidation_rules extends JModelList
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExportData($pks)
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
{
// Set a value to know this is exporting method.
// Set a value to know this is exporting method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
// Get the user object.
$user = JFactory::getUser();
// Get the user object if not set.
if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>2nd September, 2019</creationDate>
<creationDate>4th September, 2019</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>

View File

@ -3938,7 +3938,7 @@ class com_componentbuilderInstallerScript
}
/// Remove Componentbuilder from the action_logs_extensions table
// Remove Componentbuilder from the action_logs_extensions table
$componentbuilder_action_logs_extensions = array( $db->quoteName('extension') . ' = ' . $db->quote('com_componentbuilder') );
// Create a new query object.
$query = $db->getQuery(true);

File diff suppressed because it is too large Load Diff