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) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 2nd September, 2019 + *Last Build*: 4th September, 2019
+ *Version*: 2.10.1 + *Version*: 2.10.1
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **250924** + *Line count*: **251119**
+ *Field count*: **1343** + *Field count*: **1343**
+ *File count*: **1608** + *File count*: **1608**
+ *Folder count*: **253** + *Folder count*: **253**

View File

@ -146,11 +146,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 2nd September, 2019 + *Last Build*: 4th September, 2019
+ *Version*: 2.10.1 + *Version*: 2.10.1
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **250924** + *Line count*: **251119**
+ *Field count*: **1343** + *Field count*: **1343**
+ *File count*: **1608** + *File count*: **1608**
+ *Folder count*: **253** + *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); $componentXML = str_replace(array('<files folder="site">' . $textToSite . "</files>", '<languages folder="site">' . $textToSiteLang . "</languages>"), array('', ''), $componentXML);
$this->writeFile($xmlPath, $componentXML); $this->writeFile($xmlPath, $componentXML);
} }
// Trigger Event: jcb_ce_onBeforeUpdateFiles
$this->triggerEvent('jcb_ce_onBeforeUpdateFiles', array(&$this->componentContext, $this));
// now update the files // now update the files
if (!$this->updateFiles()) if (!$this->updateFiles())
{ {
return false; return false;
} }
// Trigger Event: jcb_ce_onBeforeGetCustomCode
$this->triggerEvent('jcb_ce_onBeforeGetCustomCode', array(&$this->componentContext, $this));
// now insert into the new files // now insert into the new files
if ($this->getCustomCode()) if ($this->getCustomCode())
{ {
// Trigger Event: jcb_ce_onBeforeAddCustomCode
$this->triggerEvent('jcb_ce_onBeforeAddCustomCode', array(&$this->componentContext, $this));
$this->addCustomCode(); $this->addCustomCode();
} }
// Trigger Event: jcb_ce_onBeforeSetLangFileData
$this->triggerEvent('jcb_ce_onBeforeSetLangFileData', array(&$this->componentContext, $this));
// set the lang data now // set the lang data now
$this->setLangFileData(); $this->setLangFileData();
// set the language notice if it was set // set the language notice if it was set

View File

@ -724,20 +724,6 @@ class Get
*/ */
public $setTidyWarning = false; 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 * mysql table setting keys
* *
@ -894,14 +880,8 @@ class Get
*/ */
public function _t($nr) public function _t($nr)
{ {
// check if we already have the string // use global method for conformity
if (!isset($this->tabSpacerBucket[$nr])) return ComponentbuilderHelper::_t($nr);
{
// get the string
$this->tabSpacerBucket[$nr] = str_repeat($this->tabSpacer, (int) $nr);
}
// return stored string
return $this->tabSpacerBucket[$nr];
} }
/** /**

View File

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

View File

@ -1172,6 +1172,7 @@ class Infusion extends Interpretation
*/ */
public function setLangFileData() public function setLangFileData()
{ {
// reset values
$values = array(); $values = array();
$mainLangLoader = array(); $mainLangLoader = array();
// check the admin lang is set // 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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $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. * @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 // setup the query
if (ComponentbuilderHelper::checkArray($pks)) 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; $_export = true;
// Get the user object. // Get the user object if not set.
$user = JFactory::getUser(); if (ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
// Create a new query object. // Create a new query object.
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>2nd September, 2019</creationDate> <creationDate>4th September, 2019</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <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') ); $componentbuilder_action_logs_extensions = array( $db->quoteName('extension') . ' = ' . $db->quote('com_componentbuilder') );
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);

File diff suppressed because it is too large Load Diff