Added option to include or exclude Joomla Plugins from being compiled or exported. Added the Joomla\Utilities\ArrayHelper to helper class header. Added option to only export words if required global option fields are set. Added option to use strict field access on all exports if required global option fields are set. Fixed gh-475 by adding the option to add a github token if needed under the global options global tab, also updated the error message.

This commit is contained in:
2019-09-10 18:47:39 +02:00
parent e3f22d631c
commit 2b1e0a65fa
61 changed files with 726 additions and 330 deletions

View File

@@ -18,7 +18,7 @@ JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
?>
<script type="text/javascript">
<?php if ($this->hasPackage && $this->dataType === 'smart_package'): ?>
<?php if (isset($this->hasPackage) && $this->hasPackage && $this->dataType === 'smart_package'): ?>
Joomla.continueExtImport = function()
{
var form = document.getElementById('adminForm');
@@ -168,7 +168,7 @@ jQuery(document).ready(function($) {
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray">&lt;&lt;ewe&gt;&gt;yn</a></small></div>
</div>
<div id="installer-import">
<?php if ($this->hasPackage && $this->dataType === 'smart_package') : ?>
<?php if (isset($this->hasPackage) && $this->hasPackage && $this->dataType === 'smart_package') : ?>
<?php
if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name']))
{
@@ -277,7 +277,7 @@ jQuery(document).ready(function($) {
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
<?php if (isset($this->vdmPackages) && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_vdm', JText::_('COM_COMPONENTBUILDER_VDM_PACKAGES', true)); ?>
<div class="span12" id="vdm_packages_installer">
<div class="alert alert-success">
@@ -308,7 +308,7 @@ jQuery(document).ready(function($) {
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)) : ?>
<?php if (isset($this->jcbPackages) && ComponentbuilderHelper::checkArray($this->jcbPackages)) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_jcb', JText::_('COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES', true)); ?>
<div class="span12" id="jcb_packages_installer">
<div class="alert alert-success">
@@ -349,12 +349,12 @@ jQuery(document).ready(function($) {
</form>
</div>
<script type="text/javascript">
<?php if (($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)) || ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages))): ?>
<?php if ((isset($this->vdmPackages) && $this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)) || (isset($this->jcbPackages) && $this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages))): ?>
// set packages that are on the page
var packages = {};
jQuery(document).ready(function($)
{
<?php if ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)): ?>
<?php if (isset($this->jcbPackages) && $this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)): ?>
// get all jcb packages
jQuery("#jcb_package option").each(function()
{
@@ -362,7 +362,7 @@ jQuery(document).ready(function($)
packages[key] = 'jcb';
});
<?php endif; ?>
<?php if ($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
<?php if (isset($this->vdmPackages) && $this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
// get all vdm packages
jQuery("#vdm_package option").each(function()
{

View File

@@ -310,7 +310,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
$form[] = $sleutle;
}
}
elseif ('vdm_package' === $type && in_array('vdm', $this->directories) && $vdmListObjects = ComponentbuilderHelper::getGithubRepoFileList('vdmGithubPackages', ComponentbuilderHelper::$vdmGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
elseif ('vdm_package' === $type && in_array('vdm', $this->directories) && $vdmListObjects = ComponentbuilderHelper::getGithubRepoFileList('vdmGithubPackages', ComponentbuilderHelper::$vdmGithubPackagesUrl))
{
if (ComponentbuilderHelper::checkArray($vdmListObjects))
{
@@ -354,7 +354,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
}
}
}
elseif ('jcb_package' === $type && in_array('jcb', $this->directories) && $jcbListObjects = ComponentbuilderHelper::getGithubRepoFileList('communityGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
elseif ('jcb_package' === $type && in_array('jcb', $this->directories) && $jcbListObjects = ComponentbuilderHelper::getGithubRepoFileList('communityGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl))
{
if (ComponentbuilderHelper::checkArray($jcbListObjects))
{