forked from joomla/Component-Builder
Update on v3.2.0-beta2 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
This commit is contained in:
parent
2fd3747aa1
commit
dce71f1d35
@ -127,7 +127,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 = \JRoute::_('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
|
||||
|
@ -534,7 +534,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 = \JRoute::_('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
|
||||
|
@ -127,7 +127,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 = \JRoute::_('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
|
||||
|
@ -127,7 +127,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 = \JRoute::_('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
|
||||
|
@ -127,7 +127,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 = \JRoute::_('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
|
||||
|
@ -128,7 +128,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 = \JRoute::_('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
|
||||
|
@ -62,7 +62,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 = \JRoute::_('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
|
||||
@ -102,7 +102,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 = \JRoute::_('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
|
||||
|
@ -63,7 +63,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 = \JRoute::_('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
|
||||
|
@ -127,7 +127,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 = \JRoute::_('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
|
||||
|
@ -2161,7 +2161,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
}
|
||||
// return found content
|
||||
return str_replace('[[[ROOT-URL]]]', JURI::root(), $target['html']);
|
||||
return str_replace('[[[ROOT-URL]]]', Uri::root(), $target['html']);
|
||||
}
|
||||
}
|
||||
return $default;
|
||||
@ -3311,7 +3311,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 \JRoute::_('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\">";
|
||||
@ -5161,7 +5161,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 \JRoute::_("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;
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
else
|
||||
{
|
||||
// download link of the latest version
|
||||
$download = "https://git.vdm.dev/api/v1/repos/joomla/Component-Builder/archive/" . $tags[0]->name . ".zip?access_token=" . $token;
|
||||
$download = "https://git.vdm.dev/api/v1/repos/joomla/Component-Builder/archive/" . $tags[0]->name . ".zip";
|
||||
|
||||
return ['notice' => '<small><span style="color:red;"><span class="icon-warning-circle"></span>' . Text::_('COM_COMPONENTBUILDER_OUT_OF_DATE') . '!</span> <a style="color:green;" href="' .
|
||||
$download . '" title="' . Text::_('COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA') . '">' . Text::_('COM_COMPONENTBUILDER_DOWNLOAD_UPDATE') . '!</a></small>'];
|
||||
|
@ -2041,7 +2041,7 @@ INSERT INTO `#__componentbuilder_site_view` (`id`, `add_css_document`, `add_css`
|
||||
--
|
||||
|
||||
INSERT INTO `#__componentbuilder_dynamic_get` (`id`, `add_php_after_getitem`, `add_php_before_getitem`, `add_php_after_getitems`, `add_php_before_getitems`, `add_php_getlistquery`, `php_after_getitem`, `php_before_getitem`, `php_before_getitems`, `php_getlistquery`, `php_after_getitems`, `pagination`, `addcalculation`, `db_selection`, `db_table_main`, `filter`, `getcustom`, `gettype`, `global`, `join_db_table`, `join_view_table`, `main_source`, `name`, `order`, `php_calculation`, `php_custom_get`, `view_selection`, `view_table_main`, `where`, `php_router_parse`, `group`, `params`, `published`, `version`, `hits`, `ordering`, `guid`) VALUES
|
||||
(36, '', '', 1, '', '', '', '', '', '', 'CQkvLyBkbyBhIHF1aWNrIGJ1aWxkIG9mIGFsbCBlZGl0IGxpbmtzIGxpbmtzDQoJCWlmIChpc3NldCgkaXRlbXMpICYmICRpdGVtcykNCgkJew0KCQkJZm9yZWFjaCAoJGl0ZW1zIGFzICRuciA9PiAmJGl0ZW0pDQoJCQl7DQoJCQkJJGNhbkRvID0gW1tbQ29tcG9uZW50XV1dSGVscGVyOjpnZXRBY3Rpb25zKCdsb29rJywkaXRlbSwnbG9va3MnKTsNCgkJCQlpZiAoJGNhbkRvLT5nZXQoJ2xvb2suZWRpdCcpKQ0KCQkJCXsNCgkJCQkJJGl0ZW0tPmVkaXRMaW5rID0gJzxiciAvPjxiciAvPjxhIGNsYXNzPSJ1ay1idXR0b24gdWstYnV0dG9uLXByaW1hcnkgdWstd2lkdGgtMS0xIiBocmVmPSInOw0KCQkJCQkkaXRlbS0+ZWRpdExpbmsgLj0gSlJvdXRlOjpfKCdpbmRleC5waHA/b3B0aW9uPWNvbV9bW1tjb21wb25lbnRdXV0mdmlldz1sb29rJnRhc2s9bG9vay5lZGl0JmlkPScgLiAkaXRlbS0+aWQpOw0KCQkJCQkkaXRlbS0+ZWRpdExpbmsgLj0gJyI+PGkgY2xhc3M9InVrLWljb24tcGVuY2lsIj48L2k+PHNwYW4gY2xhc3M9InVrLWhpZGRlbi1zbWFsbCI+JzsNCgkJCQkJJGl0ZW0tPmVkaXRMaW5rIC49IFRleHQ6Ol8oJ0VkaXQgTG9vaycpOw0KCQkJCQkkaXRlbS0+ZWRpdExpbmsgLj0gJzwvc3Bhbj48L2E+JzsNCgkJCQl9DQoJCQkJZWxzZQ0KCQkJCXsNCgkJCQkJJGl0ZW0tPmVkaXRMaW5rID0gJyc7DQoJCQkJfQ0KCQkJfQ0KCQl9', 1, '', '', '', '', '', 2, '', '', '', 1, 'Looks', '{\"order0\":{\"table_key\":\"a.name\",\"direction\":\"ASC\"}}', '', '', 'a.*', 109, '{\"where0\":{\"table_key\":\"a.published\",\"operator\":\"1\",\"value_key\":\"1\"}}', '', '', '', 1, 12, '', 13, '32b3ae7d-8aa8-47f1-ab2e-30076ddaa029'),
|
||||
(36, '', '', 1, '', '', '', '', '', '', 'CQkvLyBkbyBhIHF1aWNrIGJ1aWxkIG9mIGFsbCBlZGl0IGxpbmtzIGxpbmtzDQoJCWlmIChpc3NldCgkaXRlbXMpICYmICRpdGVtcykNCgkJew0KCQkJZm9yZWFjaCAoJGl0ZW1zIGFzICRuciA9PiAmJGl0ZW0pDQoJCQl7DQoJCQkJJGNhbkRvID0gW1tbQ29tcG9uZW50XV1dSGVscGVyOjpnZXRBY3Rpb25zKCdsb29rJywkaXRlbSwnbG9va3MnKTsNCgkJCQlpZiAoJGNhbkRvLT5nZXQoJ2xvb2suZWRpdCcpKQ0KCQkJCXsNCgkJCQkJJGl0ZW0tPmVkaXRMaW5rID0gJzxiciAvPjxiciAvPjxhIGNsYXNzPSJ1ay1idXR0b24gdWstYnV0dG9uLXByaW1hcnkgdWstd2lkdGgtMS0xIiBocmVmPSInOw0KCQkJCQkkaXRlbS0+ZWRpdExpbmsgLj0gXEpSb3V0ZTo6XygnaW5kZXgucGhwP29wdGlvbj1jb21fW1tbY29tcG9uZW50XV1dJnZpZXc9bG9vayZ0YXNrPWxvb2suZWRpdCZpZD0nIC4gJGl0ZW0tPmlkKTsNCgkJCQkJJGl0ZW0tPmVkaXRMaW5rIC49ICciPjxpIGNsYXNzPSJ1ay1pY29uLXBlbmNpbCI+PC9pPjxzcGFuIGNsYXNzPSJ1ay1oaWRkZW4tc21hbGwiPic7DQoJCQkJCSRpdGVtLT5lZGl0TGluayAuPSBUZXh0OjpfKCdFZGl0IExvb2snKTsNCgkJCQkJJGl0ZW0tPmVkaXRMaW5rIC49ICc8L3NwYW4+PC9hPic7DQoJCQkJfQ0KCQkJCWVsc2UNCgkJCQl7DQoJCQkJCSRpdGVtLT5lZGl0TGluayA9ICcnOw0KCQkJCX0NCgkJCX0NCgkJfQ==', 1, '', '', '', '', '', 2, '', '', '', 1, 'Looks', '{\"order0\":{\"table_key\":\"a.name\",\"direction\":\"ASC\"}}', '', '', 'a.*', 109, '{\"where0\":{\"table_key\":\"a.published\",\"operator\":\"1\",\"value_key\":\"1\"}}', '', '', '', 1, 12, '', 13, '32b3ae7d-8aa8-47f1-ab2e-30076ddaa029'),
|
||||
(39, '', '', '', '', '', '', '', '', '', '', 1, '', '', '', '{\"filter0\":{\"filter_type\":\"1\",\"state_key\":\"id\",\"operator\":\"1\",\"table_key\":\"a.id\"}}', '', 1, '', '', '', 1, 'Looking', '', '', '', 'a.id AS id\r\na.name AS name\r\na.alias AS alias\r\na.description AS description\r\na.add AS add\r\na.email AS email\r\na.mobile_phone AS mobile_phone\r\na.dateofbirth AS dateofbirth\r\na.image AS image\r\na.website AS website\r\na.published AS published\r\na.hits AS hits\r\na.created_by AS created_by', 109, '', '', '', '', 1, 8, '', '', '98e6ea56-0911-4d89-b1f4-8f0bb1e4aa5a');
|
||||
|
||||
--
|
||||
|
@ -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 \JRoute::_('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>
|
||||
|
@ -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 \JRoute::_('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)) : ?>
|
||||
|
@ -58,7 +58,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 \JRoute::_($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">
|
||||
|
@ -79,12 +79,12 @@ abstract class Helper
|
||||
/**
|
||||
* Set the component option
|
||||
*
|
||||
* @param string $option The option
|
||||
* @param string|null $option The option
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public static function setOption(string $option): void
|
||||
public static function setOption(?string $option): void
|
||||
{
|
||||
self::$option = $option;
|
||||
}
|
||||
@ -97,7 +97,7 @@ abstract class Helper
|
||||
* @return string|null A component option
|
||||
* @since 3.0.11
|
||||
*/
|
||||
public static function getOption(string $default = 'empty'): ?string
|
||||
public static function getOption(?string $default = 'empty'): ?string
|
||||
{
|
||||
if (empty(self::$option))
|
||||
{
|
||||
@ -160,7 +160,7 @@ abstract class Helper
|
||||
*
|
||||
* @since 3.0.11
|
||||
*/
|
||||
public static function get(string $option = null, string $default = null): ?string
|
||||
public static function get(?string $option = null, ?string $default = null): ?string
|
||||
{
|
||||
// check that we have an option
|
||||
// and get the code name from it
|
||||
@ -260,7 +260,7 @@ abstract class Helper
|
||||
*
|
||||
* @since 3.0.11
|
||||
*/
|
||||
public static function methodExists(string $method, string $option = null): bool
|
||||
public static function methodExists(string $method, ?string $option = null): bool
|
||||
{
|
||||
// get the helper class
|
||||
return ($helper = self::get($option, null)) !== null &&
|
||||
|
@ -2158,7 +2158,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
}
|
||||
// return found content
|
||||
return str_replace('[[[ROOT-URL]]]', JURI::root(), $target['html']);
|
||||
return str_replace('[[[ROOT-URL]]]', Uri::root(), $target['html']);
|
||||
}
|
||||
}
|
||||
return $default;
|
||||
@ -3308,7 +3308,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 \JRoute::_('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\">";
|
||||
@ -5158,7 +5158,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 \JRoute::_("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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user