From 07662a8a8b2703215f8d05155674126d08bbffb7 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 30 Mar 2018 06:41:33 +0200 Subject: [PATCH] Fixed gh-255 to insure that the correct component name is used when building the button on the edit view where the custom field is used. --- README.md | 2 +- admin/README.txt | 2 +- admin/compiler/joomla_3/JFormFieldList.php | 2 +- admin/helpers/compiler/a_Get.php | 5 +- admin/helpers/compiler/c_Fields.php | 182 +++++++++++++++++- admin/helpers/compiler/e_Interpretation.php | 130 ------------- admin/models/fields/adminsviews.php | 3 +- admin/models/fields/adminviewfolderlist.php | 3 +- admin/models/fields/adminviews.php | 3 +- admin/models/fields/adminviewsreadonly.php | 3 +- admin/models/fields/aliasbuilder.php | 3 +- admin/models/fields/articles.php | 11 +- admin/models/fields/component.php | 3 +- admin/models/fields/componentadminmenus.php | 3 +- admin/models/fields/componentadminviews.php | 3 +- admin/models/fields/components.php | 3 +- admin/models/fields/customadminviews.php | 3 +- admin/models/fields/customfilelist.php | 3 +- admin/models/fields/customfolderlist.php | 3 +- admin/models/fields/customgets.php | 3 +- admin/models/fields/dbtables.php | 15 +- admin/models/fields/dynamicdashboard.php | 3 +- admin/models/fields/dynamicget.php | 3 +- admin/models/fields/dynamicgets.php | 3 +- .../models/fields/existingvalidationrules.php | 3 +- admin/models/fields/fields.php | 3 +- admin/models/fields/fieldtypes.php | 3 +- admin/models/fields/filebehaviour.php | 3 +- admin/models/fields/joomlacomponents.php | 3 +- admin/models/fields/lang.php | 3 +- admin/models/fields/libconfigfield.php | 3 +- admin/models/fields/libraries.php | 3 +- admin/models/fields/librariesx.php | 3 +- admin/models/fields/library.php | 3 +- admin/models/fields/libraryfiles.php | 3 +- admin/models/fields/libraryreadonly.php | 3 +- admin/models/fields/maingets.php | 3 +- admin/models/fields/matchfield.php | 3 +- admin/models/fields/servers.php | 3 +- admin/models/fields/siteviewfolderlist.php | 3 +- admin/models/fields/siteviews.php | 3 +- admin/models/fields/snippets.php | 3 +- admin/models/fields/snippettype.php | 3 +- admin/models/fields/targetfields.php | 3 +- admin/models/fields/viewtabs.php | 3 +- admin/sql/install.mysql.utf8.sql | 2 +- 46 files changed, 276 insertions(+), 186 deletions(-) diff --git a/README.md b/README.md index 75f028284..3b660f628 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.7.1 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **191428** ++ *Line count*: **191473** + *Field count*: **1011** + *File count*: **1197** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index 75f028284..3b660f628 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.7.1 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **191428** ++ *Line count*: **191473** + *Field count*: **1011** + *File count*: **1197** + *Folder count*: **193** diff --git a/admin/compiler/joomla_3/JFormFieldList.php b/admin/compiler/joomla_3/JFormFieldList.php index 968e01250..3eaf9d24f 100644 --- a/admin/compiler/joomla_3/JFormFieldList.php +++ b/admin/compiler/joomla_3/JFormFieldList.php @@ -43,7 +43,7 @@ class JFormField###Type### extends JFormFieldList * * @var string */ - public $type = '###type###'; ###ADD_BUTTON### + public $type = '###type###';###ADD_BUTTON### /** * Method to get a list of options for a list input. diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 51728b0bb..6c8f1d8e8 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -5490,13 +5490,12 @@ class Get * @param string $data The actual data * @param array $placeholder The placeholders * @param int $action The action to use - * =================================================== + * * THE ACTION OPTIONS ARE - * =================================================== * 1 -> Just replace (default) * 2 -> Check if data string has placeholders * 3 -> Remove placeholders not in data string - * =================================================== + * * @param int $langSwitch The lang switch * * @return string diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index aa5432527..6bf4ca040 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2647,6 +2647,16 @@ class Fields extends Structure $this->setLayoutBuilder($view_name_single, $tabName, $name, $field); } + /** + * set Custom Field Type File + * + * @param array $data The field complete data set + * @param string $view_name_list The list view code name + * @param string $view_name_single The single view code name + * + * @return void + * + */ public function setCustomFieldTypeFile($data, $view_name_list, $view_name_single) { // make sure it is not already been build or if it is prime @@ -2700,11 +2710,12 @@ class Fields extends Structure { $phpCode = 'return null;'; } + // catch empty stuff if (!ComponentbuilderHelper::checkString($phpCode)) { $phpCode = 'return null;'; } - + // some house cleaning for users if ($data['custom']['extends'] === 'user') { // now load the php xclude script @@ -2761,10 +2772,177 @@ class Fields extends Structure // ###type### <<>> $this->fileContentDynamic['customfield_' . $data['type']]['###type###'] = $data['custom']['type']; // ###type### <<>> - $this->fileContentDynamic['customfield_' . $data['type']]['###ADD_BUTTON###'] = $this->setAddButttonToListField($data['custom']['view'], $data['custom']['views']); + $this->fileContentDynamic['customfield_' . $data['type']]['###ADD_BUTTON###'] = $this->setAddButtonToListField($data['custom']); } } + /** + * set Add Button To List Field (getInput tweak) + * + * @param array $fieldData The field custom data + * + * @return string of getInput class on success empty string otherwise + * + */ + protected function setAddButtonToListField($fieldData) + { + // make sure hte view values are set + if (isset($fieldData['view']) && isset($fieldData['views'])) + { + $addButton = array(); + $addButton[] = PHP_EOL . PHP_EOL . "\t/**"; + $addButton[] = "\t * Override to add new button"; + $addButton[] = "\t *"; + $addButton[] = "\t * @return string The field input markup."; + $addButton[] = "\t *"; + $addButton[] = "\t * @since 3.2"; + $addButton[] = "\t */"; + $addButton[] = "\tprotected function getInput()"; + $addButton[] = "\t{"; + $addButton[] = "\t\t//" . $this->setLine(__LINE__) . " see if we should add buttons"; + $addButton[] = "\t\t\$setButton = \$this->getAttribute('button');"; + $addButton[] = "\t\t//" . $this->setLine(__LINE__) . " get html"; + $addButton[] = "\t\t\$html = parent::getInput();"; + $addButton[] = "\t\t//" . $this->setLine(__LINE__) . " if true set button"; + $addButton[] = "\t\tif (\$setButton === 'true')"; + $addButton[] = "\t\t{"; + $addButton[] = "\t\t\t\$button = array();"; + $addButton[] = "\t\t\t\$script = array();"; + $addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');"; + $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the input from url"; + $addButton[] = "\t\t\t\$app = JFactory::getApplication();"; + $addButton[] = "\t\t\t\$jinput = \$app->input;"; + $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the view name & id"; + $addButton[] = "\t\t\t\$values = \$jinput->getArray(array("; + $addButton[] = "\t\t\t\t'id' => 'int',"; + $addButton[] = "\t\t\t\t'view' => 'word'"; + $addButton[] = "\t\t\t));"; + $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if new item"; + $addButton[] = "\t\t\t\$ref = '';"; + $addButton[] = "\t\t\t\$refJ = '';"; + $addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))"; + $addButton[] = "\t\t\t{"; + $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " only load referal if not new item."; + $addButton[] = "\t\t\t\t\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; + $addButton[] = "\t\t\t\t\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; + $addButton[] = "\t\t\t}"; + $addButton[] = "\t\t\t\$user = JFactory::getUser();"; + $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view']; + // check that the component value is set + if (!isset($fieldData['component']) || !ComponentbuilderHelper::checkString($fieldData['component'])) + { + $fieldData['component'] = "com_" . $this->fileContentStatic['###component###']; + } + // check that the componet has the com_ value in it + if (strpos($fieldData['component'], 'com_') === false) + { + $fieldData['component'] = "com_" . $fieldData['component']; + } + // make sure the component is update if ### or [[[ component placeholder is used + if (strpos($fieldData['component'], '###') !== false || strpos($fieldData['component'], '[[[') !== false ) // should not be needed... but + { + $fieldData['component'] = $this->setPlaceholders($fieldData['component'], $this->placeholders); + } + // get core permissions + $coreLoad = false; + if (isset($this->permissionCore[$fieldData['view']])) + { + // get the core permission naming array + $core = $this->permissionCore[$fieldData['view']]; + // set switch to activate easy update + $coreLoad = true; + // since the view is local to the component use this component name + $component = "com_" . $this->fileContentStatic['###component###']; + } + else + { + // fall back on the field component + $component = $fieldData['component']; + } + // check if the item has permissions. + if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.create']])) + { + $addButton[] = "\t\t\tif (\$user->authorise('" . $core['core.create'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; + } + else + { + $addButton[] = "\t\t\tif (\$user->authorise('core.create', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; + } + $addButton[] = "\t\t\t{"; + $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build Create button"; + $addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);"; + $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);"; + $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; + $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; + $addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; + $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\""; + $addButton[] = "\t\t\t\t\thref=\"index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['view'] . "&layout=edit'.\$ref.'\" >"; + $addButton[] = "\t\t\t\t\t';"; + $addButton[] = "\t\t\t}"; + $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to edit " . $fieldData['view']; + // check if the item has permissions. + if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.edit']])) + { + $addButton[] = "\t\t\tif ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; + } + else + { + $addButton[] = "\t\t\tif ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; + } + $addButton[] = "\t\t\t{"; + $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build edit button"; + $addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);"; + $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);"; + $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; + $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; + $addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; + $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; + $addButton[] = "\t\t\t\t\t';"; + $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script"; + $addButton[] = "\t\t\t\t\$script[] = \""; + $addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {"; + $addButton[] = "\t\t\t\t\t\tjQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {"; + $addButton[] = "\t\t\t\t\t\t\te.preventDefault();"; + $addButton[] = "\t\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();"; + $addButton[] = "\t\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);"; + $addButton[] = "\t\t\t\t\t\t});"; + $addButton[] = "\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();"; + $addButton[] = "\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);"; + $addButton[] = "\t\t\t\t\t});"; + $addButton[] = "\t\t\t\t\tfunction \".\$buttonName.\"Button(value) {"; + $addButton[] = "\t\t\t\t\t\tif (value > 0) {"; // TODO not ideal since value may not be an (int) + $addButton[] = "\t\t\t\t\t\t\t// hide the create button"; + $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').hide();"; + $addButton[] = "\t\t\t\t\t\t\t// show edit button"; + $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').show();"; + $addButton[] = "\t\t\t\t\t\t\tvar url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID + $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').attr('href', url);"; + $addButton[] = "\t\t\t\t\t\t} else {"; + $addButton[] = "\t\t\t\t\t\t\t// show the create button"; + $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').show();"; + $addButton[] = "\t\t\t\t\t\t\t// hide edit button"; + $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').hide();"; + $addButton[] = "\t\t\t\t\t\t}"; + $addButton[] = "\t\t\t\t\t}\";"; + $addButton[] = "\t\t\t}"; + $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if button was created for " . $fieldData['view'] . " field."; + $addButton[] = "\t\t\tif (is_array(\$button) && count(\$button) > 0)"; + $addButton[] = "\t\t\t{"; + $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Load the needed script."; + $addButton[] = "\t\t\t\t\$document = JFactory::getDocument();"; + $addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));"; + $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " return the button attached to input field."; + $addButton[] = "\t\t\t\treturn '
' .\$html . implode('',\$button).'
';"; + $addButton[] = "\t\t\t}"; + $addButton[] = "\t\t}"; + $addButton[] = "\t\treturn \$html;"; + $addButton[] = "\t}"; + + return implode(PHP_EOL, $addButton); + } + return ''; + } + /** * default Fields * diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 827789313..dcee03e15 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -8676,136 +8676,6 @@ class Interpretation extends Fields } } - public function setAddButttonToListField($targetView, $targetViews) - { - $addButton = array(); - $addButton[] = PHP_EOL . "\t/**"; - $addButton[] = "\t * Override to add new button"; - $addButton[] = "\t *"; - $addButton[] = "\t * @return string The field input markup."; - $addButton[] = "\t *"; - $addButton[] = "\t * @since 3.2"; - $addButton[] = "\t */"; - $addButton[] = "\tprotected function getInput()"; - $addButton[] = "\t{"; - $addButton[] = "\t\t//" . $this->setLine(__LINE__) . " see if we should add buttons"; - $addButton[] = "\t\t\$setButton = \$this->getAttribute('button');"; - $addButton[] = "\t\t//" . $this->setLine(__LINE__) . " get html"; - $addButton[] = "\t\t\$html = parent::getInput();"; - $addButton[] = "\t\t//" . $this->setLine(__LINE__) . " if true set button"; - $addButton[] = "\t\tif (\$setButton === 'true')"; - $addButton[] = "\t\t{"; - $addButton[] = "\t\t\t\$button = array();"; - $addButton[] = "\t\t\t\$script = array();"; - $addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');"; - $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the input from url"; - $addButton[] = "\t\t\t\$app = JFactory::getApplication();"; - $addButton[] = "\t\t\t\$jinput = \$app->input;"; - $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the view name & id"; - $addButton[] = "\t\t\t\$values = \$jinput->getArray(array("; - $addButton[] = "\t\t\t\t'id' => 'int',"; - $addButton[] = "\t\t\t\t'view' => 'word'"; - $addButton[] = "\t\t\t));"; - $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if new item"; - $addButton[] = "\t\t\t\$ref = '';"; - $addButton[] = "\t\t\t\$refJ = '';"; - $addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))"; - $addButton[] = "\t\t\t{"; - $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " only load referal if not new item."; - $addButton[] = "\t\t\t\t\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; - $addButton[] = "\t\t\t\t\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; - $addButton[] = "\t\t\t}"; - $addButton[] = "\t\t\t\$user = JFactory::getUser();"; - $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $targetView; - // get core permissions - $coreLoad = false; - if (isset($this->permissionCore[$targetView])) - { - $core = $this->permissionCore[$targetView]; - $coreLoad = true; - } - // check if the item has permissions. - if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($targetView, $this->permissionBuilder['global'][$core['core.create']])) - { - $addButton[] = "\t\t\tif (\$user->authorise('" . $core['core.create'] . "', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area."; - } - else - { - $addButton[] = "\t\t\tif (\$user->authorise('core.create', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area."; - } - $addButton[] = "\t\t\t{"; - $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build Create button"; - $addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);"; - $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);"; - $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; - $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; - $addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; - $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\""; - $addButton[] = "\t\t\t\t\thref=\"index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $targetView . "&layout=edit'.\$ref.'\" >"; - $addButton[] = "\t\t\t\t\t';"; - $addButton[] = "\t\t\t}"; - $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to edit " . $targetView; - // check if the item has permissions. - if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($targetView, $this->permissionBuilder['global'][$core['core.edit']])) - { - $addButton[] = "\t\t\tif ((\$buttonName === '" . $targetView . "' || \$buttonName === '" . $targetViews . "') && \$user->authorise('" . $core['core.edit'] . "', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area."; - } - else - { - $addButton[] = "\t\t\tif ((\$buttonName === '" . $targetView . "' || \$buttonName === '" . $targetViews . "') && \$user->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area."; - } - $addButton[] = "\t\t\t{"; - $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build edit button"; - $addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);"; - $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);"; - $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; - $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; - $addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; - $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; - $addButton[] = "\t\t\t\t\t';"; - $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script"; - $addButton[] = "\t\t\t\t\$script[] = \""; - $addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {"; - $addButton[] = "\t\t\t\t\t\tjQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {"; - $addButton[] = "\t\t\t\t\t\t\te.preventDefault();"; - $addButton[] = "\t\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();"; - $addButton[] = "\t\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);"; - $addButton[] = "\t\t\t\t\t\t});"; - $addButton[] = "\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();"; - $addButton[] = "\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);"; - $addButton[] = "\t\t\t\t\t});"; - $addButton[] = "\t\t\t\t\tfunction \".\$buttonName.\"Button(value) {"; - $addButton[] = "\t\t\t\t\t\tif (value > 0) {"; // TODO not ideal since value may not be an (int) - $addButton[] = "\t\t\t\t\t\t\t// hide the create button"; - $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').hide();"; - $addButton[] = "\t\t\t\t\t\t\t// show edit button"; - $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').show();"; - $addButton[] = "\t\t\t\t\t\t\tvar url = 'index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $targetViews . "&task=" . $targetView . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID - $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').attr('href', url);"; - $addButton[] = "\t\t\t\t\t\t} else {"; - $addButton[] = "\t\t\t\t\t\t\t// show the create button"; - $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').show();"; - $addButton[] = "\t\t\t\t\t\t\t// hide edit button"; - $addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').hide();"; - $addButton[] = "\t\t\t\t\t\t}"; - $addButton[] = "\t\t\t\t\t}\";"; - $addButton[] = "\t\t\t}"; - $addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if button was created for " . $targetView . " field."; - $addButton[] = "\t\t\tif (is_array(\$button) && count(\$button) > 0)"; - $addButton[] = "\t\t\t{"; - $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Load the needed script."; - $addButton[] = "\t\t\t\t\$document = JFactory::getDocument();"; - $addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));"; - $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " return the button attached to input field."; - $addButton[] = "\t\t\t\treturn '
' .\$html . implode('',\$button).'
';"; - $addButton[] = "\t\t\t}"; - $addButton[] = "\t\t}"; - $addButton[] = "\t\treturn \$html;"; - $addButton[] = "\t}"; - - return implode(PHP_EOL, $addButton); - } - public function setFilterQuery($viewName_list) { if (isset($this->filterBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->filterBuilder[$viewName_list])) diff --git a/admin/models/fields/adminsviews.php b/admin/models/fields/adminsviews.php index 06c6d2f5b..daa214f98 100644 --- a/admin/models/fields/adminsviews.php +++ b/admin/models/fields/adminsviews.php @@ -40,7 +40,8 @@ class JFormFieldAdminsviews extends JFormFieldList * * @var string */ - public $type = 'adminsviews'; + public $type = 'adminsviews'; + /** * Override to add new button * diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index 9d3e80cb7..875b592ee 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -40,7 +40,8 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList * * @var string */ - public $type = 'adminviewfolderlist'; + public $type = 'adminviewfolderlist'; + /** * Override to add new button * diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php index 7f0cd629b..9063e5992 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -40,7 +40,8 @@ class JFormFieldAdminviews extends JFormFieldList * * @var string */ - public $type = 'adminviews'; + public $type = 'adminviews'; + /** * Override to add new button * diff --git a/admin/models/fields/adminviewsreadonly.php b/admin/models/fields/adminviewsreadonly.php index f2daecc89..d9728690d 100644 --- a/admin/models/fields/adminviewsreadonly.php +++ b/admin/models/fields/adminviewsreadonly.php @@ -40,7 +40,8 @@ class JFormFieldAdminviewsreadonly extends JFormFieldList * * @var string */ - public $type = 'adminviewsreadonly'; + public $type = 'adminviewsreadonly'; + /** * Override to add new button * diff --git a/admin/models/fields/aliasbuilder.php b/admin/models/fields/aliasbuilder.php index 8d53c335d..8041c9b71 100644 --- a/admin/models/fields/aliasbuilder.php +++ b/admin/models/fields/aliasbuilder.php @@ -40,7 +40,8 @@ class JFormFieldAliasbuilder extends JFormFieldList * * @var string */ - public $type = 'aliasbuilder'; + public $type = 'aliasbuilder'; + /** * Override to add new button * diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 828abd341..b28093840 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -40,7 +40,8 @@ class JFormFieldArticles extends JFormFieldList * * @var string */ - public $type = 'articles'; + public $type = 'articles'; + /** * Override to add new button * @@ -79,7 +80,7 @@ class JFormFieldArticles extends JFormFieldList } $user = JFactory::getUser(); // only add if user allowed to create article - if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_content') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button $buttonNamee = trim($buttonName); @@ -88,11 +89,11 @@ class JFormFieldArticles extends JFormFieldList $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); $buttonNamee = ucfirst(strtolower($buttonNamee)); $button[] = ' + href="index.php?option=com_content&view=article&layout=edit'.$ref.'" > '; } // only add if user allowed to edit article - if (($buttonName === 'article' || $buttonName === 'articles') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if (($buttonName === 'article' || $buttonName === 'articles') && $user->authorise('core.edit', 'com_content') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button $buttonNamee = trim($buttonName); @@ -119,7 +120,7 @@ class JFormFieldArticles extends JFormFieldList jQuery('#".$buttonName."Create').hide(); // show edit button jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_componentbuilder&view=articles&task=article.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_content&view=articles&task=article.edit&id='+value+'".$refJ."'; jQuery('#".$buttonName."Edit').attr('href', url); } else { // show the create button diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index b2f1ccf47..4b93dd51f 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -40,7 +40,8 @@ class JFormFieldComponent extends JFormFieldList * * @var string */ - public $type = 'component'; + public $type = 'component'; + /** * Override to add new button * diff --git a/admin/models/fields/componentadminmenus.php b/admin/models/fields/componentadminmenus.php index 61989365a..edba094d1 100644 --- a/admin/models/fields/componentadminmenus.php +++ b/admin/models/fields/componentadminmenus.php @@ -40,7 +40,8 @@ class JFormFieldComponentadminmenus extends JFormFieldList * * @var string */ - public $type = 'componentadminmenus'; + public $type = 'componentadminmenus'; + /** * Override to add new button * diff --git a/admin/models/fields/componentadminviews.php b/admin/models/fields/componentadminviews.php index 76d262325..6d5762dae 100644 --- a/admin/models/fields/componentadminviews.php +++ b/admin/models/fields/componentadminviews.php @@ -40,7 +40,8 @@ class JFormFieldComponentadminviews extends JFormFieldList * * @var string */ - public $type = 'componentadminviews'; + public $type = 'componentadminviews'; + /** * Override to add new button * diff --git a/admin/models/fields/components.php b/admin/models/fields/components.php index 6812fa2be..a683562db 100644 --- a/admin/models/fields/components.php +++ b/admin/models/fields/components.php @@ -40,7 +40,8 @@ class JFormFieldComponents extends JFormFieldList * * @var string */ - public $type = 'components'; + public $type = 'components'; + /** * Override to add new button * diff --git a/admin/models/fields/customadminviews.php b/admin/models/fields/customadminviews.php index 78a6db561..4d82180c9 100644 --- a/admin/models/fields/customadminviews.php +++ b/admin/models/fields/customadminviews.php @@ -40,7 +40,8 @@ class JFormFieldCustomadminviews extends JFormFieldList * * @var string */ - public $type = 'customadminviews'; + public $type = 'customadminviews'; + /** * Override to add new button * diff --git a/admin/models/fields/customfilelist.php b/admin/models/fields/customfilelist.php index 77fd653e8..140725bff 100644 --- a/admin/models/fields/customfilelist.php +++ b/admin/models/fields/customfilelist.php @@ -40,7 +40,8 @@ class JFormFieldCustomfilelist extends JFormFieldList * * @var string */ - public $type = 'customfilelist'; + public $type = 'customfilelist'; + /** * Override to add new button * diff --git a/admin/models/fields/customfolderlist.php b/admin/models/fields/customfolderlist.php index c95b954d4..5352032d3 100644 --- a/admin/models/fields/customfolderlist.php +++ b/admin/models/fields/customfolderlist.php @@ -40,7 +40,8 @@ class JFormFieldCustomfolderlist extends JFormFieldList * * @var string */ - public $type = 'customfolderlist'; + public $type = 'customfolderlist'; + /** * Override to add new button * diff --git a/admin/models/fields/customgets.php b/admin/models/fields/customgets.php index 93e7dab8b..418243cf9 100644 --- a/admin/models/fields/customgets.php +++ b/admin/models/fields/customgets.php @@ -40,7 +40,8 @@ class JFormFieldCustomgets extends JFormFieldList * * @var string */ - public $type = 'customgets'; + public $type = 'customgets'; + /** * Override to add new button * diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php index 2d460f563..1c3725cb6 100644 --- a/admin/models/fields/dbtables.php +++ b/admin/models/fields/dbtables.php @@ -40,7 +40,8 @@ class JFormFieldDbtables extends JFormFieldList * * @var string */ - public $type = 'dbtables'; + public $type = 'dbtables'; + /** * Override to add new button * @@ -79,7 +80,8 @@ class JFormFieldDbtables extends JFormFieldList } $user = JFactory::getUser(); // only add if user allowed to create - if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ + view=') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button $buttonNamee = trim($buttonName); @@ -88,11 +90,13 @@ class JFormFieldDbtables extends JFormFieldList $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); $buttonNamee = ucfirst(strtolower($buttonNamee)); $button[] = ' + href="index.php?option=com_ + view=&view=&layout=edit'.$ref.'" > '; } // only add if user allowed to edit - if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_ + view=') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button $buttonNamee = trim($buttonName); @@ -119,7 +123,8 @@ class JFormFieldDbtables extends JFormFieldList jQuery('#".$buttonName."Create').hide(); // show edit button jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ + view=&view=&task=.edit&id='+value+'".$refJ."'; jQuery('#".$buttonName."Edit').attr('href', url); } else { // show the create button diff --git a/admin/models/fields/dynamicdashboard.php b/admin/models/fields/dynamicdashboard.php index ce44b08f0..1459bf7b3 100644 --- a/admin/models/fields/dynamicdashboard.php +++ b/admin/models/fields/dynamicdashboard.php @@ -40,7 +40,8 @@ class JFormFieldDynamicdashboard extends JFormFieldList * * @var string */ - public $type = 'dynamicdashboard'; + public $type = 'dynamicdashboard'; + /** * Override to add new button * diff --git a/admin/models/fields/dynamicget.php b/admin/models/fields/dynamicget.php index 5ff507d9c..5a99b1992 100644 --- a/admin/models/fields/dynamicget.php +++ b/admin/models/fields/dynamicget.php @@ -40,7 +40,8 @@ class JFormFieldDynamicget extends JFormFieldList * * @var string */ - public $type = 'dynamicget'; + public $type = 'dynamicget'; + /** * Override to add new button * diff --git a/admin/models/fields/dynamicgets.php b/admin/models/fields/dynamicgets.php index 9cfdb1eb1..5b60340d1 100644 --- a/admin/models/fields/dynamicgets.php +++ b/admin/models/fields/dynamicgets.php @@ -40,7 +40,8 @@ class JFormFieldDynamicgets extends JFormFieldList * * @var string */ - public $type = 'dynamicgets'; + public $type = 'dynamicgets'; + /** * Override to add new button * diff --git a/admin/models/fields/existingvalidationrules.php b/admin/models/fields/existingvalidationrules.php index d897fe4b9..fcbe83265 100644 --- a/admin/models/fields/existingvalidationrules.php +++ b/admin/models/fields/existingvalidationrules.php @@ -40,7 +40,8 @@ class JFormFieldExistingvalidationrules extends JFormFieldList * * @var string */ - public $type = 'existingvalidationrules'; + public $type = 'existingvalidationrules'; + /** * Override to add new button * diff --git a/admin/models/fields/fields.php b/admin/models/fields/fields.php index dbe3e0d82..42f8267bd 100644 --- a/admin/models/fields/fields.php +++ b/admin/models/fields/fields.php @@ -40,7 +40,8 @@ class JFormFieldFields extends JFormFieldList * * @var string */ - public $type = 'fields'; + public $type = 'fields'; + /** * Override to add new button * diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index dae028ec2..f38a22c12 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -40,7 +40,8 @@ class JFormFieldFieldtypes extends JFormFieldList * * @var string */ - public $type = 'fieldtypes'; + public $type = 'fieldtypes'; + /** * Override to add new button * diff --git a/admin/models/fields/filebehaviour.php b/admin/models/fields/filebehaviour.php index c3f868218..ae3fdfde2 100644 --- a/admin/models/fields/filebehaviour.php +++ b/admin/models/fields/filebehaviour.php @@ -40,7 +40,8 @@ class JFormFieldFilebehaviour extends JFormFieldList * * @var string */ - public $type = 'filebehaviour'; + public $type = 'filebehaviour'; + /** * Override to add new button * diff --git a/admin/models/fields/joomlacomponents.php b/admin/models/fields/joomlacomponents.php index ab0371441..3970acf1a 100644 --- a/admin/models/fields/joomlacomponents.php +++ b/admin/models/fields/joomlacomponents.php @@ -40,7 +40,8 @@ class JFormFieldJoomlacomponents extends JFormFieldList * * @var string */ - public $type = 'joomlacomponents'; + public $type = 'joomlacomponents'; + /** * Override to add new button * diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index e4434ce2c..f5a88c21a 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -40,7 +40,8 @@ class JFormFieldLang extends JFormFieldList * * @var string */ - public $type = 'lang'; + public $type = 'lang'; + /** * Override to add new button * diff --git a/admin/models/fields/libconfigfield.php b/admin/models/fields/libconfigfield.php index b2daf71a6..d29c37d11 100644 --- a/admin/models/fields/libconfigfield.php +++ b/admin/models/fields/libconfigfield.php @@ -40,7 +40,8 @@ class JFormFieldLibconfigfield extends JFormFieldList * * @var string */ - public $type = 'libconfigfield'; + public $type = 'libconfigfield'; + /** * Override to add new button * diff --git a/admin/models/fields/libraries.php b/admin/models/fields/libraries.php index b9b9ac39a..de9f67422 100644 --- a/admin/models/fields/libraries.php +++ b/admin/models/fields/libraries.php @@ -40,7 +40,8 @@ class JFormFieldLibraries extends JFormFieldList * * @var string */ - public $type = 'libraries'; + public $type = 'libraries'; + /** * Override to add new button * diff --git a/admin/models/fields/librariesx.php b/admin/models/fields/librariesx.php index 853e505d0..fc2c87a46 100644 --- a/admin/models/fields/librariesx.php +++ b/admin/models/fields/librariesx.php @@ -40,7 +40,8 @@ class JFormFieldLibrariesx extends JFormFieldList * * @var string */ - public $type = 'librariesx'; + public $type = 'librariesx'; + /** * Override to add new button * diff --git a/admin/models/fields/library.php b/admin/models/fields/library.php index d328b2af2..e48766799 100644 --- a/admin/models/fields/library.php +++ b/admin/models/fields/library.php @@ -40,7 +40,8 @@ class JFormFieldLibrary extends JFormFieldList * * @var string */ - public $type = 'library'; + public $type = 'library'; + /** * Override to add new button * diff --git a/admin/models/fields/libraryfiles.php b/admin/models/fields/libraryfiles.php index 0d3a71319..745500545 100644 --- a/admin/models/fields/libraryfiles.php +++ b/admin/models/fields/libraryfiles.php @@ -40,7 +40,8 @@ class JFormFieldLibraryfiles extends JFormFieldList * * @var string */ - public $type = 'libraryfiles'; + public $type = 'libraryfiles'; + /** * Override to add new button * diff --git a/admin/models/fields/libraryreadonly.php b/admin/models/fields/libraryreadonly.php index ce66044b1..49e4df9ea 100644 --- a/admin/models/fields/libraryreadonly.php +++ b/admin/models/fields/libraryreadonly.php @@ -40,7 +40,8 @@ class JFormFieldLibraryreadonly extends JFormFieldList * * @var string */ - public $type = 'libraryreadonly'; + public $type = 'libraryreadonly'; + /** * Override to add new button * diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index 47fc2d8e8..3ec2fa67a 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -40,7 +40,8 @@ class JFormFieldMaingets extends JFormFieldList * * @var string */ - public $type = 'maingets'; + public $type = 'maingets'; + /** * Override to add new button * diff --git a/admin/models/fields/matchfield.php b/admin/models/fields/matchfield.php index 9f777527d..b8164080a 100644 --- a/admin/models/fields/matchfield.php +++ b/admin/models/fields/matchfield.php @@ -40,7 +40,8 @@ class JFormFieldMatchfield extends JFormFieldList * * @var string */ - public $type = 'matchfield'; + public $type = 'matchfield'; + /** * Override to add new button * diff --git a/admin/models/fields/servers.php b/admin/models/fields/servers.php index f6e2c50e2..37b4d3af9 100644 --- a/admin/models/fields/servers.php +++ b/admin/models/fields/servers.php @@ -40,7 +40,8 @@ class JFormFieldServers extends JFormFieldList * * @var string */ - public $type = 'servers'; + public $type = 'servers'; + /** * Override to add new button * diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index 99c2fcab1..6fd382439 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -40,7 +40,8 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList * * @var string */ - public $type = 'siteviewfolderlist'; + public $type = 'siteviewfolderlist'; + /** * Override to add new button * diff --git a/admin/models/fields/siteviews.php b/admin/models/fields/siteviews.php index 2c79a2174..5f4f4dd83 100644 --- a/admin/models/fields/siteviews.php +++ b/admin/models/fields/siteviews.php @@ -40,7 +40,8 @@ class JFormFieldSiteviews extends JFormFieldList * * @var string */ - public $type = 'siteviews'; + public $type = 'siteviews'; + /** * Override to add new button * diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index 68a9bf304..baf8ce0de 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -40,7 +40,8 @@ class JFormFieldSnippets extends JFormFieldList * * @var string */ - public $type = 'snippets'; + public $type = 'snippets'; + /** * Override to add new button * diff --git a/admin/models/fields/snippettype.php b/admin/models/fields/snippettype.php index da9670ba1..2dcbdc9e1 100644 --- a/admin/models/fields/snippettype.php +++ b/admin/models/fields/snippettype.php @@ -40,7 +40,8 @@ class JFormFieldSnippettype extends JFormFieldList * * @var string */ - public $type = 'snippettype'; + public $type = 'snippettype'; + /** * Override to add new button * diff --git a/admin/models/fields/targetfields.php b/admin/models/fields/targetfields.php index 8e2cd672f..cfb43da25 100644 --- a/admin/models/fields/targetfields.php +++ b/admin/models/fields/targetfields.php @@ -40,7 +40,8 @@ class JFormFieldTargetfields extends JFormFieldList * * @var string */ - public $type = 'targetfields'; + public $type = 'targetfields'; + /** * Override to add new button * diff --git a/admin/models/fields/viewtabs.php b/admin/models/fields/viewtabs.php index e81981c16..1d28cd454 100644 --- a/admin/models/fields/viewtabs.php +++ b/admin/models/fields/viewtabs.php @@ -40,7 +40,8 @@ class JFormFieldViewtabs extends JFormFieldList * * @var string */ - public $type = 'viewtabs'; + public $type = 'viewtabs'; + /** * Override to add new button * diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 24126ea64..009ae20d6 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1280,7 +1280,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_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`, `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`, `export_package_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`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://www.vdm.io/updates/demo_update_server.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoI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2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', '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.', 'info@vdm.io', '', '', '', '+6mn40lmDGmautVJIfs7ahWsd/QJO4zyIbASW0Twyts=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZ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KTs=', '', '', '', '', 'Demo Component', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2018-03-10 02:01:42', '', 3, '2F5ALsuK5OUWzGUuImuKjSvDBg91B1YlakuppVwkEJ8=', ''); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://www.vdm.io/updates/demo_update_server.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMj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AxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', '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', '', '', '', 'zrpRHd5ViJh++86Rz3akdntYdwLRNP0VxTz+ktp/Hko=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1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QgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2018-03-30 01:31:16', '', 3, '2QGAdd979/Dn1ryWxTrLkUvnxZoyL5PV/BWMJU500lA=', ''); -- -- Dumping data for table `#__componentbuilder_admin_view`