From 6da9cb3d421a7d61b57bf4d528b213f1c5b97d72 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 10 Jun 2019 01:05:37 +0200 Subject: [PATCH] Fixed gh-417 edit layout by removing the one to many div's from the dynamic build method. --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler/e_Interpretation.php | 1091 +++++++++-------- admin/views/admin_custom_tabs/tmpl/edit.php | 1 - admin/views/admin_fields/tmpl/edit.php | 1 - .../admin_fields_conditions/tmpl/edit.php | 1 - .../admin_fields_relations/tmpl/edit.php | 1 - admin/views/admin_view/tmpl/edit.php | 1 - .../views/component_admin_views/tmpl/edit.php | 1 - admin/views/component_config/tmpl/edit.php | 1 - .../tmpl/edit.php | 1 - .../tmpl/edit.php | 1 - admin/views/component_dashboard/tmpl/edit.php | 1 - .../component_files_folders/tmpl/edit.php | 1 - .../component_mysql_tweaks/tmpl/edit.php | 1 - .../component_placeholders/tmpl/edit.php | 1 - .../views/component_site_views/tmpl/edit.php | 1 - admin/views/component_updates/tmpl/edit.php | 1 - admin/views/custom_admin_views/view.html.php | 4 +- admin/views/custom_code/tmpl/edit.php | 1 - admin/views/custom_codes/view.html.php | 4 +- admin/views/dynamic_get/tmpl/edit.php | 1 - admin/views/field/tmpl/edit.php | 1 - admin/views/fields/view.html.php | 4 +- admin/views/fieldtype/tmpl/edit.php | 1 - admin/views/help_document/tmpl/edit.php | 1 - admin/views/help_documents/view.html.php | 8 +- admin/views/joomla_component/tmpl/edit.php | 1 - admin/views/language/tmpl/edit.php | 1 - .../views/language_translation/tmpl/edit.php | 1 - admin/views/layouts/view.html.php | 4 +- admin/views/libraries/view.html.php | 4 +- admin/views/library/tmpl/edit.php | 1 - admin/views/library_config/tmpl/edit.php | 1 - .../library_files_folders_urls/tmpl/edit.php | 1 - admin/views/placeholder/tmpl/edit.php | 1 - admin/views/server/tmpl/edit.php | 1 - admin/views/site_views/view.html.php | 4 +- admin/views/snippet/tmpl/edit.php | 1 - admin/views/snippet_type/tmpl/edit.php | 1 - admin/views/snippets/view.html.php | 8 +- admin/views/templates/view.html.php | 4 +- admin/views/validation_rule/tmpl/edit.php | 1 - 43 files changed, 622 insertions(+), 548 deletions(-) diff --git a/README.md b/README.md index e0bc07564..e04a07bd7 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ TODO + *Version*: 2.9.18 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206669** ++ *Line count*: **206638** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index e0bc07564..e04a07bd7 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -150,7 +150,7 @@ TODO + *Version*: 2.9.18 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206669** ++ *Line count*: **206638** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b103231ff..70bf10151 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -201,6 +201,13 @@ class Interpretation extends Fields protected $hasIdRequest = array(); protected $libwarning = array(); + /** + * alignment names + * + * @var array + */ + protected $alignmentOptions = array(1 => 'left', 2 => 'right', 3 => 'fullwidth', 4 => 'above', 5 => 'under', 6 => 'leftside', 7 => 'rightside'); + /** * Constructor */ @@ -7445,219 +7452,39 @@ class Interpretation extends Fields return ''; } + /** + * set Edit Body + * + * @param array $view The view data + * + * @return string The edit body + * + */ public function setEditBody(&$view) { // set view name - $viewName_single = ComponentbuilderHelper::safeString($view['settings']->name_single); - // alignment - $alignmentNames = array(1 => 'left', 2 => 'right', 3 => 'fullwidth', 4 => 'above', 5 => 'under', 6 => 'leftside', 7 => 'rightside'); + $view_name_single = ComponentbuilderHelper::safeString($view['settings']->name_single); // main lang prefix - $langView = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($viewName_single, 'U'); - - if (isset($this->layoutBuilder[$viewName_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$viewName_single])) + $langView = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($view_name_single, 'U'); + // check if the load build is set for this view + if (isset($this->layoutBuilder[$view_name_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$view_name_single])) { - // set the linked view tabs - $linkedTab = array(); + // reset the linked keys $keys = array(); - // setup correct core target - $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) - { - $core = $this->permissionCore[$viewName_single]; - $coreLoad = true; - } - if (isset($this->linkedAdminViews[$viewName_single]) && ComponentbuilderHelper::checkArray($this->linkedAdminViews[$viewName_single])) - { - foreach ($this->linkedAdminViews[$viewName_single] as $linkedView) - { - $tabName = $view['settings']->tabs[(int) $linkedView['tab']]; - $this->tabCounter[$viewName_single][$linkedView['tab']] = $tabName; - $linkedTab[$linkedView['adminview']] = $linkedView['tab']; - if (ComponentbuilderHelper::checkString($linkedView['key']) && ComponentbuilderHelper::checkString($linkedView['parentkey'])) - { - $keys[$linkedView['adminview']] = array('key' => $linkedView['key'], 'parentKey' => $linkedView['parentkey']); - } - else - { - $keys[$linkedView['adminview']] = array('key' => null, 'parentKey' => null); - } - if (isset($linkedView['addnew'])) - { - $keys[$linkedView['adminview']]['addNewButton'] = (int) $linkedView['addnew']; - } - else - { - $keys[$linkedView['adminview']]['addNewButton'] = 0; - } - } - } + $linkedViewIdentifier = array(); + // set the linked view tabs + $linkedTab = $this->getEditBodyLinkedAdminViewsTabs($view, $view_name_single, $keys, $linkedViewIdentifier); // custom tab searching array $searchTabs = array(); - // start tab set - $bucket = array(); + // reset tab values $leftside = ''; $rightside = ''; $footer = ''; $header = ''; $mainwidth = 12; $sidewidth = 0; - // sort the tabs based on key order - ksort($this->tabCounter[$viewName_single]); - // start tab builinging loop - foreach ($this->tabCounter[$viewName_single] as $tabNr => $tabName) - { - $tabWidth = 12; - $lrCounter = 0; - // set tab lang - $tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U'); - // set tab code name - $tabCodeName = ComponentbuilderHelper::safeString($tabName); - /// set the values to use in search latter - $searchTabs[$tabCodeName] = $tabNr; - // add to lang array - if (!isset($this->langContent[$this->lang][$tabLangName])) - { - $this->langContent[$this->lang][$tabLangName] = $tabName; - } - // check if linked view belongs to this tab - $buildLayout = true; - $linkedViewId = ''; - if (ComponentbuilderHelper::checkArray($linkedTab)) - { - if (($linkedViewId = array_search($tabNr, $linkedTab)) !== false) - { - // don't build - $buildLayout = false; - } - } - // build layout since just fields - if ($buildLayout) - { - // sort to make sure it loads left first - $alignments = $this->layoutBuilder[$viewName_single][$tabName]; - ksort($alignments); - foreach ($alignments as $alignment => $names) - { - // set layout code name - $layoutCodeName = $tabCodeName . '_' . $alignmentNames[$alignment]; - // reset each time - $items = ''; - $itemCounter = 0; - // sort the names based on order of keys - ksort($names); - // build the items array for this alignment - foreach ($names as $nr => $name) - { - if ($itemCounter == 0) - { - $items .= "'" . $name . "'"; - } - else - { - $items .= "," . PHP_EOL . $this->_t(1) . "'" . $name . "'"; - } - $itemCounter++; - } - // based on alignment build the layout - switch ($alignment) - { - case 1: // left - case 2: // right - // count - $lrCounter++; - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutitems'); - // set the lang to tab - $bucket[$tabCodeName]['lang'] = $tabLangName; - // load the body - if (!isset($bucket[$tabCodeName][(int) $alignment])) - { - $bucket[$tabCodeName][(int) $alignment] = ''; - } - $bucket[$tabCodeName][(int) $alignment] .= ""; - break; - case 3: // fullwidth - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutfull'); - // set the lang to tab - $bucket[$tabCodeName]['lang'] = $tabLangName; - // load the body - if (!isset($bucket[$tabCodeName][(int) $alignment])) - { - $bucket[$tabCodeName][(int) $alignment] = ''; - } - $bucket[$tabCodeName][(int) $alignment] .= ""; - break; - case 4: // above - // set as title layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layouttitle'); - // load to header - $header .= PHP_EOL . $this->_t(1) . ""; - break; - case 5: // under - // set as title layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layouttitle'); - // load to footer - $footer .= PHP_EOL . PHP_EOL . "
" . PHP_EOL . ""; - break; - case 6: // left side - $tabWidth = $tabWidth - 2; - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutitems'); - // load the body - $leftside .= PHP_EOL . $this->_t(1) . ""; - break; - case 7: // right side - $tabWidth = $tabWidth - 2; - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutitems'); - // load the body - $rightside .= PHP_EOL . $this->_t(1) . ""; - break; - } - } - } - else - { - // set layout code name - $layoutCodeName = $tabCodeName . '_fullwidth'; - // set identifiers - $linkedViewIdentifier[$linkedViewId] = $tabCodeName; - //set function name - $codeName = ComponentbuilderHelper::safeString($this->uniquekey(3) . $tabCodeName); - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $codeName, 'layoutlinkedview'); - // set the lang to tab - $bucket[$tabCodeName]['lang'] = $tabLangName; - // set all the linked view stuff - $this->secondRunAdmin['setLinkedView'][] = array( - 'viewId' => $linkedViewId, - 'viewName_single' => $viewName_single, - 'codeName' => $codeName, - 'layoutCodeName' => $layoutCodeName, - 'key' => $keys[$linkedViewId]['key'], - 'parentKey' => $keys[$linkedViewId]['parentKey'], - 'addNewButon' => $keys[$linkedViewId]['addNewButton']); - // load the body - if (!isset($bucket[$tabCodeName][3])) - { - $bucket[$tabCodeName][3] = ''; - } - $bucket[$tabCodeName][3] .= ""; - } - // width calculator :) - if ($tabWidth == 8) - { - $mainwidth = 8; - $sidewidth = 2; - } - elseif ($tabWidth == 10 && $mainwidth != 8) - { - $mainwidth = 9; - $sidewidth = 3; - } - $bucket[$tabCodeName]['lr'] = $lrCounter; - } + // get the tabs with positions + $tabBucket = $this->getEditBodyTabs($view_name_single, $langView, $linkedTab, $keys, $linkedViewIdentifier, $searchTabs, $leftside, $rightside, $footer, $header, $mainwidth, $sidewidth); // tab counter $tabCounter = 0; // check if width is still 12 @@ -7672,64 +7499,28 @@ class Interpretation extends Fields { $body .= PHP_EOL . $this->_t(1) . '
'; } - // now build the template - foreach ($bucket as $tabCodeName => $posions) + // now build the dynamic tabs + foreach ($tabBucket as $tabCodeName => $positions) { - // check main if both left and right is set - $lrCounter = $posions['lr']; // get lang string - $tabLangName = $posions['lang']; - // build main center + $tabLangName = $positions['lang']; + // build main center position $main = ''; $mainbottom = ''; - foreach ($posions as $posion => $string) - { - if ($lrCounter == 2) - { - switch ($posion) - { - case 1: // left - case 2: // right - $main .= PHP_EOL . $this->_t(3) . '
'; - $main .= PHP_EOL . $this->_t(4) . $string; - $main .= PHP_EOL . $this->_t(3) . '
'; - break; - } - } - else - { - switch ($posion) - { - case 1: // left - case 2: // right - $main .= PHP_EOL . $this->_t(3) . '
'; - $main .= PHP_EOL . $this->_t(4) . $string; - $main .= PHP_EOL . $this->_t(3) . '
'; - break; - } - } - switch ($posion) - { - case 3: // fullwidth - $mainbottom .= PHP_EOL . $this->_t(3) . '
'; - $mainbottom .= PHP_EOL . $this->_t(4) . $string; - $mainbottom .= PHP_EOL . $this->_t(3) . '
'; - break; - } - } - // set acctive tab + $this->setEditBodyTabMainCenterPositionDiv($main, $mainbottom, $positions); + // set acctive tab (must be in side foreach loop to get active tab code name) if ($tabCounter == 0) { - $body .= PHP_EOL . PHP_EOL . $this->_t(1) . " '" . $tabCodeName . "')); ?>"; + $body .= PHP_EOL . PHP_EOL . $this->_t(1) . " '" . $tabCodeName . "')); ?>"; } // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $viewName_single, 1)) !== false) + if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $view_name_single, 1)) !== false) { $body .= $_customTabHTML; } // if this is a linked view set permissions $closeIT = false; - if (isset($linkedViewIdentifier) && ComponentbuilderHelper::checkArray($linkedViewIdentifier) && in_array($tabCodeName, $linkedViewIdentifier)) + if (ComponentbuilderHelper::checkArray($linkedViewIdentifier) && in_array($tabCodeName, $linkedViewIdentifier)) { // get view name $linkedViewId = array_search($tabCodeName, $linkedViewIdentifier); @@ -7759,12 +7550,13 @@ class Interpretation extends Fields { $body .= PHP_EOL; } - // start tab - $body .= PHP_EOL . $this->_t(1) . ""; + // start addtab body + $body .= PHP_EOL . $this->_t(1) . ""; // add the main $body .= PHP_EOL . $this->_t(2) . '
'; $body .= $main; $body .= PHP_EOL . $this->_t(2) . "
"; + // add main body bottom div if needed if (strlen($mainbottom) > 0) { // add the main bottom @@ -7772,255 +7564,38 @@ class Interpretation extends Fields $body .= $mainbottom; $body .= PHP_EOL . $this->_t(2) . "
"; } + // end addtab body $body .= PHP_EOL . $this->_t(1) . ""; + // if we had permissions added if ($closeIT) { $body .= PHP_EOL . $this->_t(1) . ""; } // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $viewName_single, 2)) !== false) + if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $view_name_single, 2)) !== false) { $body .= $_customTabHTML; } // set counter $tabCounter++; } - // add option to load forms loded in via plugins (TODO) we may want to move these tab locations + // add option to load forms loaded in via plugins (TODO) we may want to move these tab locations $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>"; - $body .= PHP_EOL . $this->_t(1) . "tab_name = '" . $viewName_single . "Tab'; ?>"; + $body .= PHP_EOL . $this->_t(1) . "tab_name = '" . $view_name_single . "Tab'; ?>"; $body .= PHP_EOL . $this->_t(1) . ""; - // set default publishing tab lang - $tabLangName = $langView . '_PUBLISHING'; - // add to lang array - if (!isset($this->langContent[$this->lang][$tabLangName])) - { - $this->langContent[$this->lang][$tabLangName] = 'Publishing'; - } - // the default publishing items - $items = array('left' => array(), 'right' => array()); - // Setup the default (custom) fields - // only load (1 => 'left', 2 => 'right') - $fieldsAddedRight = false; - if (isset($this->newPublishingFields[$viewName_single])) - { - foreach ($this->newPublishingFields[$viewName_single] as $df_alignment => $df_items) - { - foreach ($df_items as $df_order => $df_name) - { - if ($df_alignment == 2 || $df_alignment == 1) - { - $items[$alignmentNames[$df_alignment]][$df_order] = $df_name; - } - else - { - $this->app->enqueueMessage(JText::_('

Field Warning

'), 'Warning'); - $this->app->enqueueMessage(JText::sprintf('Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $alignmentNames[$df_alignment], $viewName_single), 'Warning'); - } - } - } - // set switch to trigger notice if custom fields added to right - if (ComponentbuilderHelper::checkArray($items['right'])) - { - $fieldsAddedRight = true; - } - } - // load all defaults - $loadDefaultFields = array( - 'left' => array('created', 'created_by', 'modified', 'modified_by'), - 'right' => array('published', 'ordering', 'access', 'version', 'hits', 'id') - ); - foreach ($loadDefaultFields as $d_alignment => $defaultFields) - { - foreach ($defaultFields as $defaultField) - { - if (!isset($this->movedPublishingFields[$viewName_single][$defaultField])) - { - if ($defaultField != 'access') - { - $items[$d_alignment][] = $defaultField; - } - elseif ($defaultField === 'access' && isset($this->accessBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName_single])) - { - $items[$d_alignment][] = $defaultField; - } - } - } - } - // check if metadata is added to this view - if (isset($this->metadataBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$viewName_single])) - { - // set default publishing tab code name - $tabCodeNameLeft = 'publishing'; - $tabCodeNameRight = 'metadata'; - // the default publishing tiems - if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) - { - $items_one = ''; - // load the items into one side - if (ComponentbuilderHelper::checkArray($items['left'])) - { - $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; - } - if (ComponentbuilderHelper::checkArray($items['right'])) - { - // there is already fields just add these - if (strlen($items_one) > 3) - { - $items_one .= "," . PHP_EOL . $this->_t(1) . "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; - } - // no fields has been added yet - else - { - $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; - } - } - // only triger the info notice if there were custom fields targeted to the right alignment position. - if ($fieldsAddedRight) - { - $this->app->enqueueMessage(JText::_('

Field Notice

'), 'Notice'); - $this->app->enqueueMessage(JText::sprintf('Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', $viewName_single), 'Notice'); - } - // set the publishing layout - $this->setLayout($viewName_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); - $items_one = true; - } - else - { - $items_one = false; - } - // set the metadata layout - $this->setLayout($viewName_single, $tabCodeNameRight, false, 'layoutmetadata'); - $items_two = true; - } - else - { - // set default publishing tab code name - $tabCodeNameLeft = 'publishing'; - $tabCodeNameRight = 'publlshing'; - // the default publishing tiems - if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) - { - // load left items that remain - if (ComponentbuilderHelper::checkArray($items['left'])) - { - // load all items - $items_one = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; - // set the publishing layout - $this->setLayout($viewName_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); - $items_one = true; - } - // load right items that remain - if (ComponentbuilderHelper::checkArray($items['right'])) - { - // load all items - $items_two = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; - // set the publishing layout - $this->setLayout($viewName_single, $tabCodeNameRight, $items_two, 'layoutpublished'); - $items_two = true; - } - } - else - { - $items_one = false; - $items_two = false; - } - } - if ($items_one && $items_two) - { - $classs = "span6"; - } - elseif ($items_one || $items_two) - { - $classs = "span12"; - } - // only load this if needed - 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) - { - if ($coreLoad && isset($core[$core_permission]) && isset($this->permissionBuilder['global'][$core[$core_permission]]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core[$core_permission]]) && in_array($viewName_single, $this->permissionBuilder['global'][$core[$core_permission]])) - { - // set permissions. - $publishingPer[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; - } - else - { - // set permissions. - $publishingPer[] = "\$this->canDo->get('" . $core_permission . "')"; - } - } - // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs(15, $viewName_single, 1)) !== false) - { - $body .= $_customTabHTML; - } - $body .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; - // set the default publishing tab - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(2) . '
'; - if ($items_one) - { - $body .= PHP_EOL . $this->_t(3) . '
'; - $body .= PHP_EOL . $this->_t(4) . ""; - $body .= PHP_EOL . $this->_t(3) . "
"; - } - if ($items_two) - { - $body .= PHP_EOL . $this->_t(3) . '
'; - $body .= PHP_EOL . $this->_t(4) . ""; - $body .= PHP_EOL . $this->_t(3) . "
"; - } - $body .= PHP_EOL . $this->_t(2) . "
"; - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(1) . ""; - // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs(15, $viewName_single, 2)) !== false) - { - $body .= $_customTabHTML; - } - } - // make sure we dont load it to a view with the name component - if ($viewName_single != 'component') - { - // set permissions tab lang - $tabLangName = $langView . '_PERMISSION'; - // set permissions tab code name - $tabCodeName = 'permissions'; - // add to lang array - if (!isset($this->langContent[$this->lang][$tabLangName])) - { - $this->langContent[$this->lang][$tabLangName] = 'Permissions'; - } - // set the permissions tab - $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "canDo->get('core.admin')) : ?>"; - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(2) . '
'; - $body .= PHP_EOL . $this->_t(3) . '
'; - $body .= PHP_EOL . $this->_t(4) . '
'; - $body .= PHP_EOL . $this->_t(5) . '
'; - $body .= PHP_EOL . $this->_t(5) . "form->getFieldset('accesscontrol') as \$field): ?>"; - $body .= PHP_EOL . $this->_t(6) . "
"; - $body .= PHP_EOL . $this->_t(7) . "label; echo \$field->input;?>"; - $body .= PHP_EOL . $this->_t(6) . "
"; - $body .= PHP_EOL . $this->_t(6) . '
'; - $body .= PHP_EOL . $this->_t(5) . ""; - $body .= PHP_EOL . $this->_t(5) . "
"; - $body .= PHP_EOL . $this->_t(4) . "
"; - $body .= PHP_EOL . $this->_t(3) . "
"; - $body .= PHP_EOL . $this->_t(2) . "
"; - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(1) . ""; - } + // add the publish and meta data tabs + $body .= $this->getEditBodyPublishMetaTabs($view_name_single, $langView); // end the tab set $body .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "
"; - $body .= PHP_EOL . $this->_t(2) . ''; + $body .= PHP_EOL . $this->_t(2) . ''; $body .= PHP_EOL . $this->_t(2) . ""; $body .= PHP_EOL . $this->_t(1) . "
"; - $body .= PHP_EOL . $this->_t(1) . ""; + // close divs + if (ComponentbuilderHelper::checkString($span)) + { + $body .= PHP_EOL . $this->_t(1) . ""; + } $body .= PHP_EOL . ""; // check if left has been set if (strlen($leftside) > 0) @@ -8046,6 +7621,536 @@ class Interpretation extends Fields return ''; } + /** + * get Edit Body Linked Admin Views + * + * @param array $view The view data + * @param string $view_name_single The single view name + * @param array $keys The tabs to add in layout + * @param array $linkedViewIdentifier The linked view identifier + * + * @return array The linked Admin Views tabs + * + */ + protected function getEditBodyLinkedAdminViewsTabs(&$view, &$view_name_single, &$keys, &$linkedViewIdentifier) + { + // start linked tabs bucket + $linkedTab = array(); + // check if the view has linked admin view + if (isset($this->linkedAdminViews[$view_name_single]) && ComponentbuilderHelper::checkArray($this->linkedAdminViews[$view_name_single])) + { + foreach ($this->linkedAdminViews[$view_name_single] as $linkedView) + { + // get the tab name + $tabName = $view['settings']->tabs[(int) $linkedView['tab']]; + // update the tab counter + $this->tabCounter[$view_name_single][$linkedView['tab']] = $tabName; + // add the linked view + $linkedTab[$linkedView['adminview']] = $linkedView['tab']; + // set the keys if values are set + if (ComponentbuilderHelper::checkString($linkedView['key']) && ComponentbuilderHelper::checkString($linkedView['parentkey'])) + { + $keys[$linkedView['adminview']] = array('key' => $linkedView['key'], 'parentKey' => $linkedView['parentkey']); + } + else + { + $keys[$linkedView['adminview']] = array('key' => null, 'parentKey' => null); + } + // set the button switches + if (isset($linkedView['addnew'])) + { + $keys[$linkedView['adminview']]['addNewButton'] = (int) $linkedView['addnew']; + } + else + { + $keys[$linkedView['adminview']]['addNewButton'] = 0; + } + } + } + return $linkedTab; + } + + /** + * get Edit Body Tabs + * + * @param string $view_name_single The single view name + * @param string $langView The main lang prefix + * @param array $linkedTab The linked admin view tabs + * @param array $keys The tabs to add in layout + * @param array $linkedViewIdentifier The linked view identifier + * @param array $searchTabs The tabs to add in layout + * @param string $leftside The left side html string + * @param string $rightside The right side html string + * @param string $footer The footer html string + * @param string $header The header html string + * @param int $mainwidth The main width value + * @param int $sidewidth The side width value + * + * @return array The linked tabs + * + */ + protected function getEditBodyTabs(&$view_name_single, &$langView, &$linkedTab, &$keys, &$linkedViewIdentifier, &$searchTabs, &$leftside, &$rightside, &$footer, &$header, &$mainwidth, &$sidewidth) + { + // start tabs + $tabs = array(); + // sort the tabs based on key order + ksort($this->tabCounter[$view_name_single]); + // start tab builinging loop + foreach ($this->tabCounter[$view_name_single] as $tabNr => $tabName) + { + $tabWidth = 12; + $lrCounter = 0; + // set tab lang + $tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U'); + // set tab code name + $tabCodeName = ComponentbuilderHelper::safeString($tabName); + /// set the values to use in search latter + $searchTabs[$tabCodeName] = $tabNr; + // add to lang array + if (!isset($this->langContent[$this->lang][$tabLangName])) + { + $this->langContent[$this->lang][$tabLangName] = $tabName; + } + // check if linked view belongs to this tab + $buildLayout = true; + $linkedViewId = ''; + if (ComponentbuilderHelper::checkArray($linkedTab)) + { + if (($linkedViewId = array_search($tabNr, $linkedTab)) !== false) + { + // don't build (since this is a linked view) + $buildLayout = false; + } + } + // build layout these are actual fields + if ($buildLayout) + { + // sort to make sure it loads left first + $alignments = $this->layoutBuilder[$view_name_single][$tabName]; + ksort($alignments); + foreach ($alignments as $alignment => $names) + { + // set layout code name + $layoutCodeName = $tabCodeName . '_' . $this->alignmentOptions[$alignment]; + // reset each time + $items = ''; + $itemCounter = 0; + // sort the names based on order of keys + ksort($names); + // build the items array for this alignment + foreach ($names as $nr => $name) + { + if ($itemCounter == 0) + { + $items .= "'" . $name . "'"; + } + else + { + $items .= "," . PHP_EOL . $this->_t(1) . "'" . $name . "'"; + } + $itemCounter++; + } + // based on alignment build the layout + switch ($alignment) + { + case 1: // left + case 2: // right + // count + $lrCounter++; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // load the body + if (!isset($tabs[$tabCodeName][(int) $alignment])) + { + $tabs[$tabCodeName][(int) $alignment] = ''; + } + $tabs[$tabCodeName][(int) $alignment] .= ""; + break; + case 3: // fullwidth + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutfull'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // load the body + if (!isset($tabs[$tabCodeName][(int) $alignment])) + { + $tabs[$tabCodeName][(int) $alignment] = ''; + } + $tabs[$tabCodeName][(int) $alignment] .= ""; + break; + case 4: // above + // set as title layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layouttitle'); + // load to header + $header .= PHP_EOL . $this->_t(1) . ""; + break; + case 5: // under + // set as title layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layouttitle'); + // load to footer + $footer .= PHP_EOL . PHP_EOL . "
" . PHP_EOL . ""; + break; + case 6: // left side + $tabWidth = $tabWidth - 2; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // load the body + $leftside .= PHP_EOL . $this->_t(1) . ""; + break; + case 7: // right side + $tabWidth = $tabWidth - 2; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // load the body + $rightside .= PHP_EOL . $this->_t(1) . ""; + break; + } + } + } + else + { + // set layout code name + $layoutCodeName = $tabCodeName . '_fullwidth'; + // set identifiers + $linkedViewIdentifier[$linkedViewId] = $tabCodeName; + //set function name + $codeName = ComponentbuilderHelper::safeString($this->uniquekey(3) . $tabCodeName); + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $codeName, 'layoutlinkedview'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // set all the linked view stuff + $this->secondRunAdmin['setLinkedView'][] = array( + 'viewId' => $linkedViewId, + 'view_name_single' => $view_name_single, + 'codeName' => $codeName, + 'layoutCodeName' => $layoutCodeName, + 'key' => $keys[$linkedViewId]['key'], + 'parentKey' => $keys[$linkedViewId]['parentKey'], + 'addNewButon' => $keys[$linkedViewId]['addNewButton']); + // load the body + if (!isset($tabs[$tabCodeName][3])) + { + $tabs[$tabCodeName][3] = ''; + } + $tabs[$tabCodeName][3] .= ""; + } + // width calculator :) + if ($tabWidth == 8) + { + $mainwidth = 8; + $sidewidth = 2; + } + elseif ($tabWidth == 10 && $mainwidth != 8) + { + $mainwidth = 9; + $sidewidth = 3; + } + $tabs[$tabCodeName]['lr'] = $lrCounter; + } + return $tabs; + } + + /** + * set Edit Body Main Center Positions Div + * + * @param string $main The main position of this tab + * @param string $mainbottom The main bottom position of this tab + * @param array $positions The build positions of this tab + * + * @return array The linked Admin Views tabs + * + */ + protected function setEditBodyTabMainCenterPositionDiv(&$main, &$mainbottom, &$positions) + { + foreach ($positions as $position => $string) + { + if ($positions['lr'] == 2) + { + switch ($position) + { + case 1: // left + case 2: // right + $main .= PHP_EOL . $this->_t(3) . '
'; + $main .= PHP_EOL . $this->_t(4) . $string; + $main .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + else + { + switch ($position) + { + case 1: // left + case 2: // right + $main .= PHP_EOL . $this->_t(3) . '
'; + $main .= PHP_EOL . $this->_t(4) . $string; + $main .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + switch ($position) + { + case 3: // fullwidth + $mainbottom .= PHP_EOL . $this->_t(3) . '
'; + $mainbottom .= PHP_EOL . $this->_t(4) . $string; + $mainbottom .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + } + + /** + * get Edit Body Publish and Meta Tab + * + * @param string $view_name_single The single view name + * @param string $langView The main lang prefix + * + * @return string The published and Meta Data Tabs + * + */ + protected function getEditBodyPublishMetaTabs(&$view_name_single, &$langView) + { + // build the two tabs + $tabs = ''; + // set default publishing tab lang + $tabLangName = $langView . '_PUBLISHING'; + // add to lang array + if (!isset($this->langContent[$this->lang][$tabLangName])) + { + $this->langContent[$this->lang][$tabLangName] = 'Publishing'; + } + // the default publishing items + $items = array('left' => array(), 'right' => array()); + // Setup the default (custom) fields + // only load (1 => 'left', 2 => 'right') + $fieldsAddedRight = false; + if (isset($this->newPublishingFields[$view_name_single])) + { + foreach ($this->newPublishingFields[$view_name_single] as $df_alignment => $df_items) + { + foreach ($df_items as $df_order => $df_name) + { + if ($df_alignment == 2 || $df_alignment == 1) + { + $items[$this->alignmentOptions[$df_alignment]][$df_order] = $df_name; + } + else + { + $this->app->enqueueMessage(JText::_('

Field Warning

'), 'Warning'); + $this->app->enqueueMessage(JText::sprintf('Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $this->alignmentOptions[$df_alignment], $view_name_single), 'Warning'); + } + } + } + // set switch to trigger notice if custom fields added to right + if (ComponentbuilderHelper::checkArray($items['right'])) + { + $fieldsAddedRight = true; + } + } + // load all defaults + $loadDefaultFields = array( + 'left' => array('created', 'created_by', 'modified', 'modified_by'), + 'right' => array('published', 'ordering', 'access', 'version', 'hits', 'id') + ); + foreach ($loadDefaultFields as $d_alignment => $defaultFields) + { + foreach ($defaultFields as $defaultField) + { + if (!isset($this->movedPublishingFields[$view_name_single][$defaultField])) + { + if ($defaultField != 'access') + { + $items[$d_alignment][] = $defaultField; + } + elseif ($defaultField === 'access' && isset($this->accessBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view_name_single])) + { + $items[$d_alignment][] = $defaultField; + } + } + } + } + // check if metadata is added to this view + if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) + { + // set default publishing tab code name + $tabCodeNameLeft = 'publishing'; + $tabCodeNameRight = 'metadata'; + // the default publishing tiems + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) + { + $items_one = ''; + // load the items into one side + if (ComponentbuilderHelper::checkArray($items['left'])) + { + $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; + } + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // there is already fields just add these + if (strlen($items_one) > 3) + { + $items_one .= "," . PHP_EOL . $this->_t(1) . "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + } + // no fields has been added yet + else + { + $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + } + } + // only triger the info notice if there were custom fields targeted to the right alignment position. + if ($fieldsAddedRight) + { + $this->app->enqueueMessage(JText::_('

Field Notice

'), 'Notice'); + $this->app->enqueueMessage(JText::sprintf('Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', $view_name_single), 'Notice'); + } + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); + $items_one = true; + } + else + { + $items_one = false; + } + // set the metadata layout + $this->setLayout($view_name_single, $tabCodeNameRight, false, 'layoutmetadata'); + $items_two = true; + } + else + { + // set default publishing tab code name + $tabCodeNameLeft = 'publishing'; + $tabCodeNameRight = 'publlshing'; + // the default publishing tiems + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) + { + // load left items that remain + if (ComponentbuilderHelper::checkArray($items['left'])) + { + // load all items + $items_one = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); + $items_one = true; + } + // load right items that remain + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // load all items + $items_two = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameRight, $items_two, 'layoutpublished'); + $items_two = true; + } + } + else + { + $items_one = false; + $items_two = false; + } + } + if ($items_one && $items_two) + { + $classs = "span6"; + } + elseif ($items_one || $items_two) + { + $classs = "span12"; + } + // setup correct core target + $coreLoad = false; + if (isset($this->permissionCore[$view_name_single])) + { + $core = $this->permissionCore[$view_name_single]; + $coreLoad = true; + } + // only load this if needed + 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) + { + 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. + $publishingPer[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; + } + else + { + // set permissions. + $publishingPer[] = "\$this->canDo->get('" . $core_permission . "')"; + } + } + // check if custom tab must be added + if (($_customTabHTML = $this->addCustomTabs(15, $view_name_single, 1)) !== false) + { + $tabs .= $_customTabHTML; + } + $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; + // set the default publishing tab + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(2) . '
'; + if ($items_one) + { + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . ""; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + } + if ($items_two) + { + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . ""; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + } + $tabs .= PHP_EOL . $this->_t(2) . "
"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(1) . ""; + // check if custom tab must be added + if (($_customTabHTML = $this->addCustomTabs(15, $view_name_single, 2)) !== false) + { + $tabs .= $_customTabHTML; + } + } + + // make sure we dont load it to a view with the name component (as this will cause conflict with Joomla conventions) + if ($view_name_single != 'component') + { + // set permissions tab lang + $tabLangName = $langView . '_PERMISSION'; + // set permissions tab code name + $tabCodeName = 'permissions'; + // add to lang array + if (!isset($this->langContent[$this->lang][$tabLangName])) + { + $this->langContent[$this->lang][$tabLangName] = 'Permissions'; + } + // set the permissions tab + $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . "canDo->get('core.admin')) : ?>"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(2) . '
'; + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . "form->getFieldset('accesscontrol') as \$field): ?>"; + $tabs .= PHP_EOL . $this->_t(6) . "
"; + $tabs .= PHP_EOL . $this->_t(7) . "label; echo \$field->input;?>"; + $tabs .= PHP_EOL . $this->_t(6) . "
"; + $tabs .= PHP_EOL . $this->_t(6) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . ""; + $tabs .= PHP_EOL . $this->_t(5) . "
"; + $tabs .= PHP_EOL . $this->_t(4) . "
"; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + $tabs .= PHP_EOL . $this->_t(2) . "
"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(1) . ""; + } + return $tabs; + } + protected function addCustomTabs($nr, $name_single, $target) { // check if this view is having custom tabs @@ -8143,7 +8248,7 @@ class Interpretation extends Fields { /** * @var $viewId - * @var $viewName_single + * @var $view_name_single * @var $codeName * @var $layoutCodeName * @var $key @@ -8164,16 +8269,16 @@ class Interpretation extends Fields } if (ComponentbuilderHelper::checkString($single) && ComponentbuilderHelper::checkString($list)) { - $head = $this->setListHeadLinked($single, $list, $addNewButon, $viewName_single); - $body = $this->setListBodyLinked($single, $list, $viewName_single); + $head = $this->setListHeadLinked($single, $list, $addNewButon, $view_name_single); + $body = $this->setListBodyLinked($single, $list, $view_name_single); $functionName = ComponentbuilderHelper::safeString($codeName, 'F'); // LAYOUTITEMSTABLE <<>> - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; // LAYOUTITEMSHEADER <<>> $headerscript = '//' . $this->setLine(__LINE__) . ' set the edit URL'; $headerscript .= PHP_EOL . '$edit = "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $list . '&task=' . $single . '.edit";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set a return value'; - $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $viewName_single . '&layout=edit&id=" . $id : "";'; + $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $view_name_single . '&layout=edit&id=" . $id : "";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' check for a return value'; $headerscript .= PHP_EOL . '$jinput = JFactory::getApplication()->input;'; $headerscript .= PHP_EOL . "if (\$_return = \$jinput->get('return', null, 'base64'))"; @@ -8184,11 +8289,11 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . 'if (' . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::checkString($return))'; $headerscript .= PHP_EOL . '{'; $headerscript .= PHP_EOL . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' set the referral values'; - $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $viewName_single . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; + $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $view_name_single . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; $headerscript .= PHP_EOL . '}'; $headerscript .= PHP_EOL . 'else'; $headerscript .= PHP_EOL . '{'; - $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $viewName_single . '&refid=" . $id : "";'; + $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $view_name_single . '&refid=" . $id : "";'; $headerscript .= PHP_EOL . '}'; if ($addNewButon > 0) { @@ -8207,11 +8312,11 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' load the action object'; $headerscript .= PHP_EOL . '$can = ' . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::getActions(' . "'" . $single . "'" . ');'; } - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; // LINKEDVIEWITEMS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . $this->_t(2) . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . $this->_t(2) . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; // LINKEDVIEWTABLESCRIPTS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); if (strpos($parentKey, '-R>') !== false || strpos($parentKey, '-A>') !== false) { list($parent_key) = explode('-', $parentKey); @@ -8245,22 +8350,22 @@ class Interpretation extends Fields foreach ($parent_keys as $parent_key) { $globalKey[$parent_key] = ComponentbuilderHelper::safeString($_key . $this->uniquekey(4)); - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key . ";"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key . ";"; } } else { // set the global key $globalKey = ComponentbuilderHelper::safeString($_key . $this->uniquekey(4)); - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; } // LINKEDVIEWMETHODS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked($single, $list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey); + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked($single, $list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey); } else { - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; } } @@ -10870,14 +10975,14 @@ class Interpretation extends Fields $type = ComponentbuilderHelper::safeString($filter['custom']['type'], 'F'); $otherFilter[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Set " . $CodeName . " Selection"; $otherFilter[] = $this->_t(2) . "\$this->" . $codeName . "Options = JFormHelper::loadFieldType('" . $type . "')->options;"; - $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " We do some sanitation for " . $Codename . " filter"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " We do some sanitation for " . $CodeName . " filter"; $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $codeName . "Options) &&"; $otherFilter[] = $this->_t(3) . "isset(\$this->" . $codeName . "Options[0]->value) &&"; $otherFilter[] = $this->_t(3) . "!" . $Component . "Helper::checkString(\$this->" . $codeName . "Options[0]->value))"; $otherFilter[] = $this->_t(2) . "{"; $otherFilter[] = $this->_t(3) . "unset(\$this->" . $codeName . "Options[0]);"; $otherFilter[] = $this->_t(2) . "}"; - $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load " . $Codename . " filter if it has values"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load " . $CodeName . " filter if it has values"; $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $codeName . "Options))"; $otherFilter[] = $this->_t(2) . "{"; $otherFilter[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " " . $CodeName . " Filter"; diff --git a/admin/views/admin_custom_tabs/tmpl/edit.php b/admin/views/admin_custom_tabs/tmpl/edit.php index f60c56f96..1c79ba18f 100644 --- a/admin/views/admin_custom_tabs/tmpl/edit.php +++ b/admin/views/admin_custom_tabs/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index 3b67bf0c1..278221f6f 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index bcf801c43..35293dbf6 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields_relations/tmpl/edit.php b/admin/views/admin_fields_relations/tmpl/edit.php index 8c3d119f5..732d6d559 100644 --- a/admin/views/admin_fields_relations/tmpl/edit.php +++ b/admin/views/admin_fields_relations/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 5fcfeeae8..9e7213dcc 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -199,7 +199,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/component_admin_views/tmpl/edit.php b/admin/views/component_admin_views/tmpl/edit.php index 2d2638c9b..6cd2c6d48 100644 --- a/admin/views/component_admin_views/tmpl/edit.php +++ b/admin/views/component_admin_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_config/tmpl/edit.php b/admin/views/component_config/tmpl/edit.php index 146a68db6..656539340 100644 --- a/admin/views/component_config/tmpl/edit.php +++ b/admin/views/component_config/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_custom_admin_menus/tmpl/edit.php b/admin/views/component_custom_admin_menus/tmpl/edit.php index 94a52643e..a6c005b35 100644 --- a/admin/views/component_custom_admin_menus/tmpl/edit.php +++ b/admin/views/component_custom_admin_menus/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_custom_admin_views/tmpl/edit.php b/admin/views/component_custom_admin_views/tmpl/edit.php index d07f1067a..b62b5dcee 100644 --- a/admin/views/component_custom_admin_views/tmpl/edit.php +++ b/admin/views/component_custom_admin_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index fc324dda5..6fbb3b9eb 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_files_folders/tmpl/edit.php b/admin/views/component_files_folders/tmpl/edit.php index 6a9c79eb6..1879c399a 100644 --- a/admin/views/component_files_folders/tmpl/edit.php +++ b/admin/views/component_files_folders/tmpl/edit.php @@ -111,7 +111,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_mysql_tweaks/tmpl/edit.php b/admin/views/component_mysql_tweaks/tmpl/edit.php index 67ac00d4b..9970e017b 100644 --- a/admin/views/component_mysql_tweaks/tmpl/edit.php +++ b/admin/views/component_mysql_tweaks/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_placeholders/tmpl/edit.php b/admin/views/component_placeholders/tmpl/edit.php index 0e7bcb08f..351192dcf 100644 --- a/admin/views/component_placeholders/tmpl/edit.php +++ b/admin/views/component_placeholders/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_site_views/tmpl/edit.php b/admin/views/component_site_views/tmpl/edit.php index b1027db93..536689b42 100644 --- a/admin/views/component_site_views/tmpl/edit.php +++ b/admin/views/component_site_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_updates/tmpl/edit.php b/admin/views/component_updates/tmpl/edit.php index e839286b4..4e44499ba 100644 --- a/admin/views/component_updates/tmpl/edit.php +++ b/admin/views/component_updates/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index 6a846c5d6..4e83cc5dc 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy // Set Main Get Name Selection $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; - // We do some sanitation for filter + // We do some sanitation for Main Get Name filter if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && isset($this->main_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) { unset($this->main_getNameOptions[0]); } - // Only load filter if it has values + // Only load Main Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->main_getNameOptions)) { // Main Get Name Filter diff --git a/admin/views/custom_code/tmpl/edit.php b/admin/views/custom_code/tmpl/edit.php index ef280be15..f8daef458 100644 --- a/admin/views/custom_code/tmpl/edit.php +++ b/admin/views/custom_code/tmpl/edit.php @@ -107,7 +107,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 08224edcc..db5ad1716 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy // Set Component System Name Selection $this->componentSystem_nameOptions = JFormHelper::loadFieldType('Component')->options; - // We do some sanitation for filter + // We do some sanitation for Component System Name filter if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions) && isset($this->componentSystem_nameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->componentSystem_nameOptions[0]->value)) { unset($this->componentSystem_nameOptions[0]); } - // Only load filter if it has values + // Only load Component System Name filter if it has values if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions)) { // Component System Name Filter diff --git a/admin/views/dynamic_get/tmpl/edit.php b/admin/views/dynamic_get/tmpl/edit.php index 24cb27a45..f1fb7a49a 100644 --- a/admin/views/dynamic_get/tmpl/edit.php +++ b/admin/views/dynamic_get/tmpl/edit.php @@ -150,7 +150,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 0c0e23432..c8d7469a8 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -138,7 +138,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index a6aa8de80..e630e565c 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -210,14 +210,14 @@ class ComponentbuilderViewFields extends JViewLegacy // Set Fieldtype Name Selection $this->fieldtypeNameOptions = JFormHelper::loadFieldType('Fieldtypes')->options; - // We do some sanitation for filter + // We do some sanitation for Fieldtype Name filter if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions) && isset($this->fieldtypeNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->fieldtypeNameOptions[0]->value)) { unset($this->fieldtypeNameOptions[0]); } - // Only load filter if it has values + // Only load Fieldtype Name filter if it has values if (ComponentbuilderHelper::checkArray($this->fieldtypeNameOptions)) { // Fieldtype Name Filter diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 70d7950b2..c7b73a222 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -130,7 +130,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 69d6aa117..9aa5e5226 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -107,7 +107,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index e6c9ffc39..f8c689ace 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -248,14 +248,14 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Set Admin View Selection $this->admin_viewOptions = JFormHelper::loadFieldType('Adminviewfolderlist')->options; - // We do some sanitation for Location filter + // We do some sanitation for Admin View filter if (ComponentbuilderHelper::checkArray($this->admin_viewOptions) && isset($this->admin_viewOptions[0]->value) && !ComponentbuilderHelper::checkString($this->admin_viewOptions[0]->value)) { unset($this->admin_viewOptions[0]); } - // Only load Location filter if it has values + // Only load Admin View filter if it has values if (ComponentbuilderHelper::checkArray($this->admin_viewOptions)) { // Admin View Filter @@ -278,14 +278,14 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy // Set Site View Selection $this->site_viewOptions = JFormHelper::loadFieldType('Siteviewfolderlist')->options; - // We do some sanitation for Location filter + // We do some sanitation for Site View filter if (ComponentbuilderHelper::checkArray($this->site_viewOptions) && isset($this->site_viewOptions[0]->value) && !ComponentbuilderHelper::checkString($this->site_viewOptions[0]->value)) { unset($this->site_viewOptions[0]); } - // Only load Location filter if it has values + // Only load Site View filter if it has values if (ComponentbuilderHelper::checkArray($this->site_viewOptions)) { // Site View Filter diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 9fb086a8d..e34b2ad7b 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -216,7 +216,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/language/tmpl/edit.php b/admin/views/language/tmpl/edit.php index 0cf99de05..1f7611150 100644 --- a/admin/views/language/tmpl/edit.php +++ b/admin/views/language/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/language_translation/tmpl/edit.php b/admin/views/language_translation/tmpl/edit.php index 18e8ac1f4..942618c09 100644 --- a/admin/views/language_translation/tmpl/edit.php +++ b/admin/views/language_translation/tmpl/edit.php @@ -100,7 +100,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 5073b0f94..1d5d0348e 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewLayouts extends JViewLegacy // Set Dynamic Get Name Selection $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; - // We do some sanitation for filter + // We do some sanitation for Dynamic Get Name filter if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && isset($this->dynamic_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) { unset($this->dynamic_getNameOptions[0]); } - // Only load filter if it has values + // Only load Dynamic Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions)) { // Dynamic Get Name Filter diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 750b54488..65f000fb1 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -183,14 +183,14 @@ class ComponentbuilderViewLibraries extends JViewLegacy // Set How Selection $this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->options; - // We do some sanitation for filter + // We do some sanitation for How filter if (ComponentbuilderHelper::checkArray($this->howOptions) && isset($this->howOptions[0]->value) && !ComponentbuilderHelper::checkString($this->howOptions[0]->value)) { unset($this->howOptions[0]); } - // Only load filter if it has values + // Only load How filter if it has values if (ComponentbuilderHelper::checkArray($this->howOptions)) { // How Filter diff --git a/admin/views/library/tmpl/edit.php b/admin/views/library/tmpl/edit.php index 18884165b..a3486484a 100644 --- a/admin/views/library/tmpl/edit.php +++ b/admin/views/library/tmpl/edit.php @@ -137,7 +137,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
diff --git a/admin/views/library_config/tmpl/edit.php b/admin/views/library_config/tmpl/edit.php index 05b4afd7a..fb54628a5 100644 --- a/admin/views/library_config/tmpl/edit.php +++ b/admin/views/library_config/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/library_files_folders_urls/tmpl/edit.php b/admin/views/library_files_folders_urls/tmpl/edit.php index 06150a6d3..0945a0a3f 100644 --- a/admin/views/library_files_folders_urls/tmpl/edit.php +++ b/admin/views/library_files_folders_urls/tmpl/edit.php @@ -111,7 +111,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/placeholder/tmpl/edit.php b/admin/views/placeholder/tmpl/edit.php index 7bfa7109d..86a95b352 100644 --- a/admin/views/placeholder/tmpl/edit.php +++ b/admin/views/placeholder/tmpl/edit.php @@ -106,7 +106,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/server/tmpl/edit.php b/admin/views/server/tmpl/edit.php index 649ae69c1..a31794b6f 100644 --- a/admin/views/server/tmpl/edit.php +++ b/admin/views/server/tmpl/edit.php @@ -119,7 +119,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index ed2558801..26fb9cbf2 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewSite_views extends JViewLegacy // Set Main Get Name Selection $this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options; - // We do some sanitation for filter + // We do some sanitation for Main Get Name filter if (ComponentbuilderHelper::checkArray($this->main_getNameOptions) && isset($this->main_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->main_getNameOptions[0]->value)) { unset($this->main_getNameOptions[0]); } - // Only load filter if it has values + // Only load Main Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->main_getNameOptions)) { // Main Get Name Filter diff --git a/admin/views/snippet/tmpl/edit.php b/admin/views/snippet/tmpl/edit.php index 155977b34..712485f5d 100644 --- a/admin/views/snippet/tmpl/edit.php +++ b/admin/views/snippet/tmpl/edit.php @@ -96,7 +96,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/snippet_type/tmpl/edit.php b/admin/views/snippet_type/tmpl/edit.php index 642aaa3e2..3229d5f76 100644 --- a/admin/views/snippet_type/tmpl/edit.php +++ b/admin/views/snippet_type/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index ac86ec282..d5fce4fb1 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -198,14 +198,14 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Set Type Name Selection $this->typeNameOptions = JFormHelper::loadFieldType('Snippettype')->options; - // We do some sanitation for filter + // We do some sanitation for Type Name filter if (ComponentbuilderHelper::checkArray($this->typeNameOptions) && isset($this->typeNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->typeNameOptions[0]->value)) { unset($this->typeNameOptions[0]); } - // Only load filter if it has values + // Only load Type Name filter if it has values if (ComponentbuilderHelper::checkArray($this->typeNameOptions)) { // Type Name Filter @@ -228,14 +228,14 @@ class ComponentbuilderViewSnippets extends JViewLegacy // Set Library Name Selection $this->libraryNameOptions = JFormHelper::loadFieldType('Library')->options; - // We do some sanitation for filter + // We do some sanitation for Library Name filter if (ComponentbuilderHelper::checkArray($this->libraryNameOptions) && isset($this->libraryNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->libraryNameOptions[0]->value)) { unset($this->libraryNameOptions[0]); } - // Only load filter if it has values + // Only load Library Name filter if it has values if (ComponentbuilderHelper::checkArray($this->libraryNameOptions)) { // Library Name Filter diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 482e94779..2875b164c 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -193,14 +193,14 @@ class ComponentbuilderViewTemplates extends JViewLegacy // Set Dynamic Get Name Selection $this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->options; - // We do some sanitation for filter + // We do some sanitation for Dynamic Get Name filter if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions) && isset($this->dynamic_getNameOptions[0]->value) && !ComponentbuilderHelper::checkString($this->dynamic_getNameOptions[0]->value)) { unset($this->dynamic_getNameOptions[0]); } - // Only load filter if it has values + // Only load Dynamic Get Name filter if it has values if (ComponentbuilderHelper::checkArray($this->dynamic_getNameOptions)) { // Dynamic Get Name Filter diff --git a/admin/views/validation_rule/tmpl/edit.php b/admin/views/validation_rule/tmpl/edit.php index 5a7f2e736..d12d3b46a 100644 --- a/admin/views/validation_rule/tmpl/edit.php +++ b/admin/views/validation_rule/tmpl/edit.php @@ -107,7 +107,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -