diff --git a/CHANGELOG.md b/CHANGELOG.md index f228c6652..0ad531624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ -# v5.1.1-alpha1 +# v5.1.1-alpha2 + +- Adds the ModalSelect fieldtype to Joomla Component Builder - J5 +- Adds the Data Import Function to the Demo Component. +- Adds new country related tables and fields to the Demo Component. +- Resolves the Database Updating issue in the compiler. #1212,#1209 +- Adds the Component Commands Plugin to the CLI for Import of spreadsheet data-sets. + +# v5.1.1-alpha - Move all banners to GitHub. - Adds library phpspreadsheet to JCB. diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index e02069517..685ff2eb9 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

Upgrade to Version 5.1.1-alpha1 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 5.1.1-alpha2 Was Successful! Let us know if anything is not working as expected.

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); diff --git a/README.md b/README.md index 3714ef1f9..c1cea0c26 100644 --- a/README.md +++ b/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 (5.1.1-alpha1) 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 (5.1.1-alpha2) 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*: 4th March, 2025 -+ *Version*: 5.1.1-alpha1 ++ *Last Build*: 28th March, 2025 ++ *Version*: 5.1.1-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **957964** ++ *Line count*: **975213** + *Field count*: **2098** -+ *File count*: **6457** ++ *File count*: **6574** + *Folder count*: **645** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 3714ef1f9..c1cea0c26 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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 (5.1.1-alpha1) 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 (5.1.1-alpha2) 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*: 4th March, 2025 -+ *Version*: 5.1.1-alpha1 ++ *Last Build*: 28th March, 2025 ++ *Version*: 5.1.1-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **957964** ++ *Line count*: **975213** + *Field count*: **2098** -+ *File count*: **6457** ++ *File count*: **6574** + *Folder count*: **645** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php index 2f67bb7db..7f9026741 100644 --- a/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php @@ -72,7 +72,7 @@ class AjaxController extends BaseController // return to a callback function $callback = $jinput->get('callback', null, 'CMD'); // Check Token! - $token = Session::getFormToken(); + $token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { diff --git a/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php b/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php index c02dcc00a..de1ddcced 100644 --- a/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php @@ -56,7 +56,7 @@ class AjaxModel extends ListModel { parent::__construct($config, $factory); - $this->app_params = ComponentHelper::getParams('com_###component###'); - $this->app ??= Factory::getApplication(); + $this->app_params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); }###AJAX_MODEL_METHODS### } diff --git a/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php b/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php index e07898584..b6be60c54 100644 --- a/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php +++ b/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php @@ -51,7 +51,7 @@ class HeaderCheck public function __construct() { // Initializes the application object. - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // Initializes the document object. $this->document = $this->app->getDocument(); diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php b/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php index 87220944e..9e4d299a4 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php @@ -96,7 +96,7 @@ abstract class ###Component###Helper public static function getContributors() { // get params - $params = ComponentHelper::getParams('com_###component###'); + $params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); // start contributors array $contributors = []; // get all Contributors (max 20) @@ -134,7 +134,7 @@ abstract class ###Component###Helper public static function addSubmenu($submenu) { // load user for access menus - $user = Factory::getApplication()->getIdentity(); + $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); // load the submenus to sidebar ###SUBMENU### }###HELPER_CREATEUSER######HELPER_UIKIT######HELPER_EXEL### @@ -216,7 +216,7 @@ abstract class ###Component###Helper { $type = 'item'; } - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select(array('a.published')); $query->from('#__###component###_'.$type.' AS a'); @@ -234,7 +234,7 @@ abstract class ###Component###Helper public static function getGroupName($id) { - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select(array('a.title')); $query->from('#__usergroups AS a'); @@ -268,7 +268,7 @@ abstract class ###Component###Helper if (!Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check($user)) { // get the user object - $user = Factory::getApplication()->getIdentity(); + $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); } // load the CMSObject $result = new CMSObject; @@ -472,7 +472,7 @@ abstract class ###Component###Helper } // Get the model through the MVCFactory - return Factory::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config); + return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config); } /** @@ -542,7 +542,7 @@ abstract class ###Component###Helper if (!$asset->check() || !$asset->store()) { - Factory::getApplication()->enqueueMessage($asset->getError(), 'warning'); + Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->enqueueMessage($asset->getError(), 'warning'); return false; } else @@ -555,7 +555,7 @@ abstract class ###Component###Helper $object->asset_id = (int) $asset->id; // Update their asset_id to link to the asset table. - return Factory::getDbo()->updateObject('#__###component###_'.$table, $object, 'id'); + return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDbo()->updateObject('#__###component###_'.$table, $object, 'id'); } } return false; @@ -572,7 +572,7 @@ abstract class ###Component###Helper if (!$inherit) { // Need to find the asset id by the name of the component. - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php index 91b90a0d1..81cb2fabb 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php @@ -41,10 +41,10 @@ class HelpController extends BaseController public function help() { - $user = Factory::getApplication()->getIdentity(); - $jinput = Factory::getApplication()->input; + $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); + $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; // Check Token! - $token = Session::getFormToken(); + $token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token)) { @@ -83,7 +83,7 @@ class HelpController extends BaseController protected function getHelpDocumentText($id) { - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select(array('a.title','a.content')); $query->from('#__###component###_help_document AS a'); @@ -96,18 +96,18 @@ class HelpController extends BaseController $text = []; $document = $db->loadObject(); // fix image issue - $images['src="images'] = 'src="'.Uri::root().'images'; - $images["src='images"] = "src='".Uri::root()."images"; - $images['src="/images'] = 'src="'.Uri::root().'images'; - $images["src='/images"] = "src='".Uri::root()."images"; + $images['src="images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images'; + $images["src='images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images"; + $images['src="/images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images'; + $images["src='/images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images"; // set document template $text[] = ""; $text[] = ''; $text[] = ""; $text[] = ''; $text[] = "".$document->title.""; - $text[] = ''; - $text[] = ''; + $text[] = ''; + $text[] = ''; $text[] = ""; $text[] = '
'; $text[] = '
'; diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php b/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php index ac42ef225..3576ca1a4 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php @@ -66,7 +66,7 @@ abstract class ###Component###Email { if (!self::$config) { - self::$config = ComponentHelper::getParams('com_###component###'); + self::$config = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); } return self::$config; @@ -153,7 +153,7 @@ abstract class ###Component###Email if ('global' == $mailer) { // get the global details - $globalConf = Factory::getConfig(); + $globalConf = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); $mailer = $globalConf->get('mailer'); $smtpauth = ($globalConf->get('smtpauth') == 0) ? null : 1; diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php index 865a18c44..1af255bc7 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php @@ -35,21 +35,21 @@ class ImportController extends BaseController public function import() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or jexit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN')); $model = $this->getModel('import'); if ($model->import()) { - $cache = Factory::getCache('mod_menu'); + $cache = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getCache('mod_menu'); $cache->clean(); // TODO: Reset the users acl here as well to kill off any missing bits } - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $redirect_url = $app->getUserState('com_###component###.redirect_url'); if (empty($redirect_url)) { - $redirect_url = Route::_('index.php?option=com_###component###&view=import', false); + $redirect_url = Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=import', false); } else { diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php index 59b242d3d..afc9ae354 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php @@ -35,21 +35,21 @@ class ###View###importController extends BaseController public function import() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or jexit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN')); $model = $this->getModel('###View###'); if ($model->import()) { - $cache = Factory::getCache('mod_menu'); + $cache = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getCache('mod_menu'); $cache->clean(); // TODO: Reset the users acl here as well to kill off any missing bits } - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $redirect_url = $app->getUserState('com_###component###.redirect_url'); if (empty($redirect_url)) { - $redirect_url = Route::_('index.php?option=com_###component###&view=###view###', false); + $redirect_url = Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###view###', false); } else { diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php index 87dee6372..1294513fc 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php @@ -63,7 +63,7 @@ class HtmlView extends BaseHtmlView } // get the session object - $session = Factory::getSession(); + $session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession(); // check if it has package $this->hasPackage = $session->get('hasPackage', false); $this->dataType = $session->get('dataType', false); @@ -93,18 +93,18 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - ToolbarHelper::title(Text::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload'); if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { - ToolbarHelper::preferences('com_###component###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###'); } // set help url for this view if found $this->help_url = ###Component###Helper::getHelpUrl('import'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } } } diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php index 7265d0600..0f1609460 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php @@ -43,18 +43,18 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - ToolbarHelper::title(Text::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload'); if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { - ToolbarHelper::preferences('com_###component###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###'); } // set help url for this view if found $this->help_url = ###Component###Helper::getHelpUrl('###view###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } } } diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php index 70efddb07..308eda103 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php @@ -65,7 +65,7 @@ class ImportModel extends BaseDatabaseModel */ protected function populateState() { - $app = Factory::getApplication('administrator'); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication('administrator'); $this->setState('message', $app->getUserState('com_###component###.message')); $app->setUserState('com_###component###.message', ''); @@ -85,8 +85,8 @@ class ImportModel extends BaseDatabaseModel public function import() { $this->setState('action', 'import'); - $app = Factory::getApplication(); - $session = Factory::getSession(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); + $session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession(); $package = null; $continue = false; // get import type @@ -123,7 +123,7 @@ class ImportModel extends BaseDatabaseModel break; default: - $app->setUserState('com_###component###.message', Text::_('COM_###COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND')); + $app->setUserState('com_###component###.message', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND')); return false; break; @@ -137,7 +137,7 @@ class ImportModel extends BaseDatabaseModel $this->remove($package['packagename']); } - $app->setUserState('com_###component###.message', Text::_('COM_###COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); + $app->setUserState('com_###component###.message', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); return false; } @@ -155,7 +155,7 @@ class ImportModel extends BaseDatabaseModel if (!$this->setData($package,$this->dataType,$headerList)) { // There was an error importing the package - $msg = Text::_('COM_###COMPONENT###_IMPORT_ERROR'); + $msg = Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_ERROR'); $back = $session->get('backto_VDM_IMPORT', NULL); if ($back) { @@ -167,7 +167,7 @@ class ImportModel extends BaseDatabaseModel else { // Package imported sucessfully - $msg = Text::sprintf('COM_###COMPONENT###_IMPORT_SUCCESS', $package['packagename']); + $msg = Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('COM_###COMPONENT###_IMPORT_SUCCESS', $package['packagename']); $back = $session->get('backto_VDM_IMPORT', NULL); if ($back) { @@ -195,7 +195,7 @@ class ImportModel extends BaseDatabaseModel protected function _getPackageFromUpload() { // Get the uploaded file information - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $input = $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. @@ -204,26 +204,26 @@ class ImportModel extends BaseDatabaseModel // Make sure that file uploads are enabled in php if (!(bool) ini_get('file_uploads')) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); return false; } // If there is no uploaded file, we have a problem... if (!is_array($userfile)) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); return false; } // Check if there was a problem uploading the file. if ($userfile['error'] || $userfile['size'] < 1) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); return false; } // Build the appropriate paths - $config = Factory::getConfig(); + $config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; $tmp_src = $userfile['tmp_name']; @@ -233,7 +233,7 @@ class ImportModel extends BaseDatabaseModel // Was the package downloaded? if (!$p_file) { - $session = Factory::getSession(); + $session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession(); $session->clear('package'); $session->clear('dataType'); $session->clear('hasPackage'); @@ -255,7 +255,7 @@ class ImportModel extends BaseDatabaseModel */ protected function _getPackageFromFolder() { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $input = $app->input; // Get the path to the package to import @@ -264,7 +264,7 @@ class ImportModel extends BaseDatabaseModel // Did you give us a valid path? if (!file_exists($p_dir)) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); return false; } @@ -274,14 +274,14 @@ class ImportModel extends BaseDatabaseModel // Did you give us a valid package? if (!$type) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); } // check the extention if(!$this->checkExtension($p_dir)) { // set error message - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; } @@ -300,7 +300,7 @@ class ImportModel extends BaseDatabaseModel */ protected function _getPackageFromUrl() { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $input = $app->input; // Get the URL of the package to import @@ -309,7 +309,7 @@ class ImportModel extends BaseDatabaseModel // Did you give us a URL? if (!$url) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning'); return false; } @@ -319,7 +319,7 @@ class ImportModel extends BaseDatabaseModel // Was the package downloaded? if (!$p_file) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning'); return false; } @@ -340,7 +340,7 @@ class ImportModel extends BaseDatabaseModel */ protected function check($archivename) { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // Clean the name $archivename = Path::clean($archivename); @@ -349,11 +349,11 @@ class ImportModel extends BaseDatabaseModel { // Cleanup the import files $this->remove($archivename); - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; } - $config = Factory::getConfig(); + $config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); // set Package Name $check['packagename'] = $archivename; @@ -378,7 +378,7 @@ class ImportModel extends BaseDatabaseModel { jimport('joomla.filesystem.file'); - $config = Factory::getConfig(); + $config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); $package = $config->get('tmp_path'). '/' .$package; // Is the package file a valid file? @@ -396,7 +396,7 @@ class ImportModel extends BaseDatabaseModel protected function getAlias($name,$type = false) { // sanitize the name to an alias - if (Factory::getConfig()->get('unicodeslugs') == 1) + if (Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig()->get('unicodeslugs') == 1) { $alias = OutputFilter::stringURLUnicodeSlug($name); } diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php index 7b3b58651..465bbcec1 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php @@ -65,7 +65,7 @@ class ###View###importModel extends BaseDatabaseModel */ protected function populateState() { - $app = Factory::getApplication('administrator'); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication('administrator'); $this->setState('message', $app->getUserState('com_###component###.message')); $app->setUserState('com_###component###.message', ''); @@ -85,7 +85,7 @@ class ###View###importModel extends BaseDatabaseModel protected function _getPackageFromUpload() { // Get the uploaded file information - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $input = $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. @@ -94,26 +94,26 @@ class ###View###importModel extends BaseDatabaseModel // Make sure that file uploads are enabled in php if (!(bool) ini_get('file_uploads')) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); return false; } // If there is no uploaded file, we have a problem... if (!is_array($userfile)) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); return false; } // Check if there was a problem uploading the file. if ($userfile['error'] || $userfile['size'] < 1) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); return false; } // Build the appropriate paths - $config = Factory::getConfig(); + $config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; $tmp_src = $userfile['tmp_name']; @@ -123,7 +123,7 @@ class ###View###importModel extends BaseDatabaseModel // Was the package downloaded? if (!$p_file) { - $session = Factory::getSession(); + $session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession(); $session->clear('package'); $session->clear('dataType'); $session->clear('hasPackage'); @@ -145,7 +145,7 @@ class ###View###importModel extends BaseDatabaseModel */ protected function _getPackageFromFolder() { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $input = $app->input; // Get the path to the package to import @@ -154,7 +154,7 @@ class ###View###importModel extends BaseDatabaseModel // Did you give us a valid path? if (!file_exists($p_dir)) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); return false; } @@ -164,14 +164,14 @@ class ###View###importModel extends BaseDatabaseModel // Did you give us a valid package? if (!$type) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); } // check the extention if(!$this->checkExtension($p_dir)) { // set error message - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; } @@ -190,7 +190,7 @@ class ###View###importModel extends BaseDatabaseModel */ protected function _getPackageFromUrl() { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $input = $app->input; // Get the URL of the package to import @@ -199,7 +199,7 @@ class ###View###importModel extends BaseDatabaseModel // Did you give us a URL? if (!$url) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning'); return false; } @@ -209,7 +209,7 @@ class ###View###importModel extends BaseDatabaseModel // Was the package downloaded? if (!$p_file) { - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning'); return false; } @@ -230,7 +230,7 @@ class ###View###importModel extends BaseDatabaseModel */ protected function check($archivename) { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // Clean the name $archivename = Path::clean($archivename); @@ -239,11 +239,11 @@ class ###View###importModel extends BaseDatabaseModel { // Cleanup the import files $this->remove($archivename); - $app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + $app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; } - $config = Factory::getConfig(); + $config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); // set Package Name $check['packagename'] = $archivename; @@ -267,7 +267,7 @@ class ###View###importModel extends BaseDatabaseModel */ protected function remove($package) { - $config = Factory::getConfig(); + $config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig(); $package = $config->get('tmp_path'). '/' .$package; // Is the package file a valid file? @@ -287,7 +287,7 @@ class ###View###importModel extends BaseDatabaseModel protected function getAlias($name,$type = false) { // sanitize the name to an alias - if (Factory::getConfig()->get('unicodeslugs') == 1) + if (Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig()->get('unicodeslugs') == 1) { $alias = OutputFilter::stringURLUnicodeSlug($name); } diff --git a/admin/compiler/joomla_4/ADMIN_VIEW.php b/admin/compiler/joomla_4/ADMIN_VIEW.php index 1790e1989..1fc79448d 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW.php @@ -19,9 +19,12 @@ defined('_JCB_TEMPLATE') or die; // No direct access to this file defined('_JEXEC') or die; +$layout = $this->isModal ? 'modal' : 'edit'; +$tmpl = $this->input->get('tmpl'); +$tmpl = $tmpl ? '&tmpl=' . $tmpl : ''; ?> ###EDITBODYFADEIN### -
+ ###EDITBODY###
###EDITBODYSCRIPT### diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS.php b/admin/compiler/joomla_4/ADMIN_VIEWS.php index 90dd4a345..863600280 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS.php @@ -22,7 +22,7 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### if ($this->saveOrder) { $saveOrderingUrl = 'index.php?option=com_###component###&task=###views###.saveOrderAjax&tmpl=component'; - Html::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> ###VIEWS_DEFAULT_BODY######VIEWS_FOOTER_SCRIPT### diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php index 4ce16d9a2..a338c8ea0 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php @@ -76,6 +76,22 @@ class HtmlView extends BaseHtmlView */ public string $return_here; + /** + * The title key used in modal + * + * @var string + * @since 5.2.1 + */ + public string $modalTitleKey; + + /** + * The modal state + * + * @var bool + * @since 5.2.1 + */ + public bool $isModal; + /** * The user object. * @@ -104,7 +120,7 @@ class HtmlView extends BaseHtmlView $this->user ??= $this->getCurrentUser();###ADMIN_DIPLAY_METHOD### $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value - $this->return_here = urlencode(base64_encode((string) Uri::getInstance())); + $this->return_here = urlencode(base64_encode((string) Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance())); // get global action permissions $this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO### @@ -115,8 +131,10 @@ class HtmlView extends BaseHtmlView } // We don't need toolbar in the modal window. + $this->isModal = true; if ($this->getLayout() !== 'modal') { + $this->isModal = false; $this->addToolbar(); } @@ -141,11 +159,11 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - ToolbarHelper::title(Text::_('COM_###COMPONENT###_###VIEWS###'), '###ICOMOON###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEWS###'), '###ICOMOON###'); if ($this->canCreate) { - ToolbarHelper::addNew('###view###.add'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::addNew('###view###.add'); } // Only load if there are items @@ -153,28 +171,28 @@ class HtmlView extends BaseHtmlView { if ($this->canEdit) { - ToolbarHelper::editList('###view###.edit'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::editList('###view###.edit'); } if ($this->canState) { - ToolbarHelper::publishList('###views###.publish'); - ToolbarHelper::unpublishList('###views###.unpublish'); - ToolbarHelper::archiveList('###views###.archive'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::publishList('###views###.publish'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::unpublishList('###views###.unpublish'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::archiveList('###views###.archive'); if ($this->canDo->get('core.admin')) { - ToolbarHelper::checkin('###views###.checkin'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::checkin('###views###.checkin'); } }###CUSTOM_ADMIN_DYNAMIC_BUTTONS######ADMIN_CUSTOM_BUTTONS_LIST### if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) { - ToolbarHelper::deleteList('', '###views###.delete', 'JTOOLBAR_EMPTY_TRASH'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::deleteList('', '###views###.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($this->canState && $this->canDelete) { - ToolbarHelper::trash('###views###.trash'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::trash('###views###.trash'); }###EXPORTBUTTON### }###ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST######IMPORTBUTTON### @@ -182,13 +200,13 @@ class HtmlView extends BaseHtmlView $this->help_url = ###Component###Helper::getHelpUrl('###views###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // add the options comp button if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { - ToolbarHelper::preferences('com_###component###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###'); }###FILTERFIELDDISPLAYHELPER######BATCHDISPLAYHELPER### } @@ -200,16 +218,16 @@ class HtmlView extends BaseHtmlView */ protected function _prepareDocument(): void {###JQUERY### - $this->getDocument()->setTitle(Text::_('COM_###COMPONENT###_###VIEWS###')); + $this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEWS###')); // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); } // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###ADMIN_ADD_JAVASCRIPT_FILE### } @@ -233,6 +251,17 @@ class HtmlView extends BaseHtmlView return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length); } + /** + * Get the modal data/title key + * + * @return string The key value. + * @since 5.2.1 + */ + public function getModalTitleKey(): string + { + return $this->modalTitleKey ?? 'id'; + } + /** * Returns an array of fields the table can be sorted by * diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php b/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php new file mode 100644 index 000000000..556b1977d --- /dev/null +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php @@ -0,0 +1,39 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this JCB template file (EVER) +defined('_JCB_TEMPLATE') or die; +?> +###BOM### + +###ADMIN_VIEWS_MODAL_HEADER### + +// No direct access to this file +defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### + +/** @var \###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###Views###\HtmlView $this */ + +$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); + +if ($app->isClient('site')) { + Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken('get') or die(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN')); +} + +// dynamic selection of title key (link in modal) +$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); + +/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ +$wa = $this->getDocument()->getWebAssetManager(); +$wa->useScript('core') + ->useScript('multiselect') + ->useScript('modal-content-select'); +?> +###VIEWS_MODAL_BODY######VIEWS_FOOTER_SCRIPT### diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php b/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php index 7431385d4..c91a82fcb 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php @@ -76,7 +76,7 @@ class ###Views###Model extends ListModel parent::__construct($config, $factory); - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); }###ADMIN_CUSTOM_BUTTONS_METHOD_LIST### /** diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php index dd968b1e6..cb99ae359 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php @@ -149,13 +149,13 @@ class ###View###Controller extends FormController */ public function batch($model = null) { - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or exit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN')); // Set the model $model = $this->getModel('###View###', '', []); // Preset the redirect - $this->setRedirect(Route::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -180,13 +180,13 @@ class ###View###Controller extends FormController $cancel = parent::cancel($key); - if (!is_null($return) && Uri::isInternal(base64_decode($return))) + if (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( $redirect, false ) ); @@ -197,7 +197,7 @@ class ###View###Controller extends FormController // Redirect to the item screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -208,7 +208,7 @@ class ###View###Controller extends FormController // Redirect to the list screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -234,7 +234,7 @@ class ###View###Controller extends FormController // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -252,7 +252,7 @@ class ###View###Controller extends FormController // Redirect to the return value. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( $redirect, false ) ); @@ -263,7 +263,7 @@ class ###View###Controller extends FormController // Redirect to the item screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -274,7 +274,7 @@ class ###View###Controller extends FormController // Redirect to the list screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php index 4cafee33a..42330c61e 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php @@ -36,6 +36,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The input class + * + * @var Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power + * @since 5.2.1 + */ + public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input; + /** * The state object * @@ -108,6 +116,14 @@ class HtmlView extends BaseHtmlView */ public string $referral; + /** + * The modal state + * + * @var bool + * @since 5.2.1 + */ + public bool $isModal; + /** * ###View### view display method * @@ -120,7 +136,7 @@ class HtmlView extends BaseHtmlView public function display($tpl = null): void { // set params - $this->params = ComponentHelper::getParams('com_###component###'); + $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); $this->useCoreUI = true; // Assign the variables $this->form ??= $this->get('Form'); @@ -131,10 +147,10 @@ class HtmlView extends BaseHtmlView // get action permissions $this->canDo = ###Component###Helper::getActions('###view###', $this->item); // get input - $jinput = Factory::getApplication()->input; - $this->ref = $jinput->get('ref', 0, 'word'); - $this->refid = $jinput->get('refid', 0, 'int'); - $return = $jinput->get('return', null, 'base64'); + $this->input ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + $return = $this->input->get('return', null, 'base64'); // set the referral string $this->referral = ''; if ($this->refid && $this->ref) @@ -155,7 +171,16 @@ class HtmlView extends BaseHtmlView }###LINKEDVIEWITEMS### // Set the toolbar - $this->addToolBar(); + if ($this->getLayout() !== 'modal') + { + $this->isModal = false; + $this->addToolbar(); + } + else + { + $this->isModal = true; + $this->addModalToolbar(); + } // Check for errors. if (count($errors = $this->get('Errors'))) @@ -170,11 +195,11 @@ class HtmlView extends BaseHtmlView parent::display($tpl); } - /** * Add the page title and toolbar. * * @return void + * @throws \Exception * @since 1.6 */ protected function addToolbar(): void @@ -182,6 +207,18 @@ class HtmlView extends BaseHtmlView ###ADDTOOLBAR### } + /** + * Add the modal toolbar. + * + * @return void + * @throws \Exception + * @since 5.0.0 + */ + protected function addModalToolbar() + { + ###ADDMODALTOOLBAR### + } + /** * Escapes a value for output in a view script. * @@ -211,16 +248,16 @@ class HtmlView extends BaseHtmlView protected function _prepareDocument(): void {###JQUERY### $isNew = ($this->item->id < 1); - $this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); + $this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); }###AJAXTOKE######LINKEDVIEWTABLESCRIPTS### // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###DOCUMENT_CUSTOM_PHP### } } diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_MODAL.php b/admin/compiler/joomla_4/ADMIN_VIEW_MODAL.php new file mode 100644 index 000000000..08be00f4b --- /dev/null +++ b/admin/compiler/joomla_4/ADMIN_VIEW_MODAL.php @@ -0,0 +1,28 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this JCB template file (EVER) +defined('_JCB_TEMPLATE') or die; +?> +###BOM### + +// No direct access to this file +defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### + +/** @var \###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###View###\HtmlView $this */ +?> +
+ getDocument()->getToolbar('toolbar')->render(); ?> +
+
+ setLayout('edit'); ?> + loadTemplate(); ?> +
diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php index b425ecfb7..2a5b1659a 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php @@ -229,7 +229,7 @@ class ###View###Model extends AdminModel */ protected function prepareTable($table) {###LICENSE_TABLE_LOCKED_CHECK### - $date = Factory::getDate(); + $date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate(); $user = $this->getCurrentUser(); if (isset($table->name)) @@ -285,7 +285,7 @@ class ###View###Model extends AdminModel protected function loadFormData() { // Check the session for previously entered form data. - $data = Factory::getApplication()->getUserState('com_###component###.edit.###view###.data', []); + $data = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getUserState('com_###component###.edit.###view###.data', []); if (empty($data)) { @@ -359,7 +359,7 @@ class ###View###Model extends AdminModel if (empty($pks)) { - $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } @@ -376,7 +376,7 @@ class ###View###Model extends AdminModel if (!$this->canDo->get('core.batch')) { - $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -419,7 +419,7 @@ class ###View###Model extends AdminModel if (!$done) { - $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -439,7 +439,7 @@ class ###View###Model extends AdminModel */ public function save($data) { - $input = Factory::getApplication()->getInput(); + $input = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput(); $filter = InputFilter::getInstance(); // set the metadata to the Item Data diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php b/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php index 0a38769fe..2fb449e97 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php @@ -107,7 +107,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab */ public function store($updateNulls = false) { - $date = Factory::getDate()->toSql(); + $date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate()->toSql(); $userId = $this->getCurrentUser()->id; if ($this->id) @@ -137,11 +137,11 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab if ($table->load(['alias' => $this->alias###JTABLEALIASCATEGORY###]) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(Text::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS')); if ($table->published === -2) { - $this->setError(Text::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS_TRASHED')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS_TRASHED')); } return false; @@ -258,7 +258,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW.php index 47e384fe5..9a502d4c3 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW.php @@ -24,5 +24,5 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_CODE_BODY## item->id)) ? '&id='. (int) $this->item->id : ''; ?> ###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM### -

+

diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS.php index 6b23540da..fc7009dac 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS.php @@ -23,5 +23,5 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_CODE_BODY## canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT### ###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM### -

+

diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php index 0fbe25922..d7472fe85 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php @@ -60,6 +60,6 @@ class ###SViews###Controller extends AdminController */ public function dashboard(): void { - $this->setRedirect(Route::_('index.php?option=com_###component###', false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###', false)); }###CUSTOM_ADMIN_CUSTOM_BUTTONS_CONTROLLER### } diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php index a557e3aff..880997ef0 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php @@ -72,9 +72,9 @@ class HtmlView extends BaseHtmlView public function display($tpl = null): void { // get component params - $this->params = ComponentHelper::getParams('com_###component###'); + $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); // get the application - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // get the user object $this->user ??= $this->getCurrentUser(); // get global action permissions @@ -99,12 +99,12 @@ class HtmlView extends BaseHtmlView // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); }###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### } @@ -117,19 +117,19 @@ class HtmlView extends BaseHtmlView protected function addToolbar(): void {###HIDEMAINMENU### // add title to the page - ToolbarHelper::title(Text::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS### + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS### // set help url for this view if found $this->help_url = ###Component###Helper::getHelpUrl('###sviews###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // add the options comp button if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { - ToolbarHelper::preferences('com_###component###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###'); } }###CUSTOM_ADMIN_GET_MODULE### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php index bfa9f8e64..1a4508a9e 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php @@ -125,7 +125,7 @@ class ###SViews###Model extends ListModel { parent::__construct($config, $factory); - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->input ??= $this->app->getInput(); // Set the current user for authorisation checks (for those calling this model directly) @@ -162,7 +162,7 @@ class ###SViews###Model extends ListModel // check if this user has permission to access items if (!$user->authorise('###sviews###.access', 'com_###component###')) { - $this->app->enqueueMessage(Text::_('Not authorised!'), 'error'); + $this->app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Not authorised!'), 'error'); // redirect away if not a correct to default view $this->app->redirect('index.php?option=com_###component###'); return false; @@ -171,7 +171,7 @@ class ###SViews###Model extends ListModel $items = parent::getItems(); // Get the global params - $globalParams = ComponentHelper::getParams('com_###component###', true);###CUSTOM_ADMIN_GET_ITEMS######CUSTOM_ADMIN_AFTER_GET_ITEMS### + $globalParams = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###', true);###CUSTOM_ADMIN_GET_ITEMS######CUSTOM_ADMIN_AFTER_GET_ITEMS### // return items return $items; diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php index b7fa6648b..9698f0a04 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php @@ -51,6 +51,6 @@ class ###SView###Controller extends BaseController */ public function dashboard(): void { - $this->setRedirect(Route::_('index.php?option=com_###component###', false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###', false)); }###CUSTOM_ADMIN_CUSTOM_BUTTONS_CONTROLLER### } diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php index 4d62671ec..f2efbcef4 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php @@ -40,11 +40,11 @@ class HtmlView extends BaseHtmlView public function display($tpl = null): void { // get component params - $this->params = ComponentHelper::getParams('com_###component###'); + $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); // get the application - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // get the user object - $this->user ??= Factory::getApplication()->getIdentity(); + $this->user ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); // get global action permissions $this->canDo = ###Component###Helper::getActions('###sview###'); $this->styles = $this->get('Styles'); @@ -67,12 +67,12 @@ class HtmlView extends BaseHtmlView // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); }###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS### } @@ -92,22 +92,22 @@ class HtmlView extends BaseHtmlView // Check for empty title and add view name if param is set if (empty($title)) { - $title = Text::_('COM_###COMPONENT###_###SVIEW###'); + $title = Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###SVIEW###'); } // add title to the page - ToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS### + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS### // set help url for this view if found $this->help_url = ###Component###Helper::getHelpUrl('###sviews###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // add the options comp button if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { - ToolbarHelper::preferences('com_###component###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###'); } }###CUSTOM_ADMIN_GET_MODULE### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php index dc935fd94..eea79287e 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php @@ -139,7 +139,7 @@ class ###SView###Model extends ItemModel { parent::__construct($config, $factory); - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->input ??= $this->app->getInput(); // Set the current user for authorisation checks (for those calling this model directly) @@ -185,7 +185,7 @@ class ###SView###Model extends ItemModel // check if this user has permission to access item if (!$this->user->authorise('###sview###.access', 'com_###component###')) { - $this->app->enqueueMessage(Text::_('Not authorised!'), 'error'); + $this->app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Not authorised!'), 'error'); // redirect away if not a correct to cPanel/default view $this->app->redirect('index.php?option=com_###component###'); return false; diff --git a/admin/compiler/joomla_4/DASH_MODEL.php b/admin/compiler/joomla_4/DASH_MODEL.php index 4cbaf38a2..3ed7bfedf 100644 --- a/admin/compiler/joomla_4/DASH_MODEL.php +++ b/admin/compiler/joomla_4/DASH_MODEL.php @@ -51,7 +51,7 @@ class ###Component###Model extends ListModel public function getIcons() { // load user for access menus - $user = Factory::getApplication()->getIdentity(); + $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); // reset icon array $icons = []; // view groups array diff --git a/admin/compiler/joomla_4/DASH_VIEW_HTML.php b/admin/compiler/joomla_4/DASH_VIEW_HTML.php index 464b34941..452891aeb 100644 --- a/admin/compiler/joomla_4/DASH_VIEW_HTML.php +++ b/admin/compiler/joomla_4/DASH_VIEW_HTML.php @@ -71,18 +71,18 @@ class HtmlView extends BaseHtmlView protected function addToolbar(): void { $canDo = ###Component###Helper::getActions('###component###'); - ToolbarHelper::title(Text::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2'); // set help url for this view if found $this->help_url = ###Component###Helper::getHelpUrl('###component###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { - ToolbarHelper::preferences('com_###component###'); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###'); } } @@ -95,18 +95,18 @@ class HtmlView extends BaseHtmlView protected function _prepareDocument(): void { // set page title - $this->getDocument()->setTitle(Text::_('COM_###COMPONENT###_DASHBOARD')); + $this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_DASHBOARD')); // add manifest to page JavaScript $this->getDocument()->addScriptDeclaration("var manifest = JSON.parse(" . json_encode($this->manifest) . ");", "text/javascript"); // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); } // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); } } } diff --git a/admin/compiler/joomla_4/FORM_MODAL_SELECT_FIELD.php b/admin/compiler/joomla_4/FORM_MODAL_SELECT_FIELD.php new file mode 100644 index 000000000..9c1d06924 --- /dev/null +++ b/admin/compiler/joomla_4/FORM_MODAL_SELECT_FIELD.php @@ -0,0 +1,74 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this JCB template file (EVER) +defined('_JCB_TEMPLATE') or die; +?> +###BOM### +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field; + +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Field\ModalSelectField as ModalSelectFieldCore; +use Joomla\Database\ParameterType; + +// No direct access to this file +\defined('_JEXEC') or die; + +/** + * A modal content selection field, now with the radical ability to handle string-based GUIDs. + * Because, apparently, assuming everything is an integer was the hill to die on. + * + * This override exists solely to bypass a hardcoded constraint that shouldn't have been there in the first place. + * But hey, at least we get another class extension to maintain! + * + * @since 5.0.0 + */ +class ModalSelectField extends ModalSelectFieldCore +{ + /** + * Method to retrieve the title of selected item. + * + * @return string + * + * @since 5.0.0 + */ + protected function getValueTitle() + { + // Selecting the title for the field value, when required info were given + if ($this->value && $this->sql_title_table && $this->sql_title_column && $this->sql_title_key) { + try { + $db = $this->getDatabase(); + $query = $db->getQuery(true) + ->select($db->quoteName($this->sql_title_column)) + ->from($db->quoteName($this->sql_title_table)) + ->where($db->quoteName($this->sql_title_key) . ' = :value') + ->bind(':value', $this->value, is_numeric($this->value) ? ParameterType::INTEGER : ParameterType::STRING); + + /** + * All this—just because someone decided to hardcode [ParameterType::INTEGER] in the core. + * We could have just handle it dynamically, but no... + * + * Polymorphic behavior isn't the enemy. Hardcoded constraints that force class extensions? + * Now *that's* the real problem. But sure, let's keep pretending that integers are the + * only valid identifiers in a database. + */ + + $db->setQuery($query); + + return $db->loadResult() ?: $this->value; + } catch (\Throwable $e) { + Factory::getApplication()->enqueueMessage($e->getMessage(), 'error'); + } + } + + return $this->value; + } +} \ No newline at end of file diff --git a/admin/compiler/joomla_4/INSTALLER_SCRIPT.php b/admin/compiler/joomla_4/INSTALLER_SCRIPT.php index ead990145..472d9fbbf 100644 --- a/admin/compiler/joomla_4/INSTALLER_SCRIPT.php +++ b/admin/compiler/joomla_4/INSTALLER_SCRIPT.php @@ -122,8 +122,8 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { $this->minimumJoomla = '4.3'; $this->minimumPhp = JOOMLA_MINIMUM_PHP; - $this->app ??= Factory::getApplication(); - $this->db = Factory::getContainer()->get(DatabaseInterface::class); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); + $this->db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); // check if the files exist if (is_file(JPATH_ROOT . '/administrator/components/com_###component###/###component###.php')) @@ -212,7 +212,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface // Check for the minimum PHP version before continuing if (!empty($this->minimumPhp) && version_compare(PHP_VERSION, $this->minimumPhp, '<')) { - Log::add(Text::sprintf('JLIB_INSTALLER_MINIMUM_PHP', $this->minimumPhp), Log::WARNING, 'jerror'); + Log::add(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_MINIMUM_PHP', $this->minimumPhp), Log::WARNING, 'jerror'); return false; } @@ -220,7 +220,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface // Check for the minimum Joomla version before continuing if (!empty($this->minimumJoomla) && version_compare(JVERSION, $this->minimumJoomla, '<')) { - Log::add(Text::sprintf('JLIB_INSTALLER_MINIMUM_JOOMLA', $this->minimumJoomla), Log::WARNING, 'jerror'); + Log::add(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_MINIMUM_JOOMLA', $this->minimumJoomla), Log::WARNING, 'jerror'); return false; } @@ -361,7 +361,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { if (is_file(JPATH_ROOT . $file) && !File::delete(JPATH_ROOT . $file)) { - echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $file) . '
'; + echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $file) . '
'; } } } @@ -372,7 +372,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { if (is_dir(JPATH_ROOT . $folder) && !Folder::delete(JPATH_ROOT . $folder)) { - echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $folder) . '
'; + echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $folder) . '
'; } } } @@ -394,7 +394,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface if (file_exists(JPATH_ROOT . $file) && !File::move(JPATH_ROOT . $file, JPATH_ROOT . '/cli/' . $name)) { - echo Text::sprintf('JLIB_INSTALLER_FILE_ERROR_MOVE', $name); + echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_FILE_ERROR_MOVE', $name); } } } @@ -450,7 +450,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If its successfully update. $this->app->enqueueMessage( - Text::sprintf('The (%s) was found in the #__content_types table, and updated.', $content->type_alias) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was found in the #__content_types table, and updated.', $content->type_alias) ); } } @@ -458,7 +458,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If its successfully added. $this->app->enqueueMessage( - Text::sprintf('The (%s) was added to the #__content_types table.', $content->type_alias) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was added to the #__content_types table.', $content->type_alias) ); } } @@ -510,7 +510,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If its successfully update. $this->app->enqueueMessage( - Text::sprintf('The (%s) was found in the #__action_log_config table, and updated.', $content->type_alias) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was found in the #__action_log_config table, and updated.', $content->type_alias) ); } } @@ -518,7 +518,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If its successfully added. $this->app->enqueueMessage( - Text::sprintf('The (%s) was added to the #__action_log_config table.', $content->type_alias) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was added to the #__action_log_config table.', $content->type_alias) ); } } @@ -549,14 +549,14 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If its already set don't set it again. $this->app->enqueueMessage( - Text::_('The (com_###component###) is already in the #__action_logs_extensions table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) is already in the #__action_logs_extensions table.') ); } elseif ($this->db->insertObject('#__action_logs_extensions', $data)) { // give a success message $this->app->enqueueMessage( - Text::_('The (com_###component###) was successfully added to the #__action_logs_extensions table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) was successfully added to the #__action_logs_extensions table.') ); } } @@ -594,7 +594,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // give a success message $this->app->enqueueMessage( - Text::_('The (com_###component###) rules was successfully added to the #__assets table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) rules was successfully added to the #__assets table.') ); } } @@ -632,7 +632,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // give a success message $this->app->enqueueMessage( - Text::_('The (com_###component###) params was successfully added to the #__extensions table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) params was successfully added to the #__extensions table.') ); } } @@ -670,7 +670,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface if ($done) { $this->app->enqueueMessage( - Text::sprintf('The #__assets table rules column was resized to the %s datatype for the components possible large permission rules.', $dataType) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The #__assets table rules column was resized to the %s datatype for the components possible large permission rules.', $dataType) ); } } @@ -749,7 +749,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully remove Item add queued success message. $this->app->enqueueMessage( - Text::sprintf('The (%s) type alias was removed from the #__content_type table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the #__content_type table.', $context) ); } @@ -810,7 +810,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully remove context add queued success message. $this->app->enqueueMessage( - Text::sprintf('The fields with context (%s) was removed from the #__fields table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The fields with context (%s) was removed from the #__fields table.', $context) ); } @@ -846,7 +846,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully remove release_check add queued success message. $this->app->enqueueMessage( - Text::sprintf('The fields values for (%s) was removed from the #__fields_values table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The fields values for (%s) was removed from the #__fields_values table.', $context) ); } } @@ -900,7 +900,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully remove context add queued success message. $this->app->enqueueMessage( - Text::sprintf('The fields with context (%s) was removed from the #__fields_groups table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The fields with context (%s) was removed from the #__fields_groups table.', $context) ); } } @@ -933,7 +933,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully removed Items add queued success message. $this->app->enqueueMessage( - Text::sprintf('The (%s) items were removed from the #__history table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) items were removed from the #__history table.', $context) ); } } @@ -967,7 +967,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface } $this->app->enqueueMessage( - Text::_('All related items was removed from the #__ucm_base table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('All related items was removed from the #__ucm_base table.') ); } @@ -998,7 +998,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully removed Item add queued success message. $this->app->enqueueMessage( - Text::sprintf('The (%s) type alias was removed from the #__ucm_content table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the #__ucm_content table.', $context) ); } } @@ -1033,7 +1033,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully remove Item add queued success message. $this->app->enqueueMessage( - Text::sprintf('The (%s) type alias was removed from the #__contentitem_tag_map table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the #__contentitem_tag_map table.', $context) ); } } @@ -1065,7 +1065,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully removed ###component### view add queued success message. $this->app->enqueueMessage( - Text::sprintf('The (%s) type alias was removed from the #__action_log_config table.', $context) + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the #__action_log_config table.', $context) ); } } @@ -1093,7 +1093,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully removed ###component### add queued success message. $this->app->enqueueMessage( - Text::_('All related (com_###component###) items was removed from the #__assets table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('All related (com_###component###) items was removed from the #__assets table.') ); } } @@ -1123,7 +1123,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface { // If successfully remove ###component### add queued success message. $this->app->enqueueMessage( - Text::_('The (com_###component###) extension was removed from the #__action_logs_extensions table.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) extension was removed from the #__action_logs_extensions table.') ); } } @@ -1151,13 +1151,13 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface $this->db->execute(); $this->app->enqueueMessage( - Text::_('Reverted the #__assets table rules column back to its default size of varchar(5120).') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Reverted the #__assets table rules column back to its default size of varchar(5120).') ); } else { $this->app->enqueueMessage( - Text::_('Could not revert the #__assets table rules column back to its default size of varchar(5120), since there is still one or more components that still requires the column to be larger.') + Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Could not revert the #__assets table rules column back to its default size of varchar(5120), since there is still one or more components that still requires the column to be larger.') ); } } diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW.php index 285eb38ee..e6ba13119 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW.php @@ -22,7 +22,7 @@ defined('_JEXEC') or die; ?>
toolbar->render(); ?> -
+ ###EDITBODY###
###EDITBODYSCRIPT### diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php index 041cb4278..de943723f 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php @@ -149,13 +149,13 @@ class ###View###Controller extends FormController */ public function batch($model = null) { - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or jexit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN')); // Set the model $model = $this->getModel('###View###', '', []); // Preset the redirect - $this->setRedirect(Route::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -180,13 +180,13 @@ class ###View###Controller extends FormController $cancel = parent::cancel($key); - if (!is_null($return) && Uri::isInternal(base64_decode($return))) + if (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( $redirect, false ) ); @@ -197,7 +197,7 @@ class ###View###Controller extends FormController // Redirect to the item screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -208,7 +208,7 @@ class ###View###Controller extends FormController // Redirect to the list screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -234,7 +234,7 @@ class ###View###Controller extends FormController // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -252,7 +252,7 @@ class ###View###Controller extends FormController // Redirect to the return value. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( $redirect, false ) ); @@ -263,7 +263,7 @@ class ###View###Controller extends FormController // Redirect to the item screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -274,7 +274,7 @@ class ###View###Controller extends FormController // Redirect to the list screen. $this->setRedirect( - Route::_( + Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_( 'index.php?option=' . $this->option . $redirect, false ) ); diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php index 87d613574..327e9f811 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php @@ -118,7 +118,7 @@ class HtmlView extends BaseHtmlView public function display($tpl = null) { // set params - $this->params = ComponentHelper::getParams('com_###component###'); + $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); $this->useCoreUI = true; // Assign the variables $this->form ??= $this->get('Form'); @@ -129,7 +129,7 @@ class HtmlView extends BaseHtmlView // get action permissions $this->canDo = ###Component###Helper::getActions('###view###', $this->item); // get input - $jinput = Factory::getApplication()->input; + $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; $this->ref = $jinput->get('ref', 0, 'word'); $this->refid = $jinput->get('refid', 0, 'int'); $return = $jinput->get('return', null, 'base64'); @@ -211,16 +211,16 @@ class HtmlView extends BaseHtmlView protected function _prepareDocument(): void {###JQUERY### $isNew = ($this->item->id < 1); - $this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); + $this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); }###AJAXTOKE######LINKEDVIEWTABLESCRIPTS### // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###DOCUMENT_CUSTOM_PHP### } } diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php index 0a3ba9fef..dc91b18c9 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php @@ -234,7 +234,7 @@ class ###View###Model extends AdminModel */ protected function prepareTable($table) {###LICENSE_TABLE_LOCKED_CHECK### - $date = Factory::getDate(); + $date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate(); $user = $this->getCurrentUser(); if (isset($table->name)) @@ -291,7 +291,7 @@ class ###View###Model extends AdminModel protected function loadFormData() { // Check the session for previously entered form data. - $data = Factory::getApplication()->getUserState('com_###component###.edit.###view###.data', []); + $data = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getUserState('com_###component###.edit.###view###.data', []); if (empty($data)) { @@ -368,7 +368,7 @@ class ###View###Model extends AdminModel if (empty($pks)) { - $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } @@ -385,7 +385,7 @@ class ###View###Model extends AdminModel if (!$this->canDo->get('core.batch')) { - $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -428,7 +428,7 @@ class ###View###Model extends AdminModel if (!$done) { - $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -449,7 +449,7 @@ class ###View###Model extends AdminModel */ public function save($data) { - $input = Factory::getApplication()->input; + $input = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; $filter = InputFilter::getInstance(); // set the metadata to the Item Data diff --git a/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php b/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php index 423691e92..644e2736b 100644 --- a/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php @@ -67,7 +67,7 @@ class AjaxController extends BaseController // return to a callback function $callback = $jinput->get('callback', null, 'CMD'); // Check Token! - $token = Session::getFormToken(); + $token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { diff --git a/admin/compiler/joomla_4/SITE_AJAX_MODEL.php b/admin/compiler/joomla_4/SITE_AJAX_MODEL.php index b56b2df9c..0381279d8 100644 --- a/admin/compiler/joomla_4/SITE_AJAX_MODEL.php +++ b/admin/compiler/joomla_4/SITE_AJAX_MODEL.php @@ -56,7 +56,7 @@ class AjaxModel extends ListModel { parent::__construct($config, $factory); - $this->app_params = ComponentHelper::getParams('com_###component###'); - $this->app ??= Factory::getApplication(); + $this->app_params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); }###AJAX_SITE_MODEL_METHODS### } diff --git a/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php b/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php index 110caef0b..0a49488a8 100644 --- a/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php @@ -65,7 +65,7 @@ class DisplayController extends BaseController */ public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null) { - $app ??= Factory::getApplication(); + $app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->identity ??= $app->getIdentity(); parent::__construct($config, $factory, $app, $input); @@ -108,21 +108,21 @@ class DisplayController extends BaseController if ($refid > 0 && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref)) { // redirect to item of ref - $this->setRedirect(Route::_('index.php?option=com_###component###&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false)); } elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref)) { // redirect to ref - $this->setRedirect(Route::_('index.php?option=com_###component###&view=' . (string) $ref, false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=' . (string) $ref, false)); } else { // normal redirect back to the list default site view - $this->setRedirect(Route::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###', false)); + $this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###', false)); } // Somehow the person just went to the form - we don't allow that. - throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 403); + throw new \Exception(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 403); } // we may need to make this more dynamic in the future. (TODO) diff --git a/admin/compiler/joomla_4/SITE_FORM_MODAL_SELECT_FIELD.php b/admin/compiler/joomla_4/SITE_FORM_MODAL_SELECT_FIELD.php new file mode 100644 index 000000000..97b5965a7 --- /dev/null +++ b/admin/compiler/joomla_4/SITE_FORM_MODAL_SELECT_FIELD.php @@ -0,0 +1,74 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this JCB template file (EVER) +defined('_JCB_TEMPLATE') or die; +?> +###BOM### +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field; + +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Field\ModalSelectField as ModalSelectFieldCore; +use Joomla\Database\ParameterType; + +// No direct access to this file +\defined('_JEXEC') or die; + +/** + * A modal content selection field, now with the radical ability to handle string-based GUIDs. + * Because, apparently, assuming everything is an integer was the hill to die on. + * + * This override exists solely to bypass a hardcoded constraint that shouldn't have been there in the first place. + * But hey, at least we get another class extension to maintain! + * + * @since 5.0.0 + */ +class ModalSelectField extends ModalSelectFieldCore +{ + /** + * Method to retrieve the title of selected item. + * + * @return string + * + * @since 5.0.0 + */ + protected function getValueTitle() + { + // Selecting the title for the field value, when required info were given + if ($this->value && $this->sql_title_table && $this->sql_title_column && $this->sql_title_key) { + try { + $db = $this->getDatabase(); + $query = $db->getQuery(true) + ->select($db->quoteName($this->sql_title_column)) + ->from($db->quoteName($this->sql_title_table)) + ->where($db->quoteName($this->sql_title_key) . ' = :value') + ->bind(':value', $this->value, is_numeric($this->value) ? ParameterType::INTEGER : ParameterType::STRING); + + /** + * All this—just because someone decided to hardcode [ParameterType::INTEGER] in the core. + * We could have just handle it dynamically, but no... + * + * Polymorphic behavior isn't the enemy. Hardcoded constraints that force class extensions? + * Now *that's* the real problem. But sure, let's keep pretending that integers are the + * only valid identifiers in a database. + */ + + $db->setQuery($query); + + return $db->loadResult() ?: $this->value; + } catch (\Throwable $e) { + Factory::getApplication()->enqueueMessage($e->getMessage(), 'error'); + } + } + + return $this->value; + } +} \ No newline at end of file diff --git a/admin/compiler/joomla_4/SITE_HEADERCHECK.php b/admin/compiler/joomla_4/SITE_HEADERCHECK.php index 55e244ed3..730a1b94d 100644 --- a/admin/compiler/joomla_4/SITE_HEADERCHECK.php +++ b/admin/compiler/joomla_4/SITE_HEADERCHECK.php @@ -51,7 +51,7 @@ class HeaderCheck public function __construct() { // Initializes the application object. - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // Initializes the document object. $this->document = $this->app->getDocument(); diff --git a/admin/compiler/joomla_4/SITE_HELPER_CLASS.php b/admin/compiler/joomla_4/SITE_HELPER_CLASS.php index 7efeae84f..195d1a1ac 100644 --- a/admin/compiler/joomla_4/SITE_HELPER_CLASS.php +++ b/admin/compiler/joomla_4/SITE_HELPER_CLASS.php @@ -115,7 +115,7 @@ abstract class ###Component###Helper public static function getContributors() { // get params - $params = ComponentHelper::getParams('com_###component###'); + $params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); // start contributors array $contributors = []; // get all Contributors (max 20) @@ -172,7 +172,7 @@ abstract class ###Component###Helper } // Get the model through the MVCFactory - return Factory::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config); + return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config); } /** @@ -242,7 +242,7 @@ abstract class ###Component###Helper if (!$asset->check() || !$asset->store()) { - Factory::getApplication()->enqueueMessage($asset->getError(), 'warning'); + Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->enqueueMessage($asset->getError(), 'warning'); return false; } else @@ -255,7 +255,7 @@ abstract class ###Component###Helper $object->asset_id = (int) $asset->id; // Update their asset_id to link to the asset table. - return Factory::getDbo()->updateObject('#__###component###_'.$table, $object, 'id'); + return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDbo()->updateObject('#__###component###_'.$table, $object, 'id'); } } return false; @@ -272,7 +272,7 @@ abstract class ###Component###Helper if (!$inherit) { // Need to find the asset id by the name of the component. - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -497,7 +497,7 @@ abstract class ###Component###Helper { $type = 'item'; } - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select(array('a.published')); $query->from('#__###component###_'.$type.' AS a'); @@ -515,7 +515,7 @@ abstract class ###Component###Helper public static function getGroupName($id) { - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select(array('a.title')); $query->from('#__usergroups AS a'); @@ -549,7 +549,7 @@ abstract class ###Component###Helper if (!Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check($user)) { // get the user object - $user = Factory::getApplication()->getIdentity(); + $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); } // load the CMSObject $result = new CMSObject; diff --git a/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php b/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php index f4090b346..20628bc73 100644 --- a/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php @@ -41,10 +41,10 @@ class HelpController extends BaseController public function help() { - $user = Factory::getApplication()->getIdentity(); - $jinput = Factory::getApplication()->input; + $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); + $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; // Check Token! - $token = Session::getFormToken(); + $token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token)) { @@ -83,7 +83,7 @@ class HelpController extends BaseController protected function getHelpDocumentText($id) { - $db = Factory::getContainer()->get(DatabaseInterface::class); + $db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select(array('a.title','a.content')); $query->from('#__###component###_help_document AS a'); @@ -97,18 +97,18 @@ class HelpController extends BaseController $text = []; $document = $db->loadObject(); // fix image issue - $images['src="images'] = 'src="'.Uri::root().'images'; - $images["src='images"] = "src='".Uri::root()."images"; - $images['src="/images'] = 'src="'.Uri::root().'images'; - $images["src='/images"] = "src='".Uri::root()."images"; + $images['src="images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images'; + $images["src='images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images"; + $images['src="/images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images'; + $images["src='/images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images"; // set document template $text[] = ""; $text[] = ''; $text[] = ""; $text[] = ''; $text[] = "".$document->title.""; - $text[] = ''; - $text[] = ''; + $text[] = ''; + $text[] = ''; $text[] = ""; $text[] = '
'; $text[] = '
'; diff --git a/admin/compiler/joomla_4/SITE_ROUTER.php b/admin/compiler/joomla_4/SITE_ROUTER.php index 4cc195d94..b5a3cbd42 100644 --- a/admin/compiler/joomla_4/SITE_ROUTER.php +++ b/admin/compiler/joomla_4/SITE_ROUTER.php @@ -85,7 +85,7 @@ class Router extends RouterView { $this->categoryFactory = $categoryFactory; $this->db = $db; - $this->params = ComponentHelper::getParams('com_###component###'); + $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); $this->noIDs = (bool) $this->params->get('sef_ids', false);###SITE_ROUTER_CONSTRUCTOR_BEFORE_PARENT### parent::__construct($app, $menu);###SITE_ROUTER_CONSTRUCTOR_AFTER_PARENT### diff --git a/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php b/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php index 96fdd1822..0f14883e9 100644 --- a/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php +++ b/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php @@ -36,7 +36,7 @@ abstract class RouteHelper protected static function _findItem($needles = null,$type = null) { - $app = Factory::getApplication(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $menus = $app->getMenu('site'); $language = isset($needles['language']) ? $needles['language'] : '*'; @@ -45,7 +45,7 @@ abstract class RouteHelper { self::$lookup[$language] = []; - $component = ComponentHelper::getComponent('com_###component###'); + $component = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getComponent('com_###component###'); $attributes = array('component_id'); $values = array($component->id); @@ -116,7 +116,7 @@ abstract class RouteHelper if ($type) { // Check if the global menu item has been set. - $params = ComponentHelper::getParams('com_###component###'); + $params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); if ($item = $params->get($type.'_menu', 0)) { return $item; diff --git a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php index 07113d005..a86628dfd 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php @@ -87,7 +87,7 @@ class HtmlView extends BaseHtmlView public function display($tpl = null): void { // get combined params of both component and menu - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->params = $this->app->getParams(); $this->menu = $this->app->getMenu()->getActive(); $this->styles = $this->get('Styles'); @@ -109,12 +109,12 @@ class HtmlView extends BaseHtmlView // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); }###SITE_DOCUMENT_CUSTOM_CSS### // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS### } @@ -131,7 +131,7 @@ class HtmlView extends BaseHtmlView $this->help_url = ###Component###Helper::getHelpUrl('###sviews###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // now initiate the toolbar diff --git a/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php b/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php index 20fa13ebd..11722644c 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php @@ -122,7 +122,7 @@ class ###SViews###Model extends ListModel { parent::__construct($config, $factory); - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->input ??= $this->app->getInput(); // Set the current user for authorisation checks (for those calling this model directly) @@ -160,7 +160,7 @@ class ###SViews###Model extends ListModel $items = parent::getItems(); // Get the global params - $globalParams = ComponentHelper::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS### + $globalParams = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS### // return items return $items; diff --git a/admin/compiler/joomla_4/SITE_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_VIEW_HTML.php index fc104516c..af0d8eeba 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEW_HTML.php @@ -71,7 +71,7 @@ class HtmlView extends BaseHtmlView public function display($tpl = null): void { // get combined params of both component and menu - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->params = $this->app->getParams(); $this->menu = $this->app->getMenu()->getActive(); $this->styles = $this->get('Styles') ?? []; @@ -93,12 +93,12 @@ class HtmlView extends BaseHtmlView // add styles foreach ($this->styles as $style) { - Html::_('stylesheet', $style, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']); }###SITE_DOCUMENT_CUSTOM_CSS### // add scripts foreach ($this->scripts as $script) { - Html::_('script', $script, ['version' => 'auto']); + Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']); }###SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS### } @@ -115,7 +115,7 @@ class HtmlView extends BaseHtmlView $this->help_url = ###Component###Helper::getHelpUrl('###sview###'); if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url)) { - ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); + Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // now initiate the toolbar diff --git a/admin/compiler/joomla_4/SITE_VIEW_MODEL.php b/admin/compiler/joomla_4/SITE_VIEW_MODEL.php index e017632af..0290ce150 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/SITE_VIEW_MODEL.php @@ -139,7 +139,7 @@ class ###SView###Model extends ItemModel { parent::__construct($config, $factory); - $this->app ??= Factory::getApplication(); + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); $this->input ??= $this->app->getInput(); // Set the current user for authorisation checks (for those calling this model directly) diff --git a/admin/compiler/joomla_4/default_batch_body.php b/admin/compiler/joomla_4/default_batch_body.php index 6ca60b2b1..1ba970783 100644 --- a/admin/compiler/joomla_4/default_batch_body.php +++ b/admin/compiler/joomla_4/default_batch_body.php @@ -22,5 +22,5 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### ?> -

+

batchDisplay; ?> \ No newline at end of file diff --git a/admin/compiler/joomla_4/default_batch_footer.php b/admin/compiler/joomla_4/default_batch_footer.php index 701e3c69b..2615f443d 100644 --- a/admin/compiler/joomla_4/default_batch_footer.php +++ b/admin/compiler/joomla_4/default_batch_footer.php @@ -22,9 +22,9 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### ?> \ No newline at end of file diff --git a/admin/compiler/joomla_4/default_import.php b/admin/compiler/joomla_4/default_import.php index 05ff76fe1..e3d652348 100644 --- a/admin/compiler/joomla_4/default_import.php +++ b/admin/compiler/joomla_4/default_import.php @@ -21,10 +21,10 @@ use Joomla\CMS\HTML\HTMLHelper as Html; // No direct access to this file defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### -Html::_('jquery.framework'); -Html::_('bootstrap.tooltip'); -Html::_('script', 'system/core.js', false, true); -Html::_('behavior.keepalive'); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('jquery.framework'); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('bootstrap.tooltip'); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', 'system/core.js', false, true); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('behavior.keepalive'); ?>
-
+
hasPackage && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headerList) && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headers)) : ?>
- +
- +
- +
headerList as $name => $title): ?> @@ -128,8 +128,8 @@ document.addEventListener('DOMContentLoaded', function() {
+
- 'upload')); ?> + 'upload')); ?> - +
- +
- +
-     (.csv .xls .ods) +     (.csv .xls .ods)
- + - +
- +
- +
-     (.csv .xls .ods) +     (.csv .xls .ods)
- + - +
- +
- +
-     (.csv .xls .ods) +     (.csv .xls .ods)
- - + + - +
\ No newline at end of file diff --git a/admin/compiler/joomla_4/default_import_custom.php b/admin/compiler/joomla_4/default_import_custom.php index 91b71fce6..e532204ce 100644 --- a/admin/compiler/joomla_4/default_import_custom.php +++ b/admin/compiler/joomla_4/default_import_custom.php @@ -22,9 +22,9 @@ use Joomla\CMS\HTML\HTMLHelper as Html; // No direct access to this file defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### -Html::_('jquery.framework'); -Html::_('bootstrap.tooltip'); -Html::_('script', 'system/core.js', false, true); -Html::_('behavior.keepalive'); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('jquery.framework'); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('bootstrap.tooltip'); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', 'system/core.js', false, true); +Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('behavior.keepalive'); ?>###IMPORT_DEFAULT_VIEW_CUSTOM### diff --git a/admin/compiler/joomla_4/default_main.php b/admin/compiler/joomla_4/default_main.php index 91b3fcb0a..ccb947490 100644 --- a/admin/compiler/joomla_4/default_main.php +++ b/admin/compiler/joomla_4/default_main.php @@ -26,12 +26,12 @@ defined('_JEXEC') or die;
-

+

\ No newline at end of file diff --git a/admin/compiler/joomla_4/default_toolbar.php b/admin/compiler/joomla_4/default_toolbar.php index 6fb862f1e..4da476b18 100644 --- a/admin/compiler/joomla_4/default_toolbar.php +++ b/admin/compiler/joomla_4/default_toolbar.php @@ -23,30 +23,30 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### ?>
- - + +
- + pagination->getLimitBox(); ?>
- +
- +
diff --git a/admin/compiler/joomla_4/default_vdm.php b/admin/compiler/joomla_4/default_vdm.php index 2af4045b4..22989e03c 100644 --- a/admin/compiler/joomla_4/default_vdm.php +++ b/admin/compiler/joomla_4/default_vdm.php @@ -20,21 +20,21 @@ use Joomla\CMS\Language\Text; defined('_JEXEC') or die; ?> -<?php echo Text::_('COM_###COMPONENT###'); ?> +<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###'); ?>
contributors)): ?> contributors) > 1): ?> -

+

-

+

    contributors as $contributor): ?> diff --git a/admin/compiler/joomla_4/layoutlinkedview.php b/admin/compiler/joomla_4/layoutlinkedview.php index 9617296d8..9b57ea428 100644 --- a/admin/compiler/joomla_4/layoutlinkedview.php +++ b/admin/compiler/joomla_4/layoutlinkedview.php @@ -24,7 +24,7 @@ defined('_JEXEC') or die; // set the defaults $items = $displayData->###LAYOUTITEMS###; -$user = Factory::getApplication()->getIdentity(); +$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); $id = $displayData->item->id; ###LAYOUTITEMSHEADER### diff --git a/admin/compiler/joomla_4/layoutmetadata.php b/admin/compiler/joomla_4/layoutmetadata.php index 80877adb6..0a56077ba 100644 --- a/admin/compiler/joomla_4/layoutmetadata.php +++ b/admin/compiler/joomla_4/layoutmetadata.php @@ -27,7 +27,7 @@ $fieldSets = $form->getFieldsets('metadata'); $fieldSet) : ?> description) && trim($fieldSet->description)) : ?> -

    escape(Text::_($fieldSet->description)); ?>

    +

    escape(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($fieldSet->description)); ?>

    + default="2"> @@ -972,7 +972,7 @@ label="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_LABEL" description="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION" class="btn-group btn-group-yesno" - default="1"> + default="2"> diff --git a/admin/forms/admin_fields.xml b/admin/forms/admin_fields.xml index 701e499be..01706aee4 100644 --- a/admin/forms/admin_fields.xml +++ b/admin/forms/admin_fields.xml @@ -122,16 +122,25 @@ icon="list" min="1">