Release of v3.2.1-rc1
Improved the Schema Table update engine (more). Fix autoloader timing, and loading. Implement the Joomla Powers in JCB code, to move away from JClasses.
This commit is contained in:
parent
f99eae901a
commit
43cdc68e34
@ -1,3 +1,9 @@
|
||||
# v3.2.1-rc1
|
||||
|
||||
- Improved the Schema Table update engine (more)
|
||||
- Fix autoloader timing, and loading.
|
||||
- Implement the Joomla Powers in JCB code, to move away from JClasses.
|
||||
|
||||
# v3.2.1-beta3
|
||||
|
||||
- Fix version_update column size.
|
||||
|
10
README.md
10
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1-beta3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1-rc1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,13 +144,13 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 24th April, 2024
|
||||
+ *Version*: 3.2.1-beta3
|
||||
+ *Last Build*: 27th April, 2024
|
||||
+ *Version*: 3.2.1-rc1
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **764955**
|
||||
+ *Line count*: **764912**
|
||||
+ *Field count*: **2097**
|
||||
+ *File count*: **5382**
|
||||
+ *File count*: **5383**
|
||||
+ *Folder count*: **471**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1-beta3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1-rc1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,13 +144,13 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 24th April, 2024
|
||||
+ *Version*: 3.2.1-beta3
|
||||
+ *Last Build*: 27th April, 2024
|
||||
+ *Version*: 3.2.1-rc1
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **764955**
|
||||
+ *Line count*: **764912**
|
||||
+ *Field count*: **2097**
|
||||
+ *File count*: **5382**
|
||||
+ *File count*: **5383**
|
||||
+ *Folder count*: **471**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
|
@ -17,12 +17,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project admin area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
###ADMIN_HELPER_CLASS_HEADER###
|
||||
|
||||
|
@ -17,12 +17,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project site area.
|
||||
$power_autoloader = JPATH_SITE . '/components/com_###component###/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###SITE_CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
###SITE_HELPER_CLASS_HEADER###
|
||||
|
||||
|
@ -17,12 +17,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project admin area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
###ADMIN_COMPONENT_HEADER###
|
||||
|
||||
|
@ -17,12 +17,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project site area.
|
||||
$power_autoloader = JPATH_SITE . '/components/com_###component###/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###SITE_CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
###SITE_COMPONENT_HEADER###
|
||||
|
||||
|
@ -15,12 +15,7 @@ defined('_JCB_TEMPLATE') or die;
|
||||
###BOM###
|
||||
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper;
|
||||
|
||||
// The power autoloader for this project admin area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_###component###/src/Helper/PowerloaderHelper.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
###ADMIN_HELPER_CLASS_HEADER###
|
||||
|
||||
|
@ -14,12 +14,7 @@ defined('_JCB_TEMPLATE') or die;
|
||||
?>
|
||||
###BOM###
|
||||
|
||||
// The power autoloader for this project admin area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_###component###/src/Helper/PowerloaderHelper.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
// (soon) use Joomla\CMS\Association\AssociationExtensionInterface;
|
||||
use Joomla\CMS\Categories\CategoryFactoryInterface;
|
||||
|
@ -15,12 +15,7 @@ defined('_JCB_TEMPLATE') or die;
|
||||
###BOM###
|
||||
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper;
|
||||
|
||||
// The power autoloader for this project site area.
|
||||
$power_autoloader = JPATH_SITE . '/components/com_###component###/src/Helper/PowerloaderHelper.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
}
|
||||
###SITE_CUSTOM_POWER_AUTOLOADER###
|
||||
|
||||
###SITE_HELPER_CLASS_HEADER###
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project admin area.
|
||||
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Admin_views Admin Controller
|
||||
@ -127,7 +128,7 @@ class ComponentbuilderControllerAdmin_views extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=admin_views', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderControllerAdmin_views extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
|
||||
use Joomla\CMS\Version;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Compiler Admin Controller
|
||||
@ -127,7 +128,7 @@ class ComponentbuilderControllerCompiler extends AdminController
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||
if (($pos = strpos($model->compiler->filepath['component'], "/tmp/")) !== FALSE)
|
||||
{
|
||||
$url = \JUri::root() . substr($model->compiler->filepath['component'], $pos + 1);
|
||||
$url = Uri::root() . substr($model->compiler->filepath['component'], $pos + 1);
|
||||
}
|
||||
// check if we have plugins
|
||||
$add_plugin_install = UtilitiesArrayHelper::check($model->compiler->filepath['plugins'], true);
|
||||
@ -210,7 +211,7 @@ class ComponentbuilderControllerCompiler extends AdminController
|
||||
$message[] = '<b>Module Path:</b> <code>' . $module_path . '</code><br />';
|
||||
if (($pos = strpos($module_path, "/tmp/")) !== FALSE)
|
||||
{
|
||||
$module_urls[$module_id] = \JUri::root() . substr($module_path, $pos + 1);
|
||||
$module_urls[$module_id] = Uri::root() . substr($module_path, $pos + 1);
|
||||
$message[] = '<b>Module URL:</b> <code>' . $module_urls[$module_id] . '</code><br />';
|
||||
}
|
||||
}
|
||||
@ -226,7 +227,7 @@ class ComponentbuilderControllerCompiler extends AdminController
|
||||
$message[] = '<b>Plugin Path:</b> <code>' . $plugin_path . '</code><br />';
|
||||
if (($pos = strpos($plugin_path, "/tmp/")) !== FALSE)
|
||||
{
|
||||
$plugin_urls[$plugin_id] = \JUri::root() . substr($plugin_path, $pos + 1);
|
||||
$plugin_urls[$plugin_id] = Uri::root() . substr($plugin_path, $pos + 1);
|
||||
$message[] = '<b>Plugin URL:</b> <code>' . $plugin_urls[$plugin_id] . '</code><br />';
|
||||
}
|
||||
}
|
||||
@ -532,7 +533,7 @@ class ComponentbuilderControllerCompiler extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -541,7 +542,7 @@ class ComponentbuilderControllerCompiler extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Custom_codes Admin Controller
|
||||
@ -127,7 +128,7 @@ class ComponentbuilderControllerCustom_codes extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=custom_codes', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderControllerCustom_codes extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Dynamic_gets Admin Controller
|
||||
@ -127,7 +128,7 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Fields Admin Controller
|
||||
@ -127,7 +128,7 @@ class ComponentbuilderControllerFields extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=fields', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderControllerFields extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Joomla_components Admin Controller
|
||||
@ -128,7 +129,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -137,7 +138,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -19,6 +19,7 @@ use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Joomla_plugins Admin Controller
|
||||
@ -62,7 +63,7 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -71,7 +72,7 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
@ -102,7 +103,7 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
|
@ -21,6 +21,7 @@ use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Powers Admin Controller
|
||||
@ -64,7 +65,7 @@ class ComponentbuilderControllerPowers extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=powers', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -73,7 +74,7 @@ class ComponentbuilderControllerPowers extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Validation_rules Admin Controller
|
||||
@ -127,7 +128,7 @@ class ComponentbuilderControllerValidation_rules extends AdminController
|
||||
// check if user has the right
|
||||
$user = Factory::getUser();
|
||||
// set page redirect
|
||||
$redirect_url = \JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false);
|
||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=validation_rules', false);
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||
// check if this user has the right to run expansion
|
||||
@ -136,7 +137,7 @@ class ComponentbuilderControllerValidation_rules extends AdminController
|
||||
// set massage
|
||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||
// run expansion via API
|
||||
$result = ComponentbuilderHelper::getFileContents(\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||
// is there a message returned
|
||||
if (!is_numeric($result) && StringHelper::check($result))
|
||||
{
|
||||
|
@ -12,7 +12,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project admin area.
|
||||
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
@ -61,6 +61,7 @@ use VDM\Joomla\Utilities\String\PluginHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
use VDM\Joomla\Utilities\FormHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* Componentbuilder component helper.
|
||||
@ -2751,7 +2752,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
self::$gitHubAccessToken = self::$params->get('github_access_token', null);
|
||||
}
|
||||
@ -3254,7 +3255,7 @@ abstract class ComponentbuilderHelper
|
||||
$script['view'][] = PHP_EOL . "</script>";
|
||||
$script['view'][] = "";
|
||||
$script['view'][] = PHP_EOL . "<div id=\"installer-import\" class=\"clearfix\">";
|
||||
$script['view'][] = "<form enctype=\"multipart/form-data\" action=\"<?php echo \JRoute::_('index.php?option=com_[[[-#-#-component]]]&view=import_[[[-#-#-views]]]');?>\" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">";
|
||||
$script['view'][] = "<form enctype=\"multipart/form-data\" action=\"<?php echo Route::_('index.php?option=com_[[[-#-#-component]]]&view=import_[[[-#-#-views]]]');?>\" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">";
|
||||
$script['view'][] = "";
|
||||
$script['view'][] = PHP_EOL . self::_t(1) . "<?php if (!empty( \$this->sidebar)) : ?>";
|
||||
$script['view'][] = self::_t(2) . "<div id=\"j-sidebar-container\" class=\"span2\">";
|
||||
@ -3657,7 +3658,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
$folderPath = self::$params->get($target, $default);
|
||||
// create the folder if it does not exist
|
||||
@ -4886,7 +4887,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get UIKIT version
|
||||
$uikit = self::$params->get('uikit_version', 2);
|
||||
@ -4998,7 +4999,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get UIKIT version
|
||||
$uikit = self::$params->get('uikit_version', 2);
|
||||
@ -5104,7 +5105,7 @@ abstract class ComponentbuilderHelper
|
||||
// set the edit link
|
||||
if ($jRoute)
|
||||
{
|
||||
return \JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
|
||||
return Route::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
|
||||
}
|
||||
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ if (file_exists($composer_autoloader))
|
||||
}
|
||||
|
||||
// register additional namespace
|
||||
\spl_autoload_register(function ($class) {
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/vendor_jcb/VDM.Joomla.Gitea' => 'VDM\\Joomla\\Gitea',
|
||||
|
@ -30,6 +30,7 @@ use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Componentbuilder Ajax List Model
|
||||
@ -168,7 +169,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
protected function componentDetailsDisplay($object)
|
||||
{
|
||||
// set some vars
|
||||
$image = (StringHelper::check($object->image)) ? '<img alt="Joomla Component Image" src="'. \JUri::root() . $object->image . '" style="float: right;">': '';
|
||||
$image = (StringHelper::check($object->image)) ? '<img alt="Joomla Component Image" src="'. Uri::root() . $object->image . '" style="float: right;">': '';
|
||||
$desc = (StringHelper::check($object->description)) ? $object->description : $object->short_description;
|
||||
$placeholder = ($object->add_placeholders == 1) ? '<span class="btn btn-small btn-success"> ' . Text::_('COM_COMPONENTBUILDER_YES') . ' </span>' : '<span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
|
||||
$debug = ($object->debug_linenr == 1) ? '<span class="btn btn-small btn-success"> ' .Text::_('COM_COMPONENTBUILDER_YES') . '</span>' : ' <span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
|
||||
@ -206,11 +207,11 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
$result['error'] = '<span style="color: red;">' . Text::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . '</span>';
|
||||
if ($this->hasCurl())
|
||||
{
|
||||
$path = '*/5 * * * * curl -s "' .\JUri::root() . 'index.php?option=com_componentbuilder&task=api.backup" >/dev/null 2>&1';
|
||||
$path = '*/5 * * * * curl -s "' .Uri::root() . 'index.php?option=com_componentbuilder&task=api.backup" >/dev/null 2>&1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = '*/5 * * * * wget "' .\JUri::root() . 'index.php?option=com_componentbuilder&task=api.backup" >/dev/null 2>&1';
|
||||
$path = '*/5 * * * * wget "' .Uri::root() . 'index.php?option=com_componentbuilder&task=api.backup" >/dev/null 2>&1';
|
||||
}
|
||||
$result['path'] = '<code>' . $path . '</code>';
|
||||
}
|
||||
@ -219,11 +220,11 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
$result['error'] = '<span style="color: red;">' . Text::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . '</span>';
|
||||
if ($this->hasCurl())
|
||||
{
|
||||
$path = '* * * * * curl -s "' .\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
|
||||
$path = '* * * * * curl -s "' .Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = '* * * * * wget "' .\JUri::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
|
||||
$path = '* * * * * wget "' .Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
|
||||
}
|
||||
$result['path'] = '<code>' . $path . '</code>';
|
||||
}
|
||||
|
@ -203,8 +203,8 @@
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="add_admin_event:1"
|
||||
validate="code"
|
||||
showon="add_admin_event:1"
|
||||
/>
|
||||
<!-- Note_git_folder_path Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_git_folder_path" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_GIT_FOLDER_PATH_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_GIT_FOLDER_PATH_DESCRIPTION" heading="h4" class="alert alert-info note_git_folder_path" showon="add_git_folder_path:1" />
|
||||
@ -640,6 +640,7 @@
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
validate="code"
|
||||
showon="add_css_site:1"
|
||||
/>
|
||||
<!-- Whmcs_buy_link Field. Type: Url. (joomla) -->
|
||||
<field
|
||||
|
@ -23,6 +23,7 @@ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Http\Http;
|
||||
|
||||
/**
|
||||
* Languages List Model
|
||||
@ -101,7 +102,7 @@ class ComponentbuilderModelLanguages extends ListModel
|
||||
{
|
||||
$updateSite = $this->getUpdateSite();
|
||||
|
||||
$http = new JHttp;
|
||||
$http = new Http;
|
||||
|
||||
try
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
1
admin/sql/updates/mysql/3.2.1-beta3.sql
Normal file
1
admin/sql/updates/mysql/3.2.1-beta3.sql
Normal file
@ -0,0 +1 @@
|
||||
|
@ -211,7 +211,7 @@ class ComponentbuilderViewAdmin_fields_relations extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewAdmin_view extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewClass_extends extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewClass_method extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewClass_property extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewComponent_dashboard extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewCustom_admin_view extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewCustom_code extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// need to add some language strings
|
||||
Text::script('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN');
|
||||
Text::script('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME');
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewDynamic_get extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewField extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// add the libs for subform (since not adding it via xml but ajax)
|
||||
Html::_('jquery.ui', array('core', 'sortable'));
|
||||
Html::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true));
|
||||
|
@ -268,7 +268,7 @@ class ComponentbuilderViewFieldtype extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ Html::_('behavior.keepalive');
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="<?php echo \JRoute::_('index.php?option=com_componentbuilder'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
<form action="<?php echo Route::_('index.php?option=com_componentbuilder'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo Html::_('form.token'); ?>
|
||||
</form>
|
||||
|
@ -23,6 +23,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
/**
|
||||
* Componentbuilder Html View class for the Get_snippets
|
||||
@ -180,7 +181,7 @@ class ComponentbuilderViewGet_snippets extends HtmlView
|
||||
$this->document->addScriptDeclaration("var snippetPath = '". ComponentbuilderHelper::$snippetPath ."';");
|
||||
$this->document->addScriptDeclaration("var snippetsPath = '". ComponentbuilderHelper::$snippetsPath ."';");
|
||||
// token
|
||||
$this->document->addScriptDeclaration("var token = '". \JSession::getFormToken() ."';");
|
||||
$this->document->addScriptDeclaration("var token = '". Session::getFormToken() ."';");
|
||||
// add some global items buckets for bulk updating
|
||||
$this->document->addScriptDeclaration("var bulkItems = {};");
|
||||
$this->document->addScriptDeclaration("bulkItems.new = [];");
|
||||
|
@ -22,6 +22,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\FormHelper as UtilitiesFormHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
/**
|
||||
* Componentbuilder Import_joomla_components Html View
|
||||
@ -165,7 +166,7 @@ class ComponentbuilderViewImport_joomla_components extends HtmlView
|
||||
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
|
||||
$this->document->addScriptDeclaration("var all_is_good = '".Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME')."';");
|
||||
// add a token on the page for javascript
|
||||
$this->document->addScriptDeclaration("var token = '".\JSession::getFormToken()."';");
|
||||
$this->document->addScriptDeclaration("var token = '".Session::getFormToken()."';");
|
||||
|
||||
|
||||
// add the Uikit v2 style sheets
|
||||
|
@ -140,7 +140,7 @@ jQuery(document).ready(function($) {
|
||||
|
||||
|
||||
<div id="installer-import" class="clearfix">
|
||||
<form enctype="multipart/form-data" action="<?php echo \JRoute::_('index.php?option=com_componentbuilder&view=import_language_translations');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
|
||||
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_componentbuilder&view=import_language_translations');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
|
||||
|
||||
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewJoomla_component extends HtmlView
|
||||
// add var key
|
||||
$this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ class ComponentbuilderViewJoomla_module extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// check if we should use browser storage
|
||||
$setBrowserStorage = $this->params->get('set_browser_storage', null);
|
||||
if ($setBrowserStorage)
|
||||
|
@ -222,7 +222,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// set some lang
|
||||
Text::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER');
|
||||
Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS');
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewLayout extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
$edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit";
|
||||
|
||||
@ -77,7 +78,7 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit"
|
||||
<?php // setup the return path
|
||||
if (!isset($returnpath))
|
||||
{
|
||||
$returnpath = urlencode(base64_encode((string) \JUri::getInstance()));
|
||||
$returnpath = urlencode(base64_encode((string) Uri::getInstance()));
|
||||
}
|
||||
// setup the buttons
|
||||
if (!isset($_buttons) || !ArrayHelper::check($_buttons))
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewLibrary extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ class ComponentbuilderViewPlaceholder extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ class ComponentbuilderViewPower extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// set some lang
|
||||
Text::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER');
|
||||
Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS');
|
||||
|
@ -23,12 +23,13 @@ Html::_('formbehavior.chosen', 'select');
|
||||
Html::_('behavior.keepalive');
|
||||
use Joomla\CMS\Session\Session;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// allow main menu selection
|
||||
$this->app->input->set('hidemainmenu', false);
|
||||
|
||||
// set the basu URL
|
||||
$url_base = \JUri::base() . 'index.php?option=com_componentbuilder';
|
||||
$url_base = Uri::base() . 'index.php?option=com_componentbuilder';
|
||||
$url_search = $url_base . '&view=search';
|
||||
|
||||
// get main search input field
|
||||
@ -59,7 +60,7 @@ $search_value = $this->form->getField('search_value');
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php if ($this->form): ?>
|
||||
<form action="<?php echo \JRoute::_($url_search); ?>" method="post"
|
||||
<form action="<?php echo Route::_($url_search); ?>" method="post"
|
||||
name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
<div class="form-horizontal">
|
||||
<div class="row-fluid" id="search_progress_block" style="display: none">
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewSite_view extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewTemplate extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ComponentbuilderViewValidation_rule extends HtmlView
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// need to add some language strings
|
||||
Text::script('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN');
|
||||
Text::script('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME');
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.10" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>24th April, 2024</creationDate>
|
||||
<creationDate>27th April, 2024</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>3.2.1-beta3</version>
|
||||
<version>3.2.1-rc1</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.3.2.1-beta3)</h1>
|
||||
<h1>Component Builder (v.3.2.1-rc1)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -1685,4 +1685,22 @@
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="3.*"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>3.2.1-rc1</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.1-rc1.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>releasecandidate</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="3.*"/>
|
||||
</update>
|
||||
</updates>
|
@ -486,8 +486,8 @@ abstract class Schema implements SchemaInterface
|
||||
*
|
||||
* This function checks if there's a significant difference between the current
|
||||
* data type and the expected data type that would require updating the database schema.
|
||||
* It ignores size and other modifiers for certain data types where MySQL considers
|
||||
* these attributes irrelevant for storage.
|
||||
* It ignores display width for numeric types where MySQL considers these attributes
|
||||
* irrelevant for storage but considers size and other modifiers for types like VARCHAR.
|
||||
*
|
||||
* @param string $currentType The current data type from the database schema.
|
||||
* @param string $expectedType The expected data type to validate against.
|
||||
@ -495,47 +495,43 @@ abstract class Schema implements SchemaInterface
|
||||
* @return bool Returns true if the data type change is significant, otherwise false.
|
||||
* @since 3.2.1
|
||||
*/
|
||||
function isDataTypeChangeSignificant(string $currentType, string $expectedType): bool
|
||||
{
|
||||
// we only do this for Joomla 4+
|
||||
if ($this->currentVersion != 3)
|
||||
protected function isDataTypeChangeSignificant(string $currentType, string $expectedType): bool
|
||||
{
|
||||
// Normalize both input types to lowercase for case-insensitive comparison
|
||||
$currentType = strtolower($currentType);
|
||||
$expectedType = strtolower($expectedType);
|
||||
|
||||
// Define types where size or other modifiers are irrelevant
|
||||
// Regex to extract the base data type and numeric parameters with named groups
|
||||
$typePattern = '/^(?<datatype>\w+)(\((?<params>\d+(,\d+)?)\))?/';
|
||||
|
||||
// Match types and parameters
|
||||
preg_match($typePattern, $currentType, $currentMatches);
|
||||
preg_match($typePattern, $expectedType, $expectedMatches);
|
||||
|
||||
// Compare base types
|
||||
if ($currentMatches['datatype'] !== $expectedMatches['datatype'])
|
||||
{
|
||||
return true; // Base types differ
|
||||
}
|
||||
|
||||
// Define types where size and other modifiers are irrelevant
|
||||
$sizeIrrelevantTypes = [
|
||||
'int', 'tinyint', 'smallint', 'mediumint', 'bigint', // Standard integer types
|
||||
'int unsigned', 'tinyint unsigned', 'smallint unsigned', 'mediumint unsigned', 'bigint unsigned', // Unsigned integer types
|
||||
'int', 'tinyint', 'smallint', 'mediumint', 'bigint',
|
||||
'float', 'double', 'decimal', 'numeric' // Numeric types where display width is irrelevant
|
||||
];
|
||||
|
||||
// Check if the type involves size-irrelevant types
|
||||
foreach ($sizeIrrelevantTypes as $type)
|
||||
// If the type is not in the size irrelevant list, compare full definitions
|
||||
if (!in_array($currentMatches['datatype'], $sizeIrrelevantTypes))
|
||||
{
|
||||
if (strpos($expectedType, $type) !== false)
|
||||
{
|
||||
// Remove any numeric sizes and modifiers for comparison
|
||||
$pattern = '/\(\d+\)|unsigned|\s*/';
|
||||
$cleanCurrentType = preg_replace($pattern, '', $currentType);
|
||||
$cleanExpectedType = preg_replace($pattern, '', $expectedType);
|
||||
|
||||
// Compare the cleaned types
|
||||
if ($cleanCurrentType === $cleanExpectedType)
|
||||
{
|
||||
return false; // No significant change
|
||||
}
|
||||
}
|
||||
}
|
||||
return $currentType !== $expectedType; // Use full definition for types where size matters
|
||||
}
|
||||
|
||||
// Perform a standard case-insensitive comparison for other types
|
||||
if (strcasecmp($currentType, $expectedType) == 0)
|
||||
{
|
||||
return false; // No significant change
|
||||
}
|
||||
// For size irrelevant types, only compare base type, ignoring size and unsigned
|
||||
$currentBaseType = preg_replace('/\(\d+(,\d+)?\)|unsigned/', '', $currentType);
|
||||
$expectedBaseType = preg_replace('/\(\d+(,\d+)?\)|unsigned/', '', $expectedType);
|
||||
|
||||
return true; // Significant datatype change detected
|
||||
// Perform a final comparison for numeric types ignoring size
|
||||
return $currentBaseType !== $expectedBaseType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -293,6 +293,24 @@ class Config extends BaseConfig
|
||||
return strlen((string) $this->component_code_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* get component autoloader path
|
||||
*
|
||||
* @return string The component autoloader path
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getComponentautoloaderpath(): string
|
||||
{
|
||||
if ($this->joomla_version == 3)
|
||||
{
|
||||
return 'helpers/powerloader.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'src/Helper/PowerloaderHelper.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get add namespace prefix
|
||||
*
|
||||
@ -638,7 +656,10 @@ class Config extends BaseConfig
|
||||
'js' => 'Text:' . ':script(',
|
||||
't' => 'Text:' . ':_(', // namespace and J version will be found
|
||||
'ts' => 'Text:' . ':sprintf(', // namespace and J version will be found
|
||||
'jt' => 'JustTEXT:' . ':_('
|
||||
'jt' => 'JustTEXT:' . ':_(',
|
||||
'spjs' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(', // the joomla power version
|
||||
'spt' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':_(', // the joomla power version
|
||||
'spts' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':sprintf(' // the joomla power version
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -546,10 +546,14 @@ final class CustomFieldTypeFile
|
||||
if ($this->config->get('joomla_version', 3) != 3)
|
||||
{
|
||||
$placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||
$placeholders['\JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||
$placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||
$placeholders['JFactory::'] = 'Factory::';
|
||||
$placeholders['\JFactory::'] = 'Factory::';
|
||||
$placeholders['JHtml::'] = 'Html::';
|
||||
$placeholders['\JHtml::'] = 'Html::';
|
||||
$placeholders['JText::'] = 'Text::';
|
||||
$placeholders['\JText::'] = 'Text::';
|
||||
$placeholders['JComponentHelper::'] = 'ComponentHelper::';
|
||||
$placeholders['\JComponentHelper::'] = 'ComponentHelper::';
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ class Compiler extends Infusion
|
||||
{
|
||||
CFactory::_('Power')->load($super_powers);
|
||||
}
|
||||
// set the autoloader for Powers (second time)
|
||||
// set the autoloader for Powers
|
||||
CFactory::_('Power.Autoloader')->set();
|
||||
// get the bom file
|
||||
$bom = FileHelper::getContent(CFactory::_('Config')->bom_path);
|
||||
|
@ -2149,8 +2149,8 @@ class Infusion extends Interpretation
|
||||
CFactory::_('Compiler.Builder.Component.Fields')->varExport(null, 1)
|
||||
);
|
||||
|
||||
// set the autoloader for Powers (first time)
|
||||
CFactory::_('Power.Autoloader')->set();
|
||||
// set the autoloader for Powers
|
||||
CFactory::_('Power.Autoloader')->setFiles();
|
||||
|
||||
// tweak system to set stuff to the module domain
|
||||
$_backup_target = CFactory::_('Config')->build_target;
|
||||
|
@ -147,7 +147,9 @@ class Extractor
|
||||
}
|
||||
}
|
||||
// now get the JText: :script()
|
||||
if (in_array('JText:' . ':script(', $lang_string_targets) || in_array('Text:' . ':script(', $lang_string_targets))
|
||||
if (in_array('JText:' . ':script(', $lang_string_targets)
|
||||
|| in_array('Text:' . ':script(', $lang_string_targets)
|
||||
|| in_array('Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(', $lang_string_targets))
|
||||
{
|
||||
$sc_text[] = GetHelper::allBetween(
|
||||
$content, "JText:" . ":script('", "'"
|
||||
@ -161,6 +163,12 @@ class Extractor
|
||||
$sc_text[] = GetHelper::allBetween(
|
||||
$content, 'Text:' . ':script("', '"'
|
||||
);
|
||||
$sc_text[] = GetHelper::allBetween(
|
||||
$content, "Joomla__" ."_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:" . ":script('", "'"
|
||||
);
|
||||
$sc_text[] = GetHelper::allBetween(
|
||||
$content, 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script("', '"'
|
||||
);
|
||||
// combine into one array
|
||||
$sc_text = ArrayHelper::merge($sc_text);
|
||||
// we need to add a check to insure these JavaScript lang matchup
|
||||
@ -192,6 +200,7 @@ class Extractor
|
||||
if ($lang_string_target === 'Joomla' . '.JText._('
|
||||
|| $lang_string_target === 'JText:' . ':script('
|
||||
|| $lang_string_target === 'Text:' . ':script('
|
||||
|| $lang_string_target === 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script('
|
||||
|| $lang_string_target === 'JustTEXT:' . ':_(')
|
||||
{
|
||||
continue;
|
||||
|
@ -77,7 +77,27 @@ class Autoloader
|
||||
// reset all autoloaders power placeholders
|
||||
$this->content->set('ADMIN_POWER_HELPER', '');
|
||||
$this->content->set('SITE_POWER_HELPER', '');
|
||||
$this->content->set('PLUGIN_POWER_AUTOLOADER', '');
|
||||
$this->content->set('CUSTOM_POWER_AUTOLOADER', '');
|
||||
$this->content->set('SITE_PLUGIN_POWER_AUTOLOADER', '');
|
||||
$this->content->set('SITE_CUSTOM_POWER_AUTOLOADER', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the autoloader into the active content array
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function setFiles()
|
||||
{
|
||||
// check if we are using a plugin
|
||||
$this->content->set('PLUGIN_POWER_AUTOLOADER', PHP_EOL . PHP_EOL . $this->getAutoloaderFile(2));
|
||||
$this->content->set('SITE_PLUGIN_POWER_AUTOLOADER', PHP_EOL . PHP_EOL . $this->getAutoloaderFile(2, 'JPATH_SITE'));
|
||||
|
||||
// to add to custom files
|
||||
$this->content->add('CUSTOM_POWER_AUTOLOADER', $this->getAutoloaderFile(0));
|
||||
$this->content->add('SITE_CUSTOM_POWER_AUTOLOADER', $this->getAutoloaderFile(0, 'JPATH_SITE'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,9 +109,9 @@ class Autoloader
|
||||
public function set()
|
||||
{
|
||||
// make sure we only load this once
|
||||
if (ArrayHelper::check($this->power->namespace) && !$this->content->isString('CUSTOM_POWER_AUTOLOADER'))
|
||||
if (ArrayHelper::check($this->power->namespace) && !$this->content->isString('ADMIN_POWER_HELPER'))
|
||||
{
|
||||
/************************* IMPORTANT SORT NOTICE ***********************************************
|
||||
/* ********************** IMPORTANT SORT NOTICE *****************************************
|
||||
* make sure the name space values are sorted from the longest string to the shortest
|
||||
* so that the search do not mistakenly match a shorter namespace before a longer one
|
||||
* that has the same short namespace for example:
|
||||
@ -102,110 +122,18 @@ class Autoloader
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^
|
||||
* NameSpace\SubName\SubSubName\ClassName
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^
|
||||
***********************************************************************************************/
|
||||
** *********************************************************************************************/
|
||||
|
||||
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
|
||||
|
||||
// check if we are using a plugin
|
||||
if ($this->loadPluginAutoloader())
|
||||
{
|
||||
$this->content->set('PLUGIN_POWER_AUTOLOADER', $this->getPluginAutoloader());
|
||||
}
|
||||
|
||||
// load to the helper class
|
||||
if ($this->loadHelperAutoloader())
|
||||
{
|
||||
// load to admin helper class
|
||||
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
|
||||
|
||||
// load to site helper class if needed
|
||||
if ($this->loadSiteAutoloader())
|
||||
{
|
||||
$this->content->add('SITE_POWER_HELPER', $this->getHelperAutoloader());
|
||||
}
|
||||
}
|
||||
|
||||
// to add to custom files
|
||||
$this->content->add('CUSTOM_POWER_AUTOLOADER', $this->getHelperAutoloader());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we load the plugin autoloader
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function loadPluginAutoloader(): bool
|
||||
{
|
||||
return $this->content->exists('PLUGIN_POWER_AUTOLOADER');
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we load the helper class autoloader
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function loadHelperAutoloader(): bool
|
||||
{
|
||||
// for now we load it if the plugin is not loaded
|
||||
// but we may want to add a switch that
|
||||
// controls this behaviour.
|
||||
// return !$this->loadPluginAutoloader();
|
||||
// lets load it anyway (can't break anything)
|
||||
// but we will still like a switch for this
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we load the autoloader in site area
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function loadSiteAutoloader(): bool
|
||||
{
|
||||
return (!$this->config->remove_site_folder || !$this->config->remove_site_edit_folder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get helper autoloader code
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function getPluginAutoloader(): string
|
||||
{
|
||||
// load the code
|
||||
$code = [];
|
||||
|
||||
// if we should not load in the site are
|
||||
if (($script = $this->getBLockSiteLoading()) !== null)
|
||||
{
|
||||
$code[] = $script;
|
||||
}
|
||||
|
||||
// add the composer stuff here
|
||||
if (($script = $this->getComposer(2)) !== null)
|
||||
{
|
||||
$code[] = $script;
|
||||
}
|
||||
|
||||
// get the helper autoloader
|
||||
if (($script = $this->getAutoloader(2)) !== null)
|
||||
{
|
||||
$code[] = $script;
|
||||
}
|
||||
|
||||
// if we have any
|
||||
if (!empty($code))
|
||||
{
|
||||
return PHP_EOL . PHP_EOL . implode(PHP_EOL . PHP_EOL, $code);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get helper autoloader code
|
||||
*
|
||||
@ -245,30 +173,29 @@ class Autoloader
|
||||
}
|
||||
|
||||
/**
|
||||
* Get code that will block the plugin from loading
|
||||
* the autoloader in the site area
|
||||
* Get autoloader file
|
||||
*
|
||||
* @param int $tabSpace The dynamic tab spacer
|
||||
* @param string $area The target area
|
||||
*
|
||||
* @return string|null
|
||||
* @since 3.2.0
|
||||
* @since 3.2.1
|
||||
*/
|
||||
private function getBLockSiteLoading(): ?string
|
||||
private function getAutoloaderFile(int $tabSpace, string $area = 'JPATH_ADMINISTRATOR'): ?string
|
||||
{
|
||||
// if we should not load in the site are
|
||||
if (!$this->loadSiteAutoloader())
|
||||
{
|
||||
// we add code to prevent this plugin from triggering on the site area
|
||||
$not_site = [];
|
||||
$not_site[] = Indent::_(2) . '//'
|
||||
. Line::_(__Line__, __Class__) . ' do not run the autoloader in the site area';
|
||||
$not_site[] = Indent::_(2) . 'if ($this->app->isClient(\'site\'))';
|
||||
$not_site[] = Indent::_(2) . '{';
|
||||
$not_site[] = Indent::_(3) . 'return;';
|
||||
$not_site[] = Indent::_(2) . '}';
|
||||
// we start building the autoloaded file loader
|
||||
$autoload_file = [];
|
||||
$autoload_file[] = Indent::_($tabSpace) . '//'
|
||||
. Line::_(__Line__, __Class__) . " The power autoloader for this project ($area) area.";
|
||||
$autoload_file[] = Indent::_($tabSpace) . "\$power_autoloader = $area . '/components/com_"
|
||||
. $this->config->get('component_code_name', 'ERROR') . '/'
|
||||
. $this->config->get('component_autoloader_path', 'ERROR') . "';";
|
||||
$autoload_file[] = Indent::_($tabSpace) . 'if (file_exists($power_autoloader))';
|
||||
$autoload_file[] = Indent::_($tabSpace) . '{';
|
||||
$autoload_file[] = Indent::_($tabSpace) . Indent::_(1) . 'require_once $power_autoloader;';
|
||||
$autoload_file[] = Indent::_($tabSpace) . '}';
|
||||
|
||||
return implode(PHP_EOL, $not_site);
|
||||
}
|
||||
|
||||
return null;
|
||||
return implode(PHP_EOL, $autoload_file);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -287,7 +214,7 @@ class Autoloader
|
||||
$autoload_method = [];
|
||||
$autoload_method[] = Indent::_($tabSpace) . '//'
|
||||
. Line::_(__Line__, __Class__) . ' register additional namespace';
|
||||
$autoload_method[] = Indent::_($tabSpace) . '\spl_autoload_register(function ($class) {';
|
||||
$autoload_method[] = Indent::_($tabSpace) . 'spl_autoload_register(function ($class) {';
|
||||
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '//'
|
||||
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
|
||||
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';
|
||||
|
@ -158,28 +158,38 @@ class Data
|
||||
// check if layout keys were passed
|
||||
if (!ArrayHelper::check($layouts))
|
||||
{
|
||||
$layout_bucket = [];
|
||||
// set the Layout data
|
||||
$lay1 = GetHelper::allBetween(
|
||||
if (($layouts_found = GetHelper::allBetween(
|
||||
$content, "LayoutHelper::render('", "',"
|
||||
);
|
||||
$lay2 = GetHelper::allBetween(
|
||||
)) !== null)
|
||||
{
|
||||
$layout_bucket[] = $layouts_found;
|
||||
}
|
||||
if (($layouts_found = GetHelper::allBetween(
|
||||
$content, 'LayoutHelper::render("', '",'
|
||||
);
|
||||
if (ArrayHelper::check($lay1)
|
||||
&& ArrayHelper::check($lay2))
|
||||
)) !== null)
|
||||
{
|
||||
$layouts = array_merge($lay1, $lay2);
|
||||
$layout_bucket[] = $layouts_found;
|
||||
}
|
||||
else
|
||||
// set the Layout data
|
||||
if (($layouts_found = GetHelper::allBetween(
|
||||
$content, "Joomla__" . "_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('", "',"
|
||||
)) !== null)
|
||||
{
|
||||
if (ArrayHelper::check($lay1))
|
||||
{
|
||||
$layouts = $lay1;
|
||||
$layout_bucket[] = $layouts_found;
|
||||
}
|
||||
elseif (ArrayHelper::check($lay2))
|
||||
if (($layouts_found = GetHelper::allBetween(
|
||||
$content, 'Joomla__' . '_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render("', '",'
|
||||
)) !== null)
|
||||
{
|
||||
$layouts = $lay2;
|
||||
$layout_bucket[] = $layouts_found;
|
||||
}
|
||||
|
||||
// Flatten and merge all collected layouts if any
|
||||
if ($layout_bucket !== [])
|
||||
{
|
||||
$layouts = array_merge($layouts, ...$layout_bucket);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9810,7 +9810,7 @@ class Com_ComponentbuilderInstallerScript
|
||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 3.2.1-beta3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
<h3>Upgrade to Version 3.2.1-rc1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
|
||||
// Set db if not set already.
|
||||
if (!isset($db))
|
||||
@ -11793,7 +11793,7 @@ class Com_ComponentbuilderInstallerScript
|
||||
if (!class_exists($nameClass, true))
|
||||
{
|
||||
// The power autoloader for this project admin area.
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/componenents/com_componentbuilder/helpers/powerload.php';
|
||||
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
require_once $power_autoloader;
|
||||
|
@ -12,7 +12,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project site area.
|
||||
// The power autoloader for this project (JPATH_SITE) area.
|
||||
$power_autoloader = JPATH_SITE . '/components/com_componentbuilder/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ use Joomla\CMS\Uri\Uri;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
|
||||
/**
|
||||
* Componentbuilder Api Form Controller
|
||||
@ -68,7 +69,7 @@ class ComponentbuilderControllerApi extends FormController
|
||||
// get params first
|
||||
if (!isset($this->params) || !ObjectHelper::check($this->params))
|
||||
{
|
||||
$this->params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
$this->params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get model
|
||||
$model = $this->getModel('api');
|
||||
@ -146,7 +147,7 @@ class ComponentbuilderControllerApi extends FormController
|
||||
// get params first
|
||||
if (!isset($this->params) || !ObjectHelper::check($this->params))
|
||||
{
|
||||
$this->params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
$this->params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// check if expansion is enabled
|
||||
$method = $this->params->get('development_method', 1);
|
||||
|
@ -12,7 +12,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// The power autoloader for this project site area.
|
||||
// The power autoloader for this project (JPATH_SITE) area.
|
||||
$power_autoloader = JPATH_SITE . '/components/com_componentbuilder/helpers/powerloader.php';
|
||||
if (file_exists($power_autoloader))
|
||||
{
|
||||
@ -58,6 +58,7 @@ use VDM\Joomla\Utilities\String\PluginHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
use VDM\Joomla\Utilities\FormHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* Componentbuilder component helper
|
||||
@ -2748,7 +2749,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
self::$gitHubAccessToken = self::$params->get('github_access_token', null);
|
||||
}
|
||||
@ -3251,7 +3252,7 @@ abstract class ComponentbuilderHelper
|
||||
$script['view'][] = PHP_EOL . "</script>";
|
||||
$script['view'][] = "";
|
||||
$script['view'][] = PHP_EOL . "<div id=\"installer-import\" class=\"clearfix\">";
|
||||
$script['view'][] = "<form enctype=\"multipart/form-data\" action=\"<?php echo \JRoute::_('index.php?option=com_[[[-#-#-component]]]&view=import_[[[-#-#-views]]]');?>\" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">";
|
||||
$script['view'][] = "<form enctype=\"multipart/form-data\" action=\"<?php echo Route::_('index.php?option=com_[[[-#-#-component]]]&view=import_[[[-#-#-views]]]');?>\" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">";
|
||||
$script['view'][] = "";
|
||||
$script['view'][] = PHP_EOL . self::_t(1) . "<?php if (!empty( \$this->sidebar)) : ?>";
|
||||
$script['view'][] = self::_t(2) . "<div id=\"j-sidebar-container\" class=\"span2\">";
|
||||
@ -3654,7 +3655,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
$folderPath = self::$params->get($target, $default);
|
||||
// create the folder if it does not exist
|
||||
@ -4883,7 +4884,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get UIKIT version
|
||||
$uikit = self::$params->get('uikit_version', 2);
|
||||
@ -4995,7 +4996,7 @@ abstract class ComponentbuilderHelper
|
||||
// get the global settings
|
||||
if (!ObjectHelper::check(self::$params))
|
||||
{
|
||||
self::$params = \JComponentHelper::getParams('com_componentbuilder');
|
||||
self::$params = ComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get UIKIT version
|
||||
$uikit = self::$params->get('uikit_version', 2);
|
||||
@ -5101,7 +5102,7 @@ abstract class ComponentbuilderHelper
|
||||
// set the edit link
|
||||
if ($jRoute)
|
||||
{
|
||||
return \JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
|
||||
return Route::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
|
||||
}
|
||||
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ if (file_exists($composer_autoloader))
|
||||
}
|
||||
|
||||
// register additional namespace
|
||||
\spl_autoload_register(function ($class) {
|
||||
spl_autoload_register(function ($class) {
|
||||
// project-specific base directories and namespace prefix
|
||||
$search = [
|
||||
'libraries/vendor_jcb/VDM.Joomla.Gitea' => 'VDM\\Joomla\\Gitea',
|
||||
|
Loading…
Reference in New Issue
Block a user