From e86ab88f5cdcf8cc0c247265edf21044d12d8598 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 25 Jun 2020 21:22:30 +0200 Subject: [PATCH] Fixed gh-571 compiler path errors. --- README.md | 4 +- admin/README.txt | 4 +- admin/compiler/joomla_3/Helper.php | 1 + admin/compiler/joomla_3/Helper_site.php | 1 + admin/compiler/joomla_3/edit_site.php | 5 +- admin/compiler/joomla_3/layout_admin.php | 20 +++++++ admin/compiler/joomla_3/settings.json | 5 ++ admin/helpers/compiler/a_Get.php | 43 ++++++++++++++- admin/helpers/compiler/b_Structure.php | 46 +++++++++++----- admin/helpers/compiler/e_Interpretation.php | 53 +++++++++++++++---- admin/helpers/compiler/f_Infusion.php | 4 ++ admin/helpers/componentbuilder.php | 13 +++++ admin/models/admin_view.php | 13 +++-- admin/models/class_method.php | 13 +++-- admin/models/class_property.php | 13 +++-- admin/models/custom_admin_view.php | 13 +++-- admin/models/dynamic_get.php | 13 +++-- admin/models/field.php | 13 +++-- admin/models/fieldtype.php | 13 +++-- admin/models/forms/dynamic_get.xml | 4 +- admin/models/import_language_translations.php | 2 +- admin/models/joomla_component.php | 13 +++-- admin/models/joomla_module.php | 13 +++-- admin/models/joomla_plugin.php | 13 +++-- admin/models/library.php | 13 +++-- admin/models/site_view.php | 13 +++-- admin/models/snippet.php | 13 +++-- admin/sql/install.mysql.utf8.sql | 11 ++-- admin/views/admin_custom_tabs/tmpl/edit.php | 2 +- admin/views/admin_fields/tmpl/edit.php | 2 +- .../admin_fields_conditions/tmpl/edit.php | 2 +- .../admin_fields_relations/tmpl/edit.php | 2 +- admin/views/admin_view/tmpl/edit.php | 2 +- admin/views/class_extends/tmpl/edit.php | 2 +- admin/views/class_method/tmpl/edit.php | 2 +- admin/views/class_property/tmpl/edit.php | 2 +- .../views/component_admin_views/tmpl/edit.php | 2 +- admin/views/component_config/tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- admin/views/component_dashboard/tmpl/edit.php | 2 +- .../component_files_folders/tmpl/edit.php | 2 +- admin/views/component_modules/tmpl/edit.php | 2 +- .../component_mysql_tweaks/tmpl/edit.php | 2 +- .../component_placeholders/tmpl/edit.php | 2 +- admin/views/component_plugins/tmpl/edit.php | 2 +- .../views/component_site_views/tmpl/edit.php | 2 +- admin/views/component_updates/tmpl/edit.php | 2 +- admin/views/custom_admin_view/tmpl/edit.php | 2 +- admin/views/custom_code/tmpl/edit.php | 2 +- admin/views/dynamic_get/tmpl/edit.php | 2 +- admin/views/field/tmpl/edit.php | 2 +- admin/views/fieldtype/tmpl/edit.php | 2 +- admin/views/help_document/tmpl/edit.php | 2 +- admin/views/joomla_component/tmpl/edit.php | 2 +- admin/views/joomla_module/tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- .../views/joomla_module_updates/tmpl/edit.php | 2 +- admin/views/joomla_plugin/tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- admin/views/joomla_plugin_group/tmpl/edit.php | 2 +- .../views/joomla_plugin_updates/tmpl/edit.php | 2 +- admin/views/language/tmpl/edit.php | 2 +- .../views/language_translation/tmpl/edit.php | 2 +- admin/views/layout/tmpl/edit.php | 2 +- admin/views/library/tmpl/edit.php | 2 +- admin/views/library_config/tmpl/edit.php | 2 +- .../library_files_folders_urls/tmpl/edit.php | 2 +- admin/views/placeholder/tmpl/edit.php | 2 +- admin/views/server/tmpl/edit.php | 2 +- admin/views/site_view/tmpl/edit.php | 2 +- admin/views/snippet/tmpl/edit.php | 2 +- admin/views/snippet_type/tmpl/edit.php | 2 +- admin/views/template/tmpl/edit.php | 2 +- admin/views/validation_rule/tmpl/edit.php | 2 +- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 13 +++++ 77 files changed, 369 insertions(+), 125 deletions(-) create mode 100644 admin/compiler/joomla_3/layout_admin.php diff --git a/README.md b/README.md index f42ef9898..8ab0e94ec 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,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*: 1st June, 2020 ++ *Last Build*: 24th June, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282524** ++ *Line count*: **282642** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index f42ef9898..8ab0e94ec 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,11 +144,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*: 1st June, 2020 ++ *Last Build*: 24th June, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282524** ++ *Line count*: **282642** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index a33b227ea..5d0f8e464 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -18,6 +18,7 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper;###ADMIN_HELPER_CLASS_HEADER### diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index 4faaf7a16..c3e36bd54 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -18,6 +18,7 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper;###SITE_HELPER_CLASS_HEADER### diff --git a/admin/compiler/joomla_3/edit_site.php b/admin/compiler/joomla_3/edit_site.php index f9362c09c..17f2e9277 100644 --- a/admin/compiler/joomla_3/edit_site.php +++ b/admin/compiler/joomla_3/edit_site.php @@ -24,9 +24,10 @@ JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); JHtml::_('behavior.tabstate'); JHtml::_('behavior.calendar'); -$componentParams = $this->params; // will be removed just use $this->params instead ?> +
toolbar->render(); ?>
###EDITBODY### -
###EDITBODYSCRIPT### + +
###EDITBODYSCRIPT### diff --git a/admin/compiler/joomla_3/layout_admin.php b/admin/compiler/joomla_3/layout_admin.php new file mode 100644 index 000000000..b1c513391 --- /dev/null +++ b/admin/compiler/joomla_3/layout_admin.php @@ -0,0 +1,20 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); +?> +###BOM### + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access');###ADMIN_LAYOUT_CODE### + +?>###ADMIN_LAYOUT_BODY### diff --git a/admin/compiler/joomla_3/settings.json b/admin/compiler/joomla_3/settings.json index a012e154e..748bc7e17 100644 --- a/admin/compiler/joomla_3/settings.json +++ b/admin/compiler/joomla_3/settings.json @@ -376,6 +376,11 @@ "rename": "JFormRule", "type": "rule" }, + "layout_admin.php": { + "path": "c0mp0n3nt/admin/layouts", + "rename": "layout_admin", + "type": "layout" + }, "layoutitems.php": { "path": "c0mp0n3nt/admin/layouts/VIEW", "rename": "layoutitems", diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 7b0690610..3f3ffa46d 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -1413,6 +1413,8 @@ class Get ? json_decode($component->addadmin_views, true) : null; if (ComponentbuilderHelper::checkArray($component->addadmin_views)) { + $this->lang = 'admin'; + $this->target = 'admin'; // sort the views according to order usort( $component->addadmin_views, function ($a, $b) { @@ -2923,6 +2925,10 @@ class Get false, $guiMapper ); + + // check if we have template or layouts to load + $this->setTemplateAndLayoutData($view->{$scripter}, $name_single); + unset($view->{$scripter}); } } @@ -2953,6 +2959,9 @@ class Get ), $guiMapper ); + + // check if we have template or layouts to load + $this->setTemplateAndLayoutData($view->{$button_code_field}, $name_single); } } // set the button array @@ -3045,6 +3054,7 @@ class Get $name_single, $guiMapper ); + if ($addAjaxSite) { $this->setCustomScriptBuilder( @@ -4988,6 +4998,8 @@ class Get { $script = $this->setGuiCodePlaceholder($script, $config); } + // add base64 locking option of a string + $script = $this->setBase64LOCK($script); // load the script if ($first && $second && $third) { @@ -9851,7 +9863,7 @@ class Get */ protected function customCodeFactory(&$paths, &$today) { - // we must first store the current woking directory + // we must first store the current working directory $joomla = getcwd(); $counter = array(1 => 0, 2 => 0); // file types to get @@ -10337,6 +10349,35 @@ class Get } } + /** + * Lock a string with bsae64 (basic) + * + * @param string $string The code string + * + * @return string + * + */ + protected function setBase64LOCK($script) + { + if (strpos($script, 'LOCKBASE64((((') !== false) + { + // get the strings + $values = ComponentbuilderHelper::getAllBetween($script, 'LOCKBASE64((((', '))))'); + $locker = array(); + // convert them + foreach($values as $value) + { + $locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," . + PHP_EOL . $this->_t(2) . "'" . + wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) . + "'));"; + } + // update the script + return $this->setPlaceholders($script, $locker); + } + return $script; + } + /** * Set the JCB GUI code placeholder * diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 735ce1e20..caea7cafb 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -2556,7 +2556,8 @@ class Structure extends Get public function moveFieldsRules($field, $path) { // check if we have a subform or repeatable field - if ($field['type_name'] === 'subform' || $field['type_name'] === 'repeatable') + if ($field['type_name'] === 'subform' + || $field['type_name'] === 'repeatable') { // since we could have a custom field or rule inside $this->moveMultiFieldsRules($field, $path); @@ -2624,7 +2625,7 @@ class Structure extends Get * move the fields and Rules of multi fields * * @param array $multi_field The field data - * @param string $path The path to move to + * @param string $path The path to move to * * @return void * @@ -2632,13 +2633,19 @@ class Structure extends Get protected function moveMultiFieldsRules($multi_field, $path) { // get the fields ids - $ids = array_map( 'trim', explode(',', ComponentbuilderHelper::getBetween($multi_field['settings']->xml, 'fields="', '"'))); + $ids = array_map( + 'trim', explode( + ',', ComponentbuilderHelper::getBetween( + $multi_field['settings']->xml, 'fields="', '"' + ) + ) + ); if (ComponentbuilderHelper::checkArray($ids)) { foreach ($ids as $id) { // setup the field - $field = array(); + $field = array(); $field['field'] = $id; $this->setFieldDetails($field); // move field and rules if needed @@ -2835,10 +2842,24 @@ class Structure extends Get { $path = $details->path; } - $zipPath = str_replace('c0mp0n3nt/', '', $path); - $path = str_replace( - 'c0mp0n3nt/', $this->componentPath . '/', $path - ); + // make sure we have component to replace + if (strpos($path, 'c0mp0n3nt') !== false) + { + $zipPath = str_replace('c0mp0n3nt/', '', $path); + $path = str_replace( + 'c0mp0n3nt/', $this->componentPath . '/', $path + ); + } + else + { + $this->app->enqueueMessage( + JText::sprintf( + '

c0mp0n3nt issue found

The path (%s) could not be used.

', + $path + ), 'Error' + ); + continue; + } // setup the folder if (!JFolder::exists($path)) @@ -2878,7 +2899,7 @@ class Structure extends Get // move the file to its place JFile::copy( $this->templatePath . '/' . $item, - $path . '/' . $new, '', true + $path . '/' . $new ); // count the file created $this->fileCount++; @@ -2934,9 +2955,10 @@ class Structure extends Get 'rename' => 1); $this->componentData->folders[] = $importView; // move the phpspreadsheet Folder (TODO we must move this to a library package) - $PHPExcel = array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor', - 'path' => '/libraries/phpspreadsheet/', - 'rename' => 0); + $PHPExcel + = array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor', + 'path' => '/libraries/phpspreadsheet/', + 'rename' => 0); $this->componentData->folders[] = $PHPExcel; } if (2 == $this->uikit || 1 == $this->uikit) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 1cbc5af5a..14f012682 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -5260,7 +5260,10 @@ class Interpretation extends Fields . " this is where you want to load your module position"; $addModule[] = $this->_t(3) . "\$modules = JModuleHelper::getModules(\$position);"; - $addModule[] = $this->_t(3) . "if (\$modules)"; + $addModule[] = $this->_t(3) . "if (" + . $this->fileContentStatic[$this->hhh . 'Component' + . $this->hhh] + . "Helper::checkArray(\$modules, true))"; $addModule[] = $this->_t(3) . "{"; $addModule[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " set the place holder"; @@ -12622,10 +12625,11 @@ class Interpretation extends Fields if ($items_one || $items_two) { // check if the item has permissions. - $publishingPer = array(); - $allToBeChekced = array('core.delete', 'core.edit.created_by', - 'core.edit.state', 'core.edit.created'); - foreach ($allToBeChekced as $core_permission) + $publishingPerOR = array(); + $allToBeChekcedOR = array('core.edit.created_by', + 'core.edit.created', + 'core.edit.state'); + foreach ($allToBeChekcedOR as $core_permission) { if ($coreLoad && isset($core[$core_permission]) && isset($this->permissionBuilder['global'][$core[$core_permission]]) @@ -12638,13 +12642,38 @@ class Interpretation extends Fields )) { // set permissions. - $publishingPer[] = "\$this->canDo->get('" + $publishingPerOR[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; } else { // set permissions. - $publishingPer[] = "\$this->canDo->get('" . $core_permission + $publishingPerOR[] = "\$this->canDo->get('" . $core_permission + . "')"; + } + } + $publishingPerAND = array(); + $allToBeChekcedAND = array('core.delete', 'core.edit.state'); + foreach ($allToBeChekcedAND as $core_permission) + { + if ($coreLoad && isset($core[$core_permission]) + && isset($this->permissionBuilder['global'][$core[$core_permission]]) + && ComponentbuilderHelper::checkArray( + $this->permissionBuilder['global'][$core[$core_permission]] + ) + && in_array( + $view_name_single, + $this->permissionBuilder['global'][$core[$core_permission]] + )) + { + // set permissions. + $publishingPerAND[] = "\$this->canDo->get('" + . $core[$core_permission] . "')"; + } + else + { + // set permissions. + $publishingPerAND[] = "\$this->canDo->get('" . $core_permission . "')"; } } @@ -12655,8 +12684,11 @@ class Interpretation extends Fields { $tabs .= $_customTabHTML; } + // add the AND values to OR + $publishingPerOR[] = '(' . implode(' && ', $publishingPerAND) . ')'; + // now build the complete showhide behaviour for the publishing area $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; // set the default publishing tab $tabs .= PHP_EOL . $this->_t(1) @@ -20821,7 +20853,7 @@ class Interpretation extends Fields // move the image to its place JFile::copy( JPATH_SITE . '/' . $path, - $imagePath . '/vdm-component.' . $type, '', true + $imagePath . '/vdm-component.' . $type ); // now set the type to global for re-use $this->componentImageType = $type; @@ -21060,8 +21092,7 @@ class Interpretation extends Fields } // move the image to its place JFile::copy( - JPATH_SITE . '/' . $path, $imagePath . '/' . $imageName, - '', true + JPATH_SITE . '/' . $path, $imagePath . '/' . $imageName ); } } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 6e2e3ca9d..f0f9689f4 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1077,6 +1077,9 @@ class Infusion extends Interpretation ); } + // setup the layouts + $this->setCustomViewLayouts(); + // ADMIN_HELPER_CLASS_HEADER $this->fileContentStatic[$this->hhh . 'ADMIN_HELPER_CLASS_HEADER' . $this->hhh] @@ -1760,6 +1763,7 @@ class Infusion extends Interpretation &$this->placeholders, &$this->hhh) ); } + // setup the layouts $this->setCustomViewLayouts(); } diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 433fc969a..7656d19ca 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -13,6 +13,7 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; @@ -5787,6 +5788,18 @@ abstract class ComponentbuilderHelper return date('Y' . $spacer . 'm' . $spacer . 'd', $date); } + /** + * set the date as 03/05/2004 + */ + public static function setDayMonthYear($date, $spacer = '/') + { + if (!self::isValidTimeStamp($date)) + { + $date = strtotime($date); + } + return date('d' . $spacer . 'm' . $spacer . 'Y', $date); + } + /** * Check if string is a valid time stamp */ diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 0f469f420..abddb2482 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -800,8 +800,8 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1491,8 +1491,15 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "admin_view", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('admin_view', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "admin_view", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/class_method.php b/admin/models/class_method.php index 004874715..0ec5d128d 100644 --- a/admin/models/class_method.php +++ b/admin/models/class_method.php @@ -342,8 +342,8 @@ class ComponentbuilderModelClass_method extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -972,8 +972,15 @@ class ComponentbuilderModelClass_method extends JModelAdmin $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "class_method", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('class_method', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "class_method", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/class_property.php b/admin/models/class_property.php index 6a6af7baf..a79d84a9b 100644 --- a/admin/models/class_property.php +++ b/admin/models/class_property.php @@ -333,8 +333,8 @@ class ComponentbuilderModelClass_property extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -963,8 +963,15 @@ class ComponentbuilderModelClass_property extends JModelAdmin $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "class_property", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('class_property', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "class_property", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index a21f8c5c7..91af2d657 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -506,8 +506,8 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1125,8 +1125,15 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "custom_admin_view", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('custom_admin_view', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "custom_admin_view", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index d897a4af4..a5589053e 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -520,8 +520,8 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1148,8 +1148,15 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "dynamic_get", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('dynamic_get', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "dynamic_get", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/field.php b/admin/models/field.php index 5cc2eafb8..b0ca2e38d 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -419,8 +419,8 @@ class ComponentbuilderModelField extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1144,8 +1144,15 @@ class ComponentbuilderModelField extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "field", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('field', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "field", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index bc916c4f3..1693a7b6d 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -544,8 +544,8 @@ class ComponentbuilderModelFieldtype extends JModelAdmin } } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1197,8 +1197,15 @@ class ComponentbuilderModelFieldtype extends JModelAdmin // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "fieldtype", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('fieldtype', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "fieldtype", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index 19fc6f35b..21d67915f 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -227,7 +227,7 @@ type="subform" name="join_db_table" label="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_DB_TABLE_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_DB_TABLE_DESCRIPTION" icon="list"> @@ -1202,7 +1202,7 @@ type="subform" name="join_view_table" label="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_VIEW_TABLE_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_VIEW_TABLE_DESCRIPTION" icon="list"> diff --git a/admin/models/import_language_translations.php b/admin/models/import_language_translations.php index a98a7e9e5..9f36e3076 100644 --- a/admin/models/import_language_translations.php +++ b/admin/models/import_language_translations.php @@ -424,7 +424,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy $jinput = JFactory::getApplication()->input; foreach($target_headers as $header) { - $data['target_headers'][$header] = $jinput->getString($header, null); + $data['target_headers'][$header] = $jinput->getString(strtolower($header), null); } // set the data if(isset($package['dir'])) diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index d4063eb70..bdcc71305 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -694,8 +694,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1385,8 +1385,15 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "joomla_component", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('joomla_component', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "joomla_component", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/joomla_module.php b/admin/models/joomla_module.php index 313d937bd..714c8f9a8 100644 --- a/admin/models/joomla_module.php +++ b/admin/models/joomla_module.php @@ -514,8 +514,8 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1199,8 +1199,15 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "joomla_module", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('joomla_module', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "joomla_module", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 4fac186d9..64ca2553e 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -479,8 +479,8 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1162,8 +1162,15 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "joomla_plugin", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('joomla_plugin', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "joomla_plugin", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/library.php b/admin/models/library.php index 7d3ce5578..e5f26141b 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -358,8 +358,8 @@ class ComponentbuilderModelLibrary extends JModelAdmin } } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1048,8 +1048,15 @@ class ComponentbuilderModelLibrary extends JModelAdmin // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "library", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('library', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "library", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/site_view.php b/admin/models/site_view.php index a826d76dd..823a0a3dc 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -527,8 +527,8 @@ class ComponentbuilderModelSite_view extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1146,8 +1146,15 @@ class ComponentbuilderModelSite_view extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "site_view", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('site_view', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "site_view", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/snippet.php b/admin/models/snippet.php index 4439466cb..56602624b 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -243,8 +243,8 @@ class ComponentbuilderModelSnippet extends JModelAdmin } } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -852,8 +852,15 @@ class ComponentbuilderModelSnippet extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "snippet", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('snippet', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "snippet", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 546d2bc3d..737375ae9 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1904,7 +1904,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKy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byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.2', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'HFrCeQ/dZlNywC+BnkD7+Jznb1AoSMFkvlZvLrWJnP8=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgP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CBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-06-01 22:30:51', '', 3, 'LqVjNz4RpFQus30hSwGAxD6C55z/W+xG/qO+0Ea2QUA=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXS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MjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.3', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'HFrCeQ/dZlNywC+BnkD7+Jznb1AoSMFkvlZvLrWJnP8=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSR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z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-06-24 22:43:55', '', 3, 'LqVjNz4RpFQus30hSwGAxD6C55z/W+xG/qO+0Ea2QUA=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); -- -- Dumping data for table `#__componentbuilder_admin_view` @@ -2116,9 +2116,9 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, (23, '', '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Alias', 'NOT NULL', '', 24, '\"\"', 1, '2015-04-09 13:46:04', '2016-05-05 22:30:18', 2, '', 216, '335866ce-b81b-4329-901d-c20254135c9c'), (84, '', '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Description (full width)', 'NOT NULL', '', 25, '\"\"', 1, '2015-03-19 18:20:49', '2016-10-20 17:01:21', 4, '', 265, '749a9917-90c3-49c4-9e72-aa33b0683a87'), (100, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Email (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-05-05 23:44:32', '2016-02-07 22:43:18', 4, '', 285, '10c1eccb-b3c3-4325-a056-45a72d116fd8'), -(158, '', '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Image', 'NOT NULL', '', 12, '\"\"', 1, '2015-04-29 14:00:56', '2015-08-25 21:15:22', 1, '', 45, '0d6970af-b361-4f65-84f6-0eb0c5f09bad'), +(158, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Image', 'NOT NULL', '', 12, '\"\"', 1, '2015-04-29 14:00:56', '2020-06-07 02:17:46', 2, '', 45, '0d6970af-b361-4f65-84f6-0eb0c5f09bad'), (196, '', '', '', '', '', '', '', '', '', 64, '', 'VARCHAR', '', '', '', 'Mobile Phone', 'NOT NULL', '', 23, '\"\"', 1, '2015-04-07 22:12:58', '2016-03-28 14:00:02', 2, '', 7, '65933a19-243a-48b2-aae9-34e2da710051'), -(199, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2017-10-25 20:26:02', 8, '', 4, '5d3d34dd-4876-4c6a-86ab-b4e162f22c08'), +(199, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2020-06-01 23:44:08', 9, '', 4, '5d3d34dd-4876-4c6a-86ab-b4e162f22c08'), (203, '', '', '', '', '', '', '', '', '', 1, '', 'INT', '', '', '', 'Not Required', 'NOT NULL', '', 9, '\"\"', 1, '2015-05-08 16:19:16', '2020-02-27 20:17:33', 13, '', 19, 'da5e6901-6958-40e5-a4f5-6822d6fe57ac'), (280, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Website', 'NOT NULL', '', 27, '\"\"', 1, '2015-04-08 00:36:16', '2018-07-08 00:11:05', 2, '', 105, '6c3a6983-d1bf-4e5e-9e99-deea00b0cefd'), (682, '', '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Add More', 'NOT NULL', '', 17, '\"\"', 1, '2015-08-05 01:18:20', '2018-03-30 09:30:45', 4, '', 196, 'a66389aa-2323-4f44-8c23-ff44969639be'), @@ -2312,7 +2312,7 @@ INSERT INTO `#__componentbuilder_component_custom_admin_views` (`id`, `addcustom -- INSERT INTO `#__componentbuilder_component_updates` (`id`, `joomla_component`, `version_update`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES -(27, 25, '{\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\r\\n\\r\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update2\":{\"version\":\"2.0.2\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/master.zip\"}}', 1, '2017-10-28 03:56:26', '2020-05-30 23:56:04', 7, '', ''); +(27, 25, '{\"version_update0\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\r\\n\\r\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update1\":{\"version\":\"2.0.2\",\"mysql\":\"ALTER TABLE `#__demo_look` CHANGE `image` `image` VARCHAR(255) NOT NULL DEFAULT \'\';\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/master.zip\"},\"version_update2\":{\"version\":\"2.0.3\",\"mysql\":\"\",\"url\":\"http:\\/\\/domain.com\\/demo.zip\"}}', 1, '2017-10-28 03:56:26', '2020-06-24 22:43:55', 8, '', ''); -- -- Dumping data for table `#__componentbuilder_component_mysql_tweaks` @@ -2414,7 +2414,8 @@ INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, (3, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/js\\/uikit.min.js\",\"type\":\"2\"},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/js\\/uikit-icons.min.js\",\"type\":\"2\"},\"addurls4\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/css\\/uikit.min.css\",\"type\":\"2\"}}', 3, '', 1, '2017-11-25 21:47:40', '2018-09-19 14:22:09', 10, '', 3), (4, '{}', '{\"addfolders0\":{\"folder\":\"file_icon_vectors\",\"path\":\"\\/media\\/vector\",\"rename\":\"1\"}}', '{}', 7, '', 1, '2019-10-03 09:24:30', '2019-10-03 09:25:39', 2, '', 4), (5, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/css\\/grapes.min.css\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/grapes.min.js\",\"type\":2}}', 8, '', 1, '2020-02-10 21:34:33', '2020-02-18 21:12:35', 5, '', 5), -(6, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.css\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.js\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/static.filestackapi.com\\/v3\\/filestack-0.1.10.js\",\"type\":2}}', 9, '', 1, '2020-02-18 21:13:16', '2020-02-18 21:14:11', 2, '', 5); +(6, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.css\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.js\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/static.filestackapi.com\\/v3\\/filestack-0.1.10.js\",\"type\":2}}', 9, '', 1, '2020-02-18 21:13:16', '2020-02-18 21:14:11', 2, '', 5), +(7, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdn.jsdelivr.net\\/npm\\/vue\",\"type\":3}}', 10, '', 1, '2020-06-05 13:11:54', '0000-00-00 00:00:00', 1, '', 6); CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( diff --git a/admin/views/admin_custom_tabs/tmpl/edit.php b/admin/views/admin_custom_tabs/tmpl/edit.php index 9203d773f..eb213b4fc 100644 --- a/admin/views/admin_custom_tabs/tmpl/edit.php +++ b/admin/views/admin_custom_tabs/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_custom_tabsTab'; ?> - canDo->get('admin_custom_tabs.delete') || $this->canDo->get('admin_custom_tabs.edit.created_by') || $this->canDo->get('admin_custom_tabs.edit.state') || $this->canDo->get('admin_custom_tabs.edit.created')) : ?> + canDo->get('admin_custom_tabs.edit.created_by') || $this->canDo->get('admin_custom_tabs.edit.created') || $this->canDo->get('admin_custom_tabs.edit.state') || ($this->canDo->get('admin_custom_tabs.delete') && $this->canDo->get('admin_custom_tabs.edit.state'))) : ?>
diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index f08ccbca8..24949aa61 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_fieldsTab'; ?> - canDo->get('admin_fields.delete') || $this->canDo->get('admin_fields.edit.created_by') || $this->canDo->get('admin_fields.edit.state') || $this->canDo->get('admin_fields.edit.created')) : ?> + canDo->get('admin_fields.edit.created_by') || $this->canDo->get('admin_fields.edit.created') || $this->canDo->get('admin_fields.edit.state') || ($this->canDo->get('admin_fields.delete') && $this->canDo->get('admin_fields.edit.state'))) : ?>
diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index 459616b31..1ef755774 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_fields_conditionsTab'; ?> - canDo->get('admin_fields_conditions.delete') || $this->canDo->get('admin_fields_conditions.edit.created_by') || $this->canDo->get('admin_fields_conditions.edit.state') || $this->canDo->get('admin_fields_conditions.edit.created')) : ?> + canDo->get('admin_fields_conditions.edit.created_by') || $this->canDo->get('admin_fields_conditions.edit.created') || $this->canDo->get('admin_fields_conditions.edit.state') || ($this->canDo->get('admin_fields_conditions.delete') && $this->canDo->get('admin_fields_conditions.edit.state'))) : ?>
diff --git a/admin/views/admin_fields_relations/tmpl/edit.php b/admin/views/admin_fields_relations/tmpl/edit.php index 22cb39c09..9cdee6ac0 100644 --- a/admin/views/admin_fields_relations/tmpl/edit.php +++ b/admin/views/admin_fields_relations/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_fields_relationsTab'; ?> - canDo->get('admin_fields_relations.delete') || $this->canDo->get('admin_fields_relations.edit.created_by') || $this->canDo->get('admin_fields_relations.edit.state') || $this->canDo->get('admin_fields_relations.edit.created')) : ?> + canDo->get('admin_fields_relations.edit.created_by') || $this->canDo->get('admin_fields_relations.edit.created') || $this->canDo->get('admin_fields_relations.edit.state') || ($this->canDo->get('admin_fields_relations.delete') && $this->canDo->get('admin_fields_relations.edit.state'))) : ?>
diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index b9ff6d98b..da0706cbf 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -161,7 +161,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_viewTab'; ?> - canDo->get('admin_view.delete') || $this->canDo->get('admin_view.edit.created_by') || $this->canDo->get('admin_view.edit.state') || $this->canDo->get('admin_view.edit.created')) : ?> + canDo->get('admin_view.edit.created_by') || $this->canDo->get('admin_view.edit.created') || $this->canDo->get('admin_view.edit.state') || ($this->canDo->get('admin_view.delete') && $this->canDo->get('admin_view.edit.state'))) : ?>
diff --git a/admin/views/class_extends/tmpl/edit.php b/admin/views/class_extends/tmpl/edit.php index f387ca558..8bbebc8a1 100644 --- a/admin/views/class_extends/tmpl/edit.php +++ b/admin/views/class_extends/tmpl/edit.php @@ -68,7 +68,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'class_extendsTab'; ?> - canDo->get('class_extends.delete') || $this->canDo->get('class_extends.edit.created_by') || $this->canDo->get('class_extends.edit.state') || $this->canDo->get('class_extends.edit.created')) : ?> + canDo->get('class_extends.edit.created_by') || $this->canDo->get('class_extends.edit.created') || $this->canDo->get('class_extends.edit.state') || ($this->canDo->get('class_extends.delete') && $this->canDo->get('class_extends.edit.state'))) : ?>
diff --git a/admin/views/class_method/tmpl/edit.php b/admin/views/class_method/tmpl/edit.php index 48cd43e95..05a1ed5c9 100644 --- a/admin/views/class_method/tmpl/edit.php +++ b/admin/views/class_method/tmpl/edit.php @@ -68,7 +68,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'class_methodTab'; ?> - canDo->get('class_method.delete') || $this->canDo->get('class_method.edit.created_by') || $this->canDo->get('class_method.edit.state') || $this->canDo->get('class_method.edit.created')) : ?> + canDo->get('class_method.edit.created_by') || $this->canDo->get('class_method.edit.created') || $this->canDo->get('class_method.edit.state') || ($this->canDo->get('class_method.delete') && $this->canDo->get('class_method.edit.state'))) : ?>
diff --git a/admin/views/class_property/tmpl/edit.php b/admin/views/class_property/tmpl/edit.php index f85a11225..c371b7f3d 100644 --- a/admin/views/class_property/tmpl/edit.php +++ b/admin/views/class_property/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'class_propertyTab'; ?> - canDo->get('class_property.delete') || $this->canDo->get('class_property.edit.created_by') || $this->canDo->get('class_property.edit.state') || $this->canDo->get('class_property.edit.created')) : ?> + canDo->get('class_property.edit.created_by') || $this->canDo->get('class_property.edit.created') || $this->canDo->get('class_property.edit.state') || ($this->canDo->get('class_property.delete') && $this->canDo->get('class_property.edit.state'))) : ?>
diff --git a/admin/views/component_admin_views/tmpl/edit.php b/admin/views/component_admin_views/tmpl/edit.php index b1164daa1..fcf93e100 100644 --- a/admin/views/component_admin_views/tmpl/edit.php +++ b/admin/views/component_admin_views/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_admin_viewsTab'; ?> - canDo->get('component_admin_views.delete') || $this->canDo->get('component_admin_views.edit.created_by') || $this->canDo->get('component_admin_views.edit.state') || $this->canDo->get('component_admin_views.edit.created')) : ?> + canDo->get('component_admin_views.edit.created_by') || $this->canDo->get('component_admin_views.edit.created') || $this->canDo->get('component_admin_views.edit.state') || ($this->canDo->get('component_admin_views.delete') && $this->canDo->get('component_admin_views.edit.state'))) : ?>
diff --git a/admin/views/component_config/tmpl/edit.php b/admin/views/component_config/tmpl/edit.php index 149c726fa..756745e9c 100644 --- a/admin/views/component_config/tmpl/edit.php +++ b/admin/views/component_config/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_configTab'; ?> - canDo->get('component_config.delete') || $this->canDo->get('component_config.edit.created_by') || $this->canDo->get('component_config.edit.state') || $this->canDo->get('component_config.edit.created')) : ?> + canDo->get('component_config.edit.created_by') || $this->canDo->get('component_config.edit.created') || $this->canDo->get('component_config.edit.state') || ($this->canDo->get('component_config.delete') && $this->canDo->get('component_config.edit.state'))) : ?>
diff --git a/admin/views/component_custom_admin_menus/tmpl/edit.php b/admin/views/component_custom_admin_menus/tmpl/edit.php index 9b15e7d9d..7edc56830 100644 --- a/admin/views/component_custom_admin_menus/tmpl/edit.php +++ b/admin/views/component_custom_admin_menus/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_custom_admin_menusTab'; ?> - canDo->get('component_custom_admin_menus.delete') || $this->canDo->get('component_custom_admin_menus.edit.created_by') || $this->canDo->get('component_custom_admin_menus.edit.state') || $this->canDo->get('component_custom_admin_menus.edit.created')) : ?> + canDo->get('component_custom_admin_menus.edit.created_by') || $this->canDo->get('component_custom_admin_menus.edit.created') || $this->canDo->get('component_custom_admin_menus.edit.state') || ($this->canDo->get('component_custom_admin_menus.delete') && $this->canDo->get('component_custom_admin_menus.edit.state'))) : ?>
diff --git a/admin/views/component_custom_admin_views/tmpl/edit.php b/admin/views/component_custom_admin_views/tmpl/edit.php index d773ec910..6e7aab4bc 100644 --- a/admin/views/component_custom_admin_views/tmpl/edit.php +++ b/admin/views/component_custom_admin_views/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_custom_admin_viewsTab'; ?> - canDo->get('component_custom_admin_views.delete') || $this->canDo->get('component_custom_admin_views.edit.created_by') || $this->canDo->get('component_custom_admin_views.edit.state') || $this->canDo->get('component_custom_admin_views.edit.created')) : ?> + canDo->get('component_custom_admin_views.edit.created_by') || $this->canDo->get('component_custom_admin_views.edit.created') || $this->canDo->get('component_custom_admin_views.edit.state') || ($this->canDo->get('component_custom_admin_views.delete') && $this->canDo->get('component_custom_admin_views.edit.state'))) : ?>
diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index 4ff5fbed3..3b737d6e8 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_dashboardTab'; ?> - canDo->get('component_dashboard.delete') || $this->canDo->get('component_dashboard.edit.created_by') || $this->canDo->get('component_dashboard.edit.state') || $this->canDo->get('component_dashboard.edit.created')) : ?> + canDo->get('component_dashboard.edit.created_by') || $this->canDo->get('component_dashboard.edit.created') || $this->canDo->get('component_dashboard.edit.state') || ($this->canDo->get('component_dashboard.delete') && $this->canDo->get('component_dashboard.edit.state'))) : ?>
diff --git a/admin/views/component_files_folders/tmpl/edit.php b/admin/views/component_files_folders/tmpl/edit.php index 541c619f2..f25b1e7fd 100644 --- a/admin/views/component_files_folders/tmpl/edit.php +++ b/admin/views/component_files_folders/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_files_foldersTab'; ?> - canDo->get('component_files_folders.delete') || $this->canDo->get('component_files_folders.edit.created_by') || $this->canDo->get('component_files_folders.edit.state') || $this->canDo->get('component_files_folders.edit.created')) : ?> + canDo->get('component_files_folders.edit.created_by') || $this->canDo->get('component_files_folders.edit.created') || $this->canDo->get('component_files_folders.edit.state') || ($this->canDo->get('component_files_folders.delete') && $this->canDo->get('component_files_folders.edit.state'))) : ?>
diff --git a/admin/views/component_modules/tmpl/edit.php b/admin/views/component_modules/tmpl/edit.php index 2c7c5c46c..c8b23313c 100644 --- a/admin/views/component_modules/tmpl/edit.php +++ b/admin/views/component_modules/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_modulesTab'; ?> - canDo->get('component_modules.delete') || $this->canDo->get('component_modules.edit.created_by') || $this->canDo->get('component_modules.edit.state') || $this->canDo->get('component_modules.edit.created')) : ?> + canDo->get('component_modules.edit.created_by') || $this->canDo->get('component_modules.edit.created') || $this->canDo->get('component_modules.edit.state') || ($this->canDo->get('component_modules.delete') && $this->canDo->get('component_modules.edit.state'))) : ?>
diff --git a/admin/views/component_mysql_tweaks/tmpl/edit.php b/admin/views/component_mysql_tweaks/tmpl/edit.php index 2381d0621..a04dcd019 100644 --- a/admin/views/component_mysql_tweaks/tmpl/edit.php +++ b/admin/views/component_mysql_tweaks/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_mysql_tweaksTab'; ?> - canDo->get('component_mysql_tweaks.delete') || $this->canDo->get('component_mysql_tweaks.edit.created_by') || $this->canDo->get('component_mysql_tweaks.edit.state') || $this->canDo->get('component_mysql_tweaks.edit.created')) : ?> + canDo->get('component_mysql_tweaks.edit.created_by') || $this->canDo->get('component_mysql_tweaks.edit.created') || $this->canDo->get('component_mysql_tweaks.edit.state') || ($this->canDo->get('component_mysql_tweaks.delete') && $this->canDo->get('component_mysql_tweaks.edit.state'))) : ?>
diff --git a/admin/views/component_placeholders/tmpl/edit.php b/admin/views/component_placeholders/tmpl/edit.php index c84fd9476..9776309e7 100644 --- a/admin/views/component_placeholders/tmpl/edit.php +++ b/admin/views/component_placeholders/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_placeholdersTab'; ?> - canDo->get('component_placeholders.delete') || $this->canDo->get('component_placeholders.edit.created_by') || $this->canDo->get('component_placeholders.edit.state') || $this->canDo->get('component_placeholders.edit.created')) : ?> + canDo->get('component_placeholders.edit.created_by') || $this->canDo->get('component_placeholders.edit.created') || $this->canDo->get('component_placeholders.edit.state') || ($this->canDo->get('component_placeholders.delete') && $this->canDo->get('component_placeholders.edit.state'))) : ?>
diff --git a/admin/views/component_plugins/tmpl/edit.php b/admin/views/component_plugins/tmpl/edit.php index b0b528c75..f14227200 100644 --- a/admin/views/component_plugins/tmpl/edit.php +++ b/admin/views/component_plugins/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_pluginsTab'; ?> - canDo->get('component_plugins.delete') || $this->canDo->get('component_plugins.edit.created_by') || $this->canDo->get('component_plugins.edit.state') || $this->canDo->get('component_plugins.edit.created')) : ?> + canDo->get('component_plugins.edit.created_by') || $this->canDo->get('component_plugins.edit.created') || $this->canDo->get('component_plugins.edit.state') || ($this->canDo->get('component_plugins.delete') && $this->canDo->get('component_plugins.edit.state'))) : ?>
diff --git a/admin/views/component_site_views/tmpl/edit.php b/admin/views/component_site_views/tmpl/edit.php index 7fa4efe80..3006ac614 100644 --- a/admin/views/component_site_views/tmpl/edit.php +++ b/admin/views/component_site_views/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_site_viewsTab'; ?> - canDo->get('component_site_views.delete') || $this->canDo->get('component_site_views.edit.created_by') || $this->canDo->get('component_site_views.edit.state') || $this->canDo->get('component_site_views.edit.created')) : ?> + canDo->get('component_site_views.edit.created_by') || $this->canDo->get('component_site_views.edit.created') || $this->canDo->get('component_site_views.edit.state') || ($this->canDo->get('component_site_views.delete') && $this->canDo->get('component_site_views.edit.state'))) : ?>
diff --git a/admin/views/component_updates/tmpl/edit.php b/admin/views/component_updates/tmpl/edit.php index 264094aae..998874f5b 100644 --- a/admin/views/component_updates/tmpl/edit.php +++ b/admin/views/component_updates/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_updatesTab'; ?> - canDo->get('component_updates.delete') || $this->canDo->get('component_updates.edit.created_by') || $this->canDo->get('component_updates.edit.state') || $this->canDo->get('component_updates.edit.created')) : ?> + canDo->get('component_updates.edit.created_by') || $this->canDo->get('component_updates.edit.created') || $this->canDo->get('component_updates.edit.state') || ($this->canDo->get('component_updates.delete') && $this->canDo->get('component_updates.edit.state'))) : ?>
diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index 3f50a5ce7..6571f0dd8 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -113,7 +113,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'custom_admin_viewTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/custom_code/tmpl/edit.php b/admin/views/custom_code/tmpl/edit.php index a75a87685..13e16aba5 100644 --- a/admin/views/custom_code/tmpl/edit.php +++ b/admin/views/custom_code/tmpl/edit.php @@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'custom_codeTab'; ?> - canDo->get('custom_code.delete') || $this->canDo->get('custom_code.edit.created_by') || $this->canDo->get('custom_code.edit.state') || $this->canDo->get('custom_code.edit.created')) : ?> + canDo->get('custom_code.edit.created_by') || $this->canDo->get('custom_code.edit.created') || $this->canDo->get('custom_code.edit.state') || ($this->canDo->get('custom_code.delete') && $this->canDo->get('custom_code.edit.state'))) : ?>
diff --git a/admin/views/dynamic_get/tmpl/edit.php b/admin/views/dynamic_get/tmpl/edit.php index f9a6f9576..24243052a 100644 --- a/admin/views/dynamic_get/tmpl/edit.php +++ b/admin/views/dynamic_get/tmpl/edit.php @@ -112,7 +112,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'dynamic_getTab'; ?> - canDo->get('dynamic_get.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('dynamic_get.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('dynamic_get.edit.state') || ($this->canDo->get('dynamic_get.delete') && $this->canDo->get('dynamic_get.edit.state'))) : ?>
diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 9aa9bb044..30641b09a 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -100,7 +100,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'fieldTab'; ?> - canDo->get('field.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('field.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('field.edit.state') || ($this->canDo->get('field.delete') && $this->canDo->get('field.edit.state'))) : ?>
diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 5a0419d1c..2096e9020 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -92,7 +92,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'fieldtypeTab'; ?> - canDo->get('fieldtype.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('fieldtype.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('fieldtype.edit.state') || ($this->canDo->get('fieldtype.delete') && $this->canDo->get('fieldtype.edit.state'))) : ?>
diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 27c1b97d4..2326b63c7 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'help_documentTab'; ?> - canDo->get('help_document.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('help_document.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('help_document.edit.state') || ($this->canDo->get('help_document.delete') && $this->canDo->get('help_document.edit.state'))) : ?>
diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 8dd5f6710..a4c3cf7e0 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -178,7 +178,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_componentTab'; ?> - canDo->get('joomla_component.delete') || $this->canDo->get('joomla_component.edit.created_by') || $this->canDo->get('joomla_component.edit.state') || $this->canDo->get('joomla_component.edit.created')) : ?> + canDo->get('joomla_component.edit.created_by') || $this->canDo->get('joomla_component.edit.created') || $this->canDo->get('joomla_component.edit.state') || ($this->canDo->get('joomla_component.delete') && $this->canDo->get('joomla_component.edit.state'))) : ?>
diff --git a/admin/views/joomla_module/tmpl/edit.php b/admin/views/joomla_module/tmpl/edit.php index 380a7f650..947b7d1f2 100644 --- a/admin/views/joomla_module/tmpl/edit.php +++ b/admin/views/joomla_module/tmpl/edit.php @@ -147,7 +147,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_moduleTab'; ?> - canDo->get('joomla_module.delete') || $this->canDo->get('joomla_module.edit.created_by') || $this->canDo->get('joomla_module.edit.state') || $this->canDo->get('joomla_module.edit.created')) : ?> + canDo->get('joomla_module.edit.created_by') || $this->canDo->get('joomla_module.edit.created') || $this->canDo->get('joomla_module.edit.state') || ($this->canDo->get('joomla_module.delete') && $this->canDo->get('joomla_module.edit.state'))) : ?>
diff --git a/admin/views/joomla_module_files_folders_urls/tmpl/edit.php b/admin/views/joomla_module_files_folders_urls/tmpl/edit.php index 8969bf127..44f8f487f 100644 --- a/admin/views/joomla_module_files_folders_urls/tmpl/edit.php +++ b/admin/views/joomla_module_files_folders_urls/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_module_files_folders_urlsTab'; ?> - canDo->get('joomla_module_files_folders_urls.delete') || $this->canDo->get('joomla_module_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_module_files_folders_urls.edit.state') || $this->canDo->get('joomla_module_files_folders_urls.edit.created')) : ?> + canDo->get('joomla_module_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_module_files_folders_urls.edit.created') || $this->canDo->get('joomla_module_files_folders_urls.edit.state') || ($this->canDo->get('joomla_module_files_folders_urls.delete') && $this->canDo->get('joomla_module_files_folders_urls.edit.state'))) : ?>
diff --git a/admin/views/joomla_module_updates/tmpl/edit.php b/admin/views/joomla_module_updates/tmpl/edit.php index 7b20ce513..63a069319 100644 --- a/admin/views/joomla_module_updates/tmpl/edit.php +++ b/admin/views/joomla_module_updates/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_module_updatesTab'; ?> - canDo->get('joomla_module_updates.delete') || $this->canDo->get('joomla_module_updates.edit.created_by') || $this->canDo->get('joomla_module_updates.edit.state') || $this->canDo->get('joomla_module_updates.edit.created')) : ?> + canDo->get('joomla_module_updates.edit.created_by') || $this->canDo->get('joomla_module_updates.edit.created') || $this->canDo->get('joomla_module_updates.edit.state') || ($this->canDo->get('joomla_module_updates.delete') && $this->canDo->get('joomla_module_updates.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin/tmpl/edit.php b/admin/views/joomla_plugin/tmpl/edit.php index 2a13e72dc..f173a8107 100644 --- a/admin/views/joomla_plugin/tmpl/edit.php +++ b/admin/views/joomla_plugin/tmpl/edit.php @@ -115,7 +115,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_pluginTab'; ?> - canDo->get('joomla_plugin.delete') || $this->canDo->get('joomla_plugin.edit.created_by') || $this->canDo->get('joomla_plugin.edit.state') || $this->canDo->get('joomla_plugin.edit.created')) : ?> + canDo->get('joomla_plugin.edit.created_by') || $this->canDo->get('joomla_plugin.edit.created') || $this->canDo->get('joomla_plugin.edit.state') || ($this->canDo->get('joomla_plugin.delete') && $this->canDo->get('joomla_plugin.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php b/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php index 49d9563b5..f2df0079b 100644 --- a/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php +++ b/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_plugin_files_folders_urlsTab'; ?> - canDo->get('joomla_plugin_files_folders_urls.delete') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.state') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.created')) : ?> + canDo->get('joomla_plugin_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.created') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.state') || ($this->canDo->get('joomla_plugin_files_folders_urls.delete') && $this->canDo->get('joomla_plugin_files_folders_urls.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin_group/tmpl/edit.php b/admin/views/joomla_plugin_group/tmpl/edit.php index 79a19ad27..d5d007869 100644 --- a/admin/views/joomla_plugin_group/tmpl/edit.php +++ b/admin/views/joomla_plugin_group/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_plugin_groupTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin_updates/tmpl/edit.php b/admin/views/joomla_plugin_updates/tmpl/edit.php index 7df9551e5..32b180cf0 100644 --- a/admin/views/joomla_plugin_updates/tmpl/edit.php +++ b/admin/views/joomla_plugin_updates/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_plugin_updatesTab'; ?> - canDo->get('joomla_plugin_updates.delete') || $this->canDo->get('joomla_plugin_updates.edit.created_by') || $this->canDo->get('joomla_plugin_updates.edit.state') || $this->canDo->get('joomla_plugin_updates.edit.created')) : ?> + canDo->get('joomla_plugin_updates.edit.created_by') || $this->canDo->get('joomla_plugin_updates.edit.created') || $this->canDo->get('joomla_plugin_updates.edit.state') || ($this->canDo->get('joomla_plugin_updates.delete') && $this->canDo->get('joomla_plugin_updates.edit.state'))) : ?>
diff --git a/admin/views/language/tmpl/edit.php b/admin/views/language/tmpl/edit.php index 6b770c37d..bacaef603 100644 --- a/admin/views/language/tmpl/edit.php +++ b/admin/views/language/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'languageTab'; ?> - canDo->get('language.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('language.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('language.edit.state') || ($this->canDo->get('language.delete') && $this->canDo->get('language.edit.state'))) : ?>
diff --git a/admin/views/language_translation/tmpl/edit.php b/admin/views/language_translation/tmpl/edit.php index e4ee02085..738c8cdd1 100644 --- a/admin/views/language_translation/tmpl/edit.php +++ b/admin/views/language_translation/tmpl/edit.php @@ -62,7 +62,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'language_translationTab'; ?> - canDo->get('language_translation.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('language_translation.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('language_translation.edit.state') || ($this->canDo->get('language_translation.delete') && $this->canDo->get('language_translation.edit.state'))) : ?>
diff --git a/admin/views/layout/tmpl/edit.php b/admin/views/layout/tmpl/edit.php index 452464484..66561f86c 100644 --- a/admin/views/layout/tmpl/edit.php +++ b/admin/views/layout/tmpl/edit.php @@ -79,7 +79,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'layoutTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/library/tmpl/edit.php b/admin/views/library/tmpl/edit.php index 586572975..1d7cb8eab 100644 --- a/admin/views/library/tmpl/edit.php +++ b/admin/views/library/tmpl/edit.php @@ -99,7 +99,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'libraryTab'; ?> - canDo->get('library.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('library.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('library.edit.state') || ($this->canDo->get('library.delete') && $this->canDo->get('library.edit.state'))) : ?>
diff --git a/admin/views/library_config/tmpl/edit.php b/admin/views/library_config/tmpl/edit.php index 5e6310b08..74fede23e 100644 --- a/admin/views/library_config/tmpl/edit.php +++ b/admin/views/library_config/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'library_configTab'; ?> - canDo->get('library_config.delete') || $this->canDo->get('library_config.edit.created_by') || $this->canDo->get('library_config.edit.state') || $this->canDo->get('library_config.edit.created')) : ?> + canDo->get('library_config.edit.created_by') || $this->canDo->get('library_config.edit.created') || $this->canDo->get('library_config.edit.state') || ($this->canDo->get('library_config.delete') && $this->canDo->get('library_config.edit.state'))) : ?>
diff --git a/admin/views/library_files_folders_urls/tmpl/edit.php b/admin/views/library_files_folders_urls/tmpl/edit.php index c762969d7..604258b5c 100644 --- a/admin/views/library_files_folders_urls/tmpl/edit.php +++ b/admin/views/library_files_folders_urls/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'library_files_folders_urlsTab'; ?> - canDo->get('library_files_folders_urls.delete') || $this->canDo->get('library_files_folders_urls.edit.created_by') || $this->canDo->get('library_files_folders_urls.edit.state') || $this->canDo->get('library_files_folders_urls.edit.created')) : ?> + canDo->get('library_files_folders_urls.edit.created_by') || $this->canDo->get('library_files_folders_urls.edit.created') || $this->canDo->get('library_files_folders_urls.edit.state') || ($this->canDo->get('library_files_folders_urls.delete') && $this->canDo->get('library_files_folders_urls.edit.state'))) : ?>
diff --git a/admin/views/placeholder/tmpl/edit.php b/admin/views/placeholder/tmpl/edit.php index 7280fe8f3..090122636 100644 --- a/admin/views/placeholder/tmpl/edit.php +++ b/admin/views/placeholder/tmpl/edit.php @@ -68,7 +68,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'placeholderTab'; ?> - canDo->get('placeholder.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('placeholder.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('placeholder.edit.state') || ($this->canDo->get('placeholder.delete') && $this->canDo->get('placeholder.edit.state'))) : ?>
diff --git a/admin/views/server/tmpl/edit.php b/admin/views/server/tmpl/edit.php index 0de7747cf..f2606fc75 100644 --- a/admin/views/server/tmpl/edit.php +++ b/admin/views/server/tmpl/edit.php @@ -81,7 +81,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'serverTab'; ?> - canDo->get('server.delete') || $this->canDo->get('server.edit.created_by') || $this->canDo->get('server.edit.state') || $this->canDo->get('server.edit.created')) : ?> + canDo->get('server.edit.created_by') || $this->canDo->get('server.edit.created') || $this->canDo->get('server.edit.state') || ($this->canDo->get('server.delete') && $this->canDo->get('server.edit.state'))) : ?>
diff --git a/admin/views/site_view/tmpl/edit.php b/admin/views/site_view/tmpl/edit.php index 5ab65e00e..60a99d2e2 100644 --- a/admin/views/site_view/tmpl/edit.php +++ b/admin/views/site_view/tmpl/edit.php @@ -116,7 +116,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'site_viewTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/snippet/tmpl/edit.php b/admin/views/snippet/tmpl/edit.php index aa1d14287..3ec825be8 100644 --- a/admin/views/snippet/tmpl/edit.php +++ b/admin/views/snippet/tmpl/edit.php @@ -58,7 +58,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'snippetTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/snippet_type/tmpl/edit.php b/admin/views/snippet_type/tmpl/edit.php index 585af49e3..c42121ab3 100644 --- a/admin/views/snippet_type/tmpl/edit.php +++ b/admin/views/snippet_type/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'snippet_typeTab'; ?> - canDo->get('snippet_type.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('snippet_type.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('snippet_type.edit.state') || ($this->canDo->get('snippet_type.delete') && $this->canDo->get('snippet_type.edit.state'))) : ?>
diff --git a/admin/views/template/tmpl/edit.php b/admin/views/template/tmpl/edit.php index b0494f9cc..8f7ee22d0 100644 --- a/admin/views/template/tmpl/edit.php +++ b/admin/views/template/tmpl/edit.php @@ -79,7 +79,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'templateTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/validation_rule/tmpl/edit.php b/admin/views/validation_rule/tmpl/edit.php index 9e7010481..1040aef74 100644 --- a/admin/views/validation_rule/tmpl/edit.php +++ b/admin/views/validation_rule/tmpl/edit.php @@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'validation_ruleTab'; ?> - canDo->get('validation_rule.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('validation_rule.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('validation_rule.edit.state') || ($this->canDo->get('validation_rule.delete') && $this->canDo->get('validation_rule.edit.state'))) : ?>
diff --git a/componentbuilder.xml b/componentbuilder.xml index 43dbca171..4c3480fa0 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 1st June, 2020 + 24th June, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 4f30b3419..0bb18a7b9 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -13,6 +13,7 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; @@ -5784,6 +5785,18 @@ abstract class ComponentbuilderHelper return date('Y' . $spacer . 'm' . $spacer . 'd', $date); } + /** + * set the date as 03/05/2004 + */ + public static function setDayMonthYear($date, $spacer = '/') + { + if (!self::isValidTimeStamp($date)) + { + $date = strtotime($date); + } + return date('d' . $spacer . 'm' . $spacer . 'Y', $date); + } + /** * Check if string is a valid time stamp */