diff --git a/CHANGELOG.md b/CHANGELOG.md index 0928d22bd..731804487 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,19 @@ -# v5.1.2-alpha2 +# v5.1.2-alpha3 +- Migrates view HTML classes to use getModel() directly instead of the deprecated magic get() calls to model methods. +- Refactores event handling (contentPrepare, titlePrepare, contentBeforeDisplay, contentAfterDisplay) to use Joomla 5’s native event dispatcher via the model’s new getDispatcher() method. +- Updates table classes to properly support NULL values, both in the store() method and in table variable definitions. #1245 +- Extractes the setAutoCheckIn() and setCheckInCall() logic into a dedicated CheckInNow class for cleaner design. +- Replace all direct $app->input property calls with the recommended $app->getInput() method across the entire codebase. + +# v5.1.2-alpha + +- Fix the template and layout linker for packages. - Add native module builder for Joomla 4/5 - Refactor dynamic get methods into dedicated classes - Move Joomla DB handling into compiler injector flow - Fix auto-check(in) method for Joomla 4/5 compatibility -# v5.1.2-alpha - -- Fix the template and layout linker for packages. - # v5.1.1 - Move all banners to GitHub. diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index 5b9ed6743..9b637fcd9 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

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

'; +

Upgrade to Version 5.1.2-alpha3 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 fa15c6477..d3e911815 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x - and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator-it's a **full-stack development pipeline for Joomla extensions**. -You can install this component easily. The latest release (**5.1.2-alpha2**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. +You can install this component easily. The latest release (**5.1.2-alpha3**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. Upgrades are seamless through Joomla's built-in extension update mechanism. @@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig * **Company:** [Vast Development Method](https://dev.vdm.io) * **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io) * **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder) -* **Created:** 30th April, 2015 · **Last Build:** 2nd September, 2025 · **Version:** 5.1.2-alpha2 +* **Created:** 30th April, 2015 · **Last Build:** 3rd September, 2025 · **Version:** 5.1.2-alpha3 * **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved. -* **Lines:** 1155129 · **Fields:** 2091 · **Files:** 7831 · **Folders:** 740 +* **Lines:** 1156347 · **Fields:** 2091 · **Files:** 7831 · **Folders:** 740 > Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions. diff --git a/admin/README.txt b/admin/README.txt index fa15c6477..d3e911815 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x - and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator-it's a **full-stack development pipeline for Joomla extensions**. -You can install this component easily. The latest release (**5.1.2-alpha2**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. +You can install this component easily. The latest release (**5.1.2-alpha3**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. Upgrades are seamless through Joomla's built-in extension update mechanism. @@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig * **Company:** [Vast Development Method](https://dev.vdm.io) * **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io) * **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder) -* **Created:** 30th April, 2015 · **Last Build:** 2nd September, 2025 · **Version:** 5.1.2-alpha2 +* **Created:** 30th April, 2015 · **Last Build:** 3rd September, 2025 · **Version:** 5.1.2-alpha3 * **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved. -* **Lines:** 1155129 · **Fields:** 2091 · **Files:** 7831 · **Folders:** 740 +* **Lines:** 1156347 · **Fields:** 2091 · **Files:** 7831 · **Folders:** 740 > Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions. diff --git a/admin/compiler/joomla_3/ItemModel_custom_admin.php b/admin/compiler/joomla_3/ItemModel_custom_admin.php index c8c49b430..d5f1635f9 100644 --- a/admin/compiler/joomla_3/ItemModel_custom_admin.php +++ b/admin/compiler/joomla_3/ItemModel_custom_admin.php @@ -62,7 +62,7 @@ class ###Component###Model###SView### extends ItemModel protected function populateState() { $this->app = Factory::getApplication(); - $this->input = $this->app->input; + $this->input = method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; // Get the item main id $id = $this->input->getInt('id', null); $this->setState('###sview###.id', $id); diff --git a/admin/compiler/joomla_3/ItemModel_site.php b/admin/compiler/joomla_3/ItemModel_site.php index ca73e7e3e..4b658f8da 100644 --- a/admin/compiler/joomla_3/ItemModel_site.php +++ b/admin/compiler/joomla_3/ItemModel_site.php @@ -62,7 +62,7 @@ class ###Component###Model###SView### extends ItemModel protected function populateState() { $this->app = Factory::getApplication(); - $this->input = $this->app->input; + $this->input = method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; // Get the itme main id $id = $this->input->getInt('id', null); $this->setState('###sview###.id', $id); diff --git a/admin/compiler/joomla_3/ListModel.php b/admin/compiler/joomla_3/ListModel.php index f2d12e963..5b9b2f685 100644 --- a/admin/compiler/joomla_3/ListModel.php +++ b/admin/compiler/joomla_3/ListModel.php @@ -50,9 +50,10 @@ class ###Component###Model###Views### extends ListModel protected function populateState($ordering = null, $direction = null) { $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; }###POPULATESTATE### diff --git a/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php index 7f9026741..92f7422ef 100644 --- a/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php @@ -66,7 +66,7 @@ class AjaxController extends BaseController // get the user for later use $user = $this->app->getIdentity(); // get the input values - $jinput = $this->input ?? $this->app->input; + $jinput = $this->input ?? (method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input); // check if we should return raw (DEFAULT TRUE SINCE J4) $returnRaw = $jinput->get('raw', true, 'BOOLEAN'); // return to a callback function diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php index 81cb2fabb..31bce3847 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php @@ -41,8 +41,9 @@ class HelpController extends BaseController public function help() { - $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); - $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); + $user = $app->getIdentity(); + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Check Token! $token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php index 308eda103..7ea1a1798 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php @@ -90,7 +90,8 @@ class ImportModel extends BaseDatabaseModel $package = null; $continue = false; // get import type - $this->getType = $app->input->getString('gettype', NULL); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $this->getType = $input->getString('gettype', NULL); // get import type $this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL); @@ -196,7 +197,7 @@ class ImportModel extends BaseDatabaseModel { // Get the uploaded file information $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); @@ -256,7 +257,7 @@ class ImportModel extends BaseDatabaseModel protected function _getPackageFromFolder() { $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); @@ -301,7 +302,7 @@ class ImportModel extends BaseDatabaseModel protected function _getPackageFromUrl() { $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the URL of the package to import $url = $input->getString('import_url'); diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php index 465bbcec1..452bfbb31 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php @@ -86,7 +86,7 @@ class ###View###importModel extends BaseDatabaseModel { // Get the uploaded file information $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); @@ -146,7 +146,7 @@ class ###View###importModel extends BaseDatabaseModel protected function _getPackageFromFolder() { $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); @@ -191,7 +191,7 @@ class ###View###importModel extends BaseDatabaseModel protected function _getPackageFromUrl() { $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the URL of the package to import $url = $input->getString('import_url'); diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php index a338c8ea0..8ee20844b 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php @@ -111,12 +111,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser();###ADMIN_DIPLAY_METHOD### $this->saveOrder = $this->listOrder == 'a.ordering'; // set the return here value diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php b/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php index 556b1977d..d546c4a3b 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_MODAL.php @@ -23,12 +23,14 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); -if ($app->isClient('site')) { +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'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php b/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php index c91a82fcb..98436b0a9 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php @@ -93,9 +93,10 @@ class ###Views###Model extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; }###POPULATESTATE### diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php index 42330c61e..37c1c11c5 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 app class + * + * @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power + * @since 5.2.1 + */ + public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app; + /** * The input class * @@ -138,16 +146,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ###Component###Helper::getActions('###view###', $this->item); + // get application + $this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); // get input - $this->input ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php b/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php index 2fb449e97..e8ff990b4 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php @@ -67,7 +67,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__###component###_###view###', 'id', $db, $dispatcher);###LICENSE_LOCKED_CHECK### } @@ -105,7 +105,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php index 880997ef0..4000e5f35 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php @@ -79,8 +79,10 @@ class HtmlView extends BaseHtmlView $this->user ??= $this->getCurrentUser(); // get global action permissions $this->canDo = ###Component###Helper::getActions('###sview###'); - $this->styles = $this->get('Styles') ?? []; - $this->scripts = $this->get('Scripts') ?? [];###CUSTOM_ADMIN_DIPLAY_METHOD### + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles() ?? []; + $this->scripts = $model->getScripts() ?? [];###CUSTOM_ADMIN_DIPLAY_METHOD### // Set the html view document stuff $this->_prepareDocument(); diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php index f2efbcef4..f55da3196 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php @@ -47,8 +47,10 @@ class HtmlView extends BaseHtmlView $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'); - $this->scripts = $this->get('Scripts');###CUSTOM_ADMIN_DIPLAY_METHOD### + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts();###CUSTOM_ADMIN_DIPLAY_METHOD### // Set the html view document stuff $this->_prepareDocument(); diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php index 4fdbfaead..8f243224d 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php @@ -120,16 +120,17 @@ class HtmlView extends BaseHtmlView // set params $this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles') ?? []; - $this->scripts = $this->get('Scripts') ?? []; + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->state = $model->getState(); + $this->styles = $model->getStyles() ?? []; + $this->scripts = $model->getScripts() ?? []; // get action permissions $this->canDo = ###Component###Helper::getActions('###view###', $this->item); // get input - $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; + $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput(); $this->ref = $jinput->get('ref', 0, 'word'); $this->refid = $jinput->get('refid', 0, 'int'); $return = $jinput->get('return', null, 'base64'); diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php index dc91b18c9..8f9b7ae8e 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php @@ -449,8 +449,9 @@ class ###View###Model extends AdminModel */ public function save($data) { - $input = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; - $filter = InputFilter::getInstance(); + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $filter = Joomla___193deb3e_0c3e_4610_8e55_450e463095b4___Power::getInstance(); // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) diff --git a/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php b/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php index 644e2736b..b96f0f22e 100644 --- a/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php @@ -61,7 +61,7 @@ class AjaxController extends BaseController // get the user for later use $user = $this->app->getIdentity(); // get the input values - $jinput = $this->input ?? $this->app->input; + $jinput = $this->input ?? (method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input); // check if we should return raw (DEFAULT TRUE SINCE J4) $returnRaw = $jinput->get('raw', true, 'BOOLEAN'); // return to a callback function diff --git a/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php b/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php index 20628bc73..8e0a5d44e 100644 --- a/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php @@ -41,8 +41,9 @@ class HelpController extends BaseController public function help() { - $user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity(); - $jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input; + $app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication(); + $user = $app->getIdentity(); + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Check Token! $token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); diff --git a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php index d063b9b32..0135d832a 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php @@ -90,8 +90,10 @@ class HtmlView extends BaseHtmlView $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'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles() ?? []; + $this->scripts = $model->getScripts() ?? []; // get the user object $this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD### diff --git a/admin/compiler/joomla_4/SITE_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_VIEW_HTML.php index 4866f2321..7b40ea311 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEW_HTML.php @@ -74,8 +74,10 @@ class HtmlView extends BaseHtmlView $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') ?? []; - $this->scripts = $this->get('Scripts') ?? []; + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles() ?? []; + $this->scripts = $model->getScripts() ?? []; // get the user object $this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD### diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index d10514d77..76b8b3fde 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2294,7 +2294,7 @@ INSERT INTO `#__componentbuilder_admin_view` (`id`, `add_category_submenu`, `add -- Dumping data for table `#__componentbuilder_custom_admin_view` -- INSERT INTO `#__componentbuilder_custom_admin_view` (`id`, `add_css`, `add_custom_button`, `css`, `custom_button`, `php_controller`, `php_model`, `add_css_document`, `add_js_document`, `add_php_ajax`, `add_php_document`, `add_php_jview`, `add_php_jview_display`, `add_php_view`, `codename`, `css_document`, `custom_get`, `default`, `description`, `dynamic_get`, `icon`, `js_document`, `main_get`, `name`, `system_name`, `php_document`, `php_jview`, `php_jview_display`, `php_view`, `snippet`, `ajax_input`, `javascript_file`, `libraries`, `php_ajaxmethod`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`, `guid`) VALUES -(21, 0, 1, '', '{\"custom_button0\":{\"icomoon\":\"download\",\"name\":\"Example\",\"method\":\"getImportExample\",\"target\":1,\"type\":\"0\"}}', 'CS8qKg0KCSAqIGdldCBhbGwgdGhlIGltcG9ydCBleGFtcGxlIHNwcmVhZHNoZWV0DQoJICoNCgkgKiBAcmV0dXJuICB0cnVlIG9uIHN1Y2Nlc3MNCgkgKiBAc2luY2UgIDUuMC4yDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldEltcG9ydEV4YW1wbGUoKQ0KCXsNCgkJLy8gQ2hlY2sgZm9yIHJlcXVlc3QgZm9yZ2VyaWVzDQoJCVNlc3Npb246OmNoZWNrVG9rZW4oKSBvciBleGl0KFRleHQ6Ol8oJ0pJTlZBTElEX1RPS0VOJykpOw0KCQkvLyBjaGVjayBpZiB1c2VyIGhhcyB0aGUgcmlnaHQNCgkJJHVzZXIgPSAkdGhpcy0+YXBwLT5nZXRJZGVudGl0eSgpOw0KCQkvLyBzZXQgcGFnZSByZWRpcmVjdA0KCQkkcmVkaXJlY3RfdXJsID0gUm91dGU6Ol8oJ2luZGV4LnBocD9vcHRpb249Y29tXyMjI2NvbXBvbmVudCMjIyZ2aWV3PWltcG9ydGVyJywgZmFsc2UpOw0KCQkkbWVzc2FnZSA9IFRleHQ6Ol8oJ1lvdSBkbyBub3QgaGF2ZSBwZXJtaXNzaW9uIHRvIGRvd25sb2FkIHRoZSBpbXBvcnQgZXhhbXBsZSEnKTsNCgkJLy8gY3VycmVudGx5IG9ubHkgdGhvc2Ugd2l0aCBwZXJtaXNzaW9ucyBjYW4gZ2V0IHRoZXNlIGltYWdlcw0KCQlpZigkdXNlci0+YXV0aG9yaXNlKCdpbXBvcnRlci5leGFtcGxlJywgJ2NvbV8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_input0\":{\"value_name\":\"entity\",\"task_name\":\"displayImportColumns\",\"input_default\":\"NULL\",\"input_filter\":\"STRING\",\"method_name\":\"displayImportColumns\",\"user_check\":\"1\"},\"ajax_input1\":{\"value_name\":\"target\",\"task_name\":\"displayImportColumns\",\"input_default\":\"NULL\",\"input_filter\":\"BASE64\",\"method_name\":\"displayImportColumns\",\"user_check\":\"1\"},\"ajax_input2\":{\"value_name\":\"entity\",\"task_name\":\"getMessages\",\"input_default\":\"NULL\",\"input_filter\":\"STRING\",\"method_name\":\"getMessages\",\"user_check\":\"1\"},\"ajax_input3\":{\"value_name\":\"target\",\"task_name\":\"getMessages\",\"input_default\":\"NULL\",\"input_filter\":\"STRING\",\"method_name\":\"getMessages\",\"user_check\":\"1\"}}', '', '', 'CS8qKg0KCSAqIExvYWQgdGhlIGRpc3BsYXkgb2YgdGhlIGltcG9ydCBsaW5rZWQgdGhpcyBlbnRpdHkuDQoJICoNCgkgKiBAcGFyYW0gc3RyaW5nICRlbnRpdHkgIFRoZSBlbnRpdHkgZ3VpZA0KCSAqIEBwYXJhbSBzdHJpbmcgJHRhcmdldCAgVGhlIHRhcmdldCBlbnRpdHkgbmFtZQ0KCSAqDQoJICogQHJldHVybiBhcnJheQ0KCSAqIEBzaW5jZSA1LjAuMg0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBkaXNwbGF5SW1wb3J0Q29sdW1ucyhzdHJpbmcgJGVudGl0eSwgc3RyaW5nICR0YXJnZXQpOiBhcnJheQ0KCXsNCgkJaWYgKFN1cGVyX19fOWM1MTNiYWZfYjI3OV80M2ZkX2FlMjlfYTU4NWM4Y2JjNGYwX19fUG93ZXI6OnZhbGlkKCRlbnRpdHkpKQ0KCQl7DQoJCQkkZGlzcGxheSA9IG51bGw7DQoNCgkJCXRyeQ0KCQkJew0KCQkJCSR0YXJnZXQgPSBiYXNlNjRfZGVjb2RlKCR0YXJnZXQpOw0KCQkJCSRkYXRhID0gU3VwZXJfX184ODRlY2E3OF8yOD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21sYV9fXzdhYjgyMjcyXzBiM2RfNGJiMV9hZjM1X2U2M2EwOTZjZmUwYl9fX1Bvd2VyOjpyZW5kZXIoJ2ltcG9ydGVybWVzc2FnZWxvZycsICRpdGVtcyldOw0KCQkJfQ0KCQl9DQoJCWNhdGNoIChcRXhjZXB0aW9uICRlcnJvcikNCgkJew0KCQkJcmV0dXJuIFsnZXJyb3InID0+ICRlcnJvci0+Z2V0TWVzc2FnZSgpXTsNCgkJfQ0KDQoJCXJldHVybiBbJ2h0bWwnID0+ICc8aDM+JyAuIFRleHQ6Ol8oJ05vIG1lc3NhZ2VzIGZvdW5kIGF0IHRoaXMgdGltZS4nKSAuICc8L2gzPiddOw0KCX0=', '{\"custom_admin_view_headers\":{\"add_custom_admin_view_model\":\"0\",\"custom_admin_view_model\":\"\",\"power_custom_admin_view_model\":[],\"add_custom_admin_view_html\":\"0\",\"custom_admin_view_html\":\"\",\"power_custom_admin_view_html\":[],\"add_custom_admin_view\":\"0\",\"custom_admin_view\":\"\",\"power_custom_admin_view\":[],\"add_custom_admin_view_controller\":\"0\",\"custom_admin_view_controller\":\"\",\"power_custom_admin_view_controller\":[],\"add_custom_admin_views_model\":\"0\",\"custom_admin_views_model\":\"\",\"power_custom_admin_views_model\":[],\"add_custom_admin_views_html\":\"0\",\"custom_admin_views_html\":\"\",\"power_custom_admin_views_html\":[],\"add_custom_admin_views\":\"0\",\"custom_admin_views\":\"\",\"power_custom_admin_views\":[],\"add_custom_admin_views_controller\":\"0\",\"custom_admin_views_controller\":\"\",\"power_custom_admin_views_controller\":[],\"add_ajax_model\":\"1\",\"ajax_model\":\"\",\"power_ajax_model\":{\"power_ajax_model0\":{\"power\":\"ff8d5fdb-2d1f-4178-bd18-a43b8efd1068\",\"as\":\"ImportFactory\",\"build\":\"2\"}}}}', 1, '2022-02-24 16:28:43', '2025-03-03 08:54:25', 22, 0, 10, '917d2c1a-1b37-4ded-9ace-ef486fcc3e4d'); +(21, 0, 1, '', '{\"custom_button0\":{\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OyANCg0KCQkvLyBjaGFuZ2UgdGhpcyB0byB0aGUgbGF5b3V0IG9mIHlvdXIgY3VzdG9tIGltcG9ydGVyIG1lc3NhZ2UgbG9nDQoJCS8vIExheW91dEhlbHBlcjo6cmVuZGVyKCdpbXBvcnRlcm1lc3NhZ2Vsb2cnLCBbXSk7DQoNCgkJLy8gYWRkIHRoZSBsaWJzIGZvciBzdWJmb3JtIChzaW5jZSBub3QgYWRkaW5nIGl0IHZpYSB4bWwgYnV0IGFqYXgpDQoJCSR0aGlzLT5nZXREb2N1bWVudCgpDQoJCQktPmdldFdlYkFzc2V0TWFuYWdlcigpDQoJCQktPnVzZVNjcmlwdCgnd2ViY29tcG9uZW50LmZpZWxkLXN1YmZvcm0nKQ0KCQkJLT51c2VQcmVzZXQoJ2Nob2ljZXNqcycpDQoJCQktPnVzZVNjcmlwdCgnd2ViY29tcG9uZW50LmZpZWxkLWZhbmN5LXNlbGVjdCcpOw0KCQkkdGhpcy0+Z2V0RG9jdW1lbnQoKQ0KCQkJLT5nZXRXZWJBc3NldE1hbmFnZXIoKQ0KCQkJLT5hZGRJbmxpbmVTdHlsZSgnLnN1YmZvcm0tdGFibGUtc3VibGF5b3V0LXNlY3Rpb24gLmNvbnRyb2xzIHsgbWFyZ2luLWxlZnQ6IDBweCB9JykNCgkJCS0+YWRkSW5saW5lU3R5bGUoJy5zdWJmb3JtLXRhYmxlLXN1YmxheW91dC1zZWN0aW9uIC50YWJsZS1yZXNwb25zaXZlIHsgb3ZlcmZsb3cteDogdmlzaWJsZSB9Jyk7', '', '', 'JHRoaXMtPmFwcC0+Z2V0SW5wdXQoKS0+c2V0KCdoaWRlbWFpbm1lbnUnLCBmYWxzZSk7', 0, '{\"ajax_input0\":{\"value_name\":\"entity\",\"task_name\":\"displayImportColumns\",\"input_default\":\"NULL\",\"input_filter\":\"STRING\",\"method_name\":\"displayImportColumns\",\"user_check\":\"1\"},\"ajax_input1\":{\"value_name\":\"target\",\"task_name\":\"displayImportColumns\",\"input_default\":\"NULL\",\"input_filter\":\"BASE64\",\"method_name\":\"displayImportColumns\",\"user_check\":\"1\"},\"ajax_input2\":{\"value_name\":\"entity\",\"task_name\":\"getMessages\",\"input_default\":\"NULL\",\"input_filter\":\"STRING\",\"method_name\":\"getMessages\",\"user_check\":\"1\"},\"ajax_input3\":{\"value_name\":\"target\",\"task_name\":\"getMessages\",\"input_default\":\"NULL\",\"input_filter\":\"STRING\",\"method_name\":\"getMessages\",\"user_check\":\"1\"}}', '', '', 'CS8qKg0KCSAqIExvYWQgdGhlIGRpc3BsYXkgb2YgdGhlIGltcG9ydCBsaW5rZWQgdGhpcyBlbnRpdHkuDQoJICoNCgkgKiBAcGFyYW0gc3RyaW5nICRlbnRpdHkgIFRoZSBlbnRpdHkgZ3VpZA0KCSAqIEBwYXJhbSBzdHJpbmcgJHRhcmdldCAgVGhlIHRhcmdldCBlbnRpdHkgbmFtZQ0KCSAqDQoJICogQHJldHVybiBhcnJheQ0KCSAqIEBzaW5jZSA1LjAuMg0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBkaXNwbGF5SW1wb3J0Q29sdW1ucyhzdHJpbmcgJGVudGl0eSwgc3RyaW5nICR0YXJnZXQpOiBhcnJheQ0KCXsNCgkJaWYgKFN1cGVyX19fOWM1MTNiYWZfYjI3OV80M2ZkX2FlMjlfYTU4NWM4Y2JjNGYwX19fUG93ZXI6OnZhbGlkKCRlbnRpdHkpKQ0KCQl7DQoJCQkkZGlzcGxheSA9IG51bGw7DQoNCgkJCXRyeQ0KCQkJew0KCQkJCSR0YXJnZXQgPSBiYXNlNjRfZGVjb2RlKCR0YXJnZXQpOw0KCQkJCSRkYXRhID0gU3VwZXJfX184ODRlY2E3OF8yODFmXzRlYWJfYjk2Ml9kOTdlMzU1YWYxNmRfX19Qb3dlcjo6XygnRmlsZS5EaXNwbGF5JyktPmdldCgkZW50aXR5LCAkdGFyZ2V0KTsNCg0KCQkJCWlmICgkZGF0YSAhPT0gbnVsbCkNCgkJ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NhdGNoIChcRXhjZXB0aW9uICRlcnJvcikNCgkJew0KCQkJcmV0dXJuIFsnZXJyb3InID0+ICRlcnJvci0+Z2V0TWVzc2FnZSgpXTsNCgkJfQ0KDQoJCXJldHVybiBbJ2h0bWwnID0+ICc8aDM+JyAuIFRleHQ6Ol8oJ05vIG1lc3NhZ2VzIGZvdW5kIGF0IHRoaXMgdGltZS4nKSAuICc8L2gzPiddOw0KCX0=', '{\"custom_admin_view_headers\":{\"add_custom_admin_view_model\":\"0\",\"custom_admin_view_model\":\"\",\"power_custom_admin_view_model\":[],\"add_custom_admin_view_html\":\"0\",\"custom_admin_view_html\":\"\",\"power_custom_admin_view_html\":[],\"add_custom_admin_view\":\"0\",\"custom_admin_view\":\"\",\"power_custom_admin_view\":[],\"add_custom_admin_view_controller\":\"0\",\"custom_admin_view_controller\":\"\",\"power_custom_admin_view_controller\":[],\"add_custom_admin_views_model\":\"0\",\"custom_admin_views_model\":\"\",\"power_custom_admin_views_model\":[],\"add_custom_admin_views_html\":\"0\",\"custom_admin_views_html\":\"\",\"power_custom_admin_views_html\":[],\"add_custom_admin_views\":\"0\",\"custom_admin_views\":\"\",\"power_custom_admin_views\":[],\"add_custom_admin_views_controller\":\"0\",\"custom_admin_views_controller\":\"\",\"power_custom_admin_views_controller\":[],\"add_ajax_model\":\"1\",\"ajax_model\":\"\",\"power_ajax_model\":{\"power_ajax_model0\":{\"power\":\"ff8d5fdb-2d1f-4178-bd18-a43b8efd1068\",\"as\":\"ImportFactory\",\"build\":\"2\"}}}}', 1, '2022-02-24 16:28:43', '2025-03-03 08:54:25', 22, 0, 10, '917d2c1a-1b37-4ded-9ace-ef486fcc3e4d'); -- -- Dumping data for table `#__componentbuilder_site_view` @@ -2346,7 +2346,7 @@ INSERT INTO `#__componentbuilder_dynamic_get` (`id`, `add_php_after_getitem`, `a -- INSERT INTO `#__componentbuilder_custom_code` (`id`, `code`, `component`, `comment_type`, `from_line`, `function_name`, `hashtarget`, `hashendtarget`, `path`, `system_name`, `target`, `to_line`, `type`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES (5, 'CS8qKg0KCSAqIENvbnZlcnQgYSBkYXRlIHRvIGEgaHVtYW4tcmVhZGFibGUgZmFuY3kgZm9ybWF0IChlLmcuLCAiMXN0IG9mIEphbnVhcnkgMjAyNCIpLg0KCSAqDQoJICogQHBhcmFtIHN0cmluZ3xpbnQgICRkYXRlICAgICAgICAgVGhlIGRhdGUgYXMgYSBzdHJpbmcgb3IgdGltZXN0YW1wLg0KCSAqIEBwYXJhbSBib29sICAgICAgICAkY2hlY2tTdGFtcCAgIFdoZXRoZXIgdG8gY2hlY2sgaWYgdGhlIGlucHV0IGlzIGEgdGltZXN0YW1wLg0KCSAqDQoJICogQHJldHVybiBzdHJpbmcgRm9ybWF0dGVkIGRhdGUuDQoJICogQHNpbmNlIDMuMC4wDQoJICogQGRlcHJlY2F0ZWQgNC4wLjAgVXNlIFN1cGVyX19fOTkzZmU5MTNfOGUzNl80ODAwX2E1ZjdfNTQ0YWE3MjhlZTQ4X19fUG93ZXI6OmZhbmN5RGF0ZSgkZGF0ZSwgJGNoZWNrU3RhbXApOw0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZmFuY3lEYXRlKCRkYXRlLCBib29sICRjaGVja1N0YW1wID0gdHJ1ZSk6IHN0cmluZw0KCXsNCgkJcmV0dXJuIFN1cGVyX19fOTkzZmU5MTNfOGUzNl80ODAwX2E1ZjdfNTQ0YWE3MjhlZTQ4X19fUG93ZXI6OmZhbmN5RGF0ZSgkZGF0ZSwgJGNoZWNrU3RhbXApOw0KCX0NCg0KCS8qKg0KCSAqIEdldCBhIGZvcm1hdHRlZCBkYXRlIGJhc2VkIG9uIHRoZSB0aW1lIHBlcmlvZCAoZHluYW1pYyBmb3JtYXQgYmFzZWQgb24gYWdlIG9mIHRoZSBkYXRlKS4NCgkgKg0KCSAqIEBwYXJhbSBzdHJpbmd8aW50ICAkZGF0ZSAgICA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2aW5nIHRoZSBmaWxlLicsICdlcnJvcicpOw0KCQl9DQoNCgkJcmV0dXJuIG51bGw7DQoJfQ0KfQ==', 0, 1, '', 'dynamicDownloadController', '', '', '', 'Dynamic Download Controller', 2, '', 0, '', 1, '2018-10-30 16:20:34', '2024-09-18 23:34:13', 9, 0, 111), (338, 'IyMgQ29udHJpYnV0b3JzDQpUaGlzIHByb2plY3QgZXhpc3RzIHRoYW5rcyB0byBhbGwgdGhlIHBlb3BsZSB3aG8gY29udHJpYnV0ZSB0byB0aGUgW0pvb21sYSBDb21wb25lbnQgQnVpbGRlciBQcm9qZWN0XShodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlcikuDQoNClshW0NvbnRyaWJ1dG9yc10oaHR0cHM6Ly9vcGVuY29sbGVjdGl2ZS5jb20vSm9vbWxhLUNvbXBvbmVudC1CdWlsZGVyL2NvbnRyaWJ1dG9ycy5zdmc/d2lkdGg9ODkwJmJ1dHRvbj1mYWxzZSldKGh0dHBzOi8vZ2l0aHViLmNvbS92ZG0taW8vSm9vbWxhLUNvbXBvbmVudC1CdWlsZGVyL2dyYXBocy9jb250cmlidXRvcnMpDQoNCiMjIyBCYWNrZXJzDQpUaGFuayB5b3UgdG8gYWxsIG91ciBiYWNrZXJzISDwn5mPIFtbQmVjb21lIGEgYmFja2VyXShodHRwczovL29wZW5jb2xsZWN0aXZlLmNvbS9Kb29tbGEtQ29tcG9uZW50LUJ1aWxkZXIjYmFja2VyKV0NCg0KWyFbT3VyIEJhY2tlcnMgb24gb3BlbmNvbGxlY3RpdmVdKGh0dHBzOi8vb3BlbmNvbGxlY3RpdmUuY29tL0pvb21sYS1Db21wb25lbnQtQnVpbGRlci9iYWNrZXJzLnN2Zz93aWR0aD04OTApXShodHRwczovL29wZW5jb2xsZWN0aXZlLmNvbS9Kb29tbGEtQ29tcG9uZW50LUJ1aWxkZXIjYmFja2VycykNCg0KIyMjIFNwb25zb3JzDQpTd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lzIGJlIHNldA0KCQkJJGRhdGFbJ2d1aWQnXSA9IChzdHJpbmcpIFN1cGVyX19fOWM1MTNiYWZfYjI3OV80M2ZkX2FlMjlfYTU4NWM4Y2JjNGYwX19fUG93ZXI6OmdldCgpOw0KCQl9', 0, 1, 1646, 'saveGUIDPower', '6__ebdedf217dd264bb88f9418ba0092c96', 0, '', 'save GUID (Power)', 2, 1652, 0, '', 1, '2023-06-29 16:14:44', '2023-06-29 16:15:32', 2, 0, 103), (362, 'CQkvLyBPbmx5IGxvYWQgdGhlIEdVSUQgaWYgbmV3IGl0ZW0gKG9yIGVtcHR5KQ0KCQlpZiAoMCA9PSAkaWQgfHwgISgkdmFsID0gJGZvcm0tPmdldFZhbHVlKCdndWlkJykpKQ0KCQl7DQoJCQkkZm9ybS0+c2V0VmFsdWUoJ2d1aWQnLCBudWxsLCBTdXBlcl9fXzljNTEzYmFmX2IyNzlfNDNmZF9hZTI5X2E1ODVjOGNiYzRmMF9fX1Bvd2VyOjpnZXQoKSk7DQoJCX0NCg==', 0, 1, 974, 'setGUIDFormPower', '9__dc008c80098451abad327b4cb92e9611', 0, '', 'Set GUID in Form (power)', 2, 980, 0, '', 1, '2023-06-29 16:46:40', '2024-01-25 14:23:31', 2, 0, 103), @@ -2871,7 +2871,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `description`, `name`, `prope (3, 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'A single checkbox.', '', 1, 10, 0, 0, '10066262-b6e3-4f82-941e-cbe4f61ddd6c'), (4, 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of an array.', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Checkboxes that can be used for multi-select.', '', 1, 5, 0, 0, 'ac10859b-58da-4584-9682-36a6c2c8d04d'), (5, 'Provides a color picker input that allows users to select a color from a visual palette or enter a hexadecimal color code, such as #ff00ff.', 'Color', '{\"properties0\":{\"name\":\"type\",\"example\":\"color\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be color.\"},\"properties1\":{\"name\":\"name\",\"example\":\"backgroundcolor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"default\",\"example\":\"#FFFFFF\",\"adjustable\":\"1\",\"description\":\"(optional) provides a color when not set.\"},\"properties3\":{\"name\":\"label\",\"example\":\"Background\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Select the background color here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) tooltip for the form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Color picker when clicking the input box.', '', 1, 6, 0, 0, '7f60f198-53e7-4fe9-813f-d1b6c553680e'), -(6, 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type. You can also not use the \\\"_\\\" (underscore) or \\\"-\\\" (hyphen) in the type name, and no spaces.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"layout\",\"example\":\"joomla.form.field.list-fancy-select\",\"adjustable\":\"1\",\"description\":\"(optional) New layout field added in Joomla 4\"},\"properties7\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties8\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties9\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties10\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties11\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties12\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties15\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties16\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties17\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties18\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties19\":{\"name\":\"entity\",\"example\":\"###view###\",\"adjustable\":\"1\",\"description\":\"(optional) The area\\/entity this custom field is loaded. This value can be used in the field custom code.\"},\"properties20\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties21\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties22\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties23\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties24\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties25\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ Get the user object.\\r\\n\\t\\t$user = Factory::getUser();\\r\\n\\t\\t\\/\\/ Get the databse object.\\r\\n\\t\\t$db = Factory::getDBO();\\r\\n\\t\\t$query = $db->getQuery(true);\\r\\n\\t\\t$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\\r\\n\\t\\t$query->from($db->quoteName(\'###TABLE###\', \'a\'));\\r\\n\\t\\t$query->where($db->quoteName(\'a.published\') . \' = 1\');\\r\\n\\t\\t$query->order(\'a.###TEXT### ASC\');\\r\\n\\t\\t\\/\\/ Implement View Level Access (if set in table)\\r\\n\\t\\tif (!$user->authorise(\'core.options\', \'[[[com_component]]]\'))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$columns = $db->getTableColumns(\'###TABLE###\');\\r\\n\\t\\t\\tif(isset($columns[\'access\']))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$groups = implode(\',\', $user->getAuthorisedViewLevels());\\r\\n\\t\\t\\t\\t$query->where(\'a.access IN (\' . $groups . \')\');\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$db->setQuery((string)$query);\\r\\n\\t\\t$items = $db->loadObjectList();\\r\\n\\t\\t$options = [];\\r\\n\\t\\tif ($items)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif ($this->multiple === false)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = Html::_(\'select.option\', \'\', Text::_(\'Select an option\'));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tforeach($items as $item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = Html::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'Custom drop down list of items entries.', '', 1, 35, 0, 0, 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a'), +(6, 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type. You can also not use the \\\"_\\\" (underscore) or \\\"-\\\" (hyphen) in the type name, and no spaces.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"layout\",\"example\":\"joomla.form.field.list-fancy-select\",\"adjustable\":\"1\",\"description\":\"(optional) New layout field added in Joomla 4\"},\"properties7\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties8\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties9\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties10\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties11\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties12\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties15\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties16\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties17\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties18\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties19\":{\"name\":\"entity\",\"example\":\"###view###\",\"adjustable\":\"1\",\"description\":\"(optional) The area\\/entity this custom field is loaded. This value can be used in the field custom code.\"},\"properties20\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties21\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties22\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties23\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties24\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties25\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ Get the user object.\\r\\n\\t\\t$user = Factory::getApplication()->getIdentity();\\r\\n\\t\\t\\/\\/ Get the databse object.\\r\\n\\t\\t$db = Factory::getContainer()->get(DatabaseInterface::class);\\r\\n\\t\\t$query = $db->getQuery(true);\\r\\n\\t\\t$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\\r\\n\\t\\t$query->from($db->quoteName(\'###TABLE###\', \'a\'));\\r\\n\\t\\t$query->where($db->quoteName(\'a.published\') . \' = 1\');\\r\\n\\t\\t$query->order(\'a.###TEXT### ASC\');\\r\\n\\t\\t\\/\\/ Implement View Level Access (if set in table)\\r\\n\\t\\tif (!$user->authorise(\'core.options\', \'[[[com_component]]]\'))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$columns = $db->getTableColumns(\'###TABLE###\');\\r\\n\\t\\t\\tif(isset($columns[\'access\']))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$groups = implode(\',\', $user->getAuthorisedViewLevels());\\r\\n\\t\\t\\t\\t$query->where(\'a.access IN (\' . $groups . \')\');\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$db->setQuery((string)$query);\\r\\n\\t\\t$items = $db->loadObjectList();\\r\\n\\t\\t$options = [];\\r\\n\\t\\tif ($items)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif ($this->multiple === false)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = Html::_(\'select.option\', \'\', Text::_(\'Select an option\'));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tforeach($items as $item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = Html::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'Custom drop down list of items entries.', '', 1, 36, 0, 0, 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a'), (7, 'A CustomUser fieldtype displays a filtered list of users based on selected user groups. It can exclude users already linked to items in the current view, making it useful for assigning unique users within specific contexts.', 'CustomUser', '{\"properties0\":{\"name\":\"type\",\"example\":\"staffusers\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"\"},\"properties10\":{\"name\":\"hint\",\"example\":\"select a user\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties12\":{\"name\":\"extends\",\"example\":\"user\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties13\":{\"name\":\"table\",\"example\":\"#__users\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. Must be #__users\"},\"properties14\":{\"name\":\"component\",\"example\":\"com_users\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties15\":{\"name\":\"view\",\"example\":\"###view###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties16\":{\"name\":\"views\",\"example\":\"###views###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties17\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties18\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties19\":{\"name\":\"type_php_1\",\"example\":\"\\t\\t\\/\\/ set the groups array\\r\\n\\t\\treturn ComponentHelper::getParams(\'com_###component###\')->get(\'###type###\');\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties20\":{\"name\":\"type_phpx_1\",\"example\":\"\\t\\t\\/\\/ To ensure that there is only one record per user\\r\\n\\t\\t\\/\\/ Get a db connection.\\r\\n\\t\\t$db = Factory::getDbo();\\r\\n\\t\\t\\/\\/ Create a new query object.\\r\\n\\t\\t$query = $db->getQuery(true);\\r\\n\\t\\t\\/\\/ Select all records from the #__###component###_###view### table from ###CODE### column\\\".\\r\\n\\t\\t$query->select($db->quoteName(\'###CODE###\'));\\r\\n\\t\\t$query->from($db->quoteName(\'#__###component###_###view###\'));\\r\\n\\t\\t$db->setQuery($query);\\r\\n\\t\\t$db->execute();\\r\\n\\t\\t$found = $db->getNumRows();\\r\\n\\t\\tif ($found)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\/\\/ return all users already used\\r\\n\\t\\t\\treturn array_unique($db->loadColumn());\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"}}', 'List of users.', '', 1, 7, 0, 0, 'a4a39f70-070f-459c-be4b-0ac103a29b9a'), (8, 'The Editor field type provides a WYSIWYG (What You See Is What You Get) editor for rich text input, allowing users to format content visually without writing HTML.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties7\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties8\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties9\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties10\":{\"name\":\"buttons\",\"example\":\"no\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties11\":{\"name\":\"syntax\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) can be used to set the code syntax matching for this field.\"},\"properties12\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties13\":{\"name\":\"editor\",\"example\":\"codemirror|none\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties14\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties15\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties16\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Editor area field.', '', 1, 13, 0, 0, '51f288d2-6eaa-42bc-a182-a6f69b3032b8'), (9, 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value, this is entered; otherwise, the default value (if defined) will be used.', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties3\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'Hidden field for storing fixed values.', '', 1, 3, 0, 0, '82f1b5ca-bb9b-44d7-9a7a-9a03fb2a31dd'), diff --git a/admin/src/Controller/AjaxController.php b/admin/src/Controller/AjaxController.php index 94c6734fb..5f9d0429c 100644 --- a/admin/src/Controller/AjaxController.php +++ b/admin/src/Controller/AjaxController.php @@ -105,7 +105,7 @@ class AjaxController extends BaseController // get the user for later use $user = $this->app->getIdentity(); // get the input values - $jinput = $this->input ?? $this->app->input; + $jinput = $this->input ?? (method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input); // check if we should return raw (DEFAULT TRUE SINCE J4) $returnRaw = $jinput->get('raw', true, 'BOOLEAN'); // return to a callback function diff --git a/admin/src/Controller/CompilerController.php b/admin/src/Controller/CompilerController.php index 8cf0baf20..db10029cb 100644 --- a/admin/src/Controller/CompilerController.php +++ b/admin/src/Controller/CompilerController.php @@ -460,7 +460,7 @@ class CompilerController extends AdminController if (UtilitiesArrayHelper::check($fileNames)) { - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); $moduleId = $jinput->post->get('install_item_id', 0, 'INT'); if ($moduleId > 0 && isset($fileNames[$moduleId]) && $this->installExtension($fileNames[$moduleId])) { @@ -503,7 +503,7 @@ class CompilerController extends AdminController if (UtilitiesArrayHelper::check($fileNames)) { - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); $pluginId = $jinput->post->get('install_item_id', 0, 'INT'); if ($pluginId > 0 && isset($fileNames[$pluginId]) && $this->installExtension($fileNames[$pluginId])) { diff --git a/admin/src/Controller/HelpController.php b/admin/src/Controller/HelpController.php index 1ba1380c6..0f74f858b 100644 --- a/admin/src/Controller/HelpController.php +++ b/admin/src/Controller/HelpController.php @@ -36,8 +36,9 @@ class HelpController extends BaseController public function help() { - $user = Factory::getApplication()->getIdentity(); - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + $user = $app->getIdentity(); + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Check Token! $token = Session::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); diff --git a/admin/src/Field/AdminlistvieworderfieldsField.php b/admin/src/Field/AdminlistvieworderfieldsField.php index f89a2cbaa..af1293b6e 100644 --- a/admin/src/Field/AdminlistvieworderfieldsField.php +++ b/admin/src/Field/AdminlistvieworderfieldsField.php @@ -21,6 +21,7 @@ use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\String\FieldHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -48,9 +49,9 @@ class AdminlistvieworderfieldsField extends ListField protected function getOptions() { // load the db object - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); $adminView = null; diff --git a/admin/src/Field/AliasbuilderField.php b/admin/src/Field/AliasbuilderField.php index 2a5b4602e..a691255da 100644 --- a/admin/src/Field/AliasbuilderField.php +++ b/admin/src/Field/AliasbuilderField.php @@ -18,6 +18,7 @@ use Joomla\CMS\Component\ComponentHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -45,9 +46,9 @@ class AliasbuilderField extends ListField protected function getOptions() { // load the db object - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $adminView = $jinput->getInt('id', 0); // rest the fields ids diff --git a/admin/src/Field/ClasspowersField.php b/admin/src/Field/ClasspowersField.php index 4130ebcd9..3b4f4b442 100644 --- a/admin/src/Field/ClasspowersField.php +++ b/admin/src/Field/ClasspowersField.php @@ -17,6 +17,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use Joomla\CMS\Uri\Uri; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -56,7 +57,7 @@ class ClasspowersField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', @@ -153,8 +154,8 @@ class ClasspowersField extends ListField { // Get the user object. $user = Factory::getApplication()->getIdentity(); - // Get the databse object. - $db = Factory::getDBO(); + // load the db object + $db = Factory::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','extends_name','system_name','type','version'))); $query->from($db->quoteName('#__componentbuilder_power', 'a')); @@ -173,7 +174,7 @@ class ClasspowersField extends ListField } } // get the input - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $power_id = $jinput->getInt('id', 0); // if we have an id we remove all classes of the same namespace and name diff --git a/admin/src/Field/ComponentadminmenusField.php b/admin/src/Field/ComponentadminmenusField.php index 247c7c83a..63e12da1f 100644 --- a/admin/src/Field/ComponentadminmenusField.php +++ b/admin/src/Field/ComponentadminmenusField.php @@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -46,15 +47,15 @@ class ComponentadminmenusField extends ListField */ protected function getOptions() { - // load the db opbject - $db = Factory::getDBO(); + // load the db object + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); // rest the fields guid's - $viewGuids = array(); + $viewGuids = []; if (is_numeric($ID) && $ID >= 1) { // get the joomla component ID diff --git a/admin/src/Field/ComponentadminviewsField.php b/admin/src/Field/ComponentadminviewsField.php index 78ab1efc1..180060d61 100644 --- a/admin/src/Field/ComponentadminviewsField.php +++ b/admin/src/Field/ComponentadminviewsField.php @@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -47,9 +48,9 @@ class ComponentadminviewsField extends ListField protected function getOptions() { // load the db opbject - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); diff --git a/admin/src/Field/DynamicdashboardField.php b/admin/src/Field/DynamicdashboardField.php index c1f0faea0..b953b43e7 100644 --- a/admin/src/Field/DynamicdashboardField.php +++ b/admin/src/Field/DynamicdashboardField.php @@ -21,6 +21,7 @@ use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\GuidHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -48,9 +49,9 @@ class DynamicdashboardField extends ListField protected function getOptions() { // load the db opbject - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $id = $jinput->getInt('id', 0); // set the targets diff --git a/admin/src/Field/DynamicgetField.php b/admin/src/Field/DynamicgetField.php index cb4390a5e..83f386c93 100644 --- a/admin/src/Field/DynamicgetField.php +++ b/admin/src/Field/DynamicgetField.php @@ -56,7 +56,7 @@ class DynamicgetField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/ExcludedlanguagesField.php b/admin/src/Field/ExcludedlanguagesField.php index c6f2fa0e4..8a2be4e5d 100644 --- a/admin/src/Field/ExcludedlanguagesField.php +++ b/admin/src/Field/ExcludedlanguagesField.php @@ -56,7 +56,7 @@ class ExcludedlanguagesField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/FieldtypesField.php b/admin/src/Field/FieldtypesField.php index c857a5bc3..3a0b6f81e 100644 --- a/admin/src/Field/FieldtypesField.php +++ b/admin/src/Field/FieldtypesField.php @@ -56,7 +56,7 @@ class FieldtypesField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/FilebehaviourField.php b/admin/src/Field/FilebehaviourField.php index 13b1be38f..3fd101857 100644 --- a/admin/src/Field/FilebehaviourField.php +++ b/admin/src/Field/FilebehaviourField.php @@ -42,9 +42,9 @@ class FilebehaviourField extends ListField */ protected function getOptions() { - // get the input from url - $jinput = Factory::getApplication()->input; - // get the library id + // get the input from url + $jinput = Factory::getApplication()->getInput(); + // get the library id $libID = $jinput->getInt('id', 0); $options[] = Html::_('select.option', '1', Text::_('COM_COMPONENTBUILDER_ALWAYS_ADD')); // add build in option for some libraries @@ -56,6 +56,6 @@ class FilebehaviourField extends ListField $options[] = Html::_('select.option', '2', Text::_('COM_COMPONENTBUILDER_CONDITIONS')); $options[] = Html::_('select.option', '3', Text::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT')); $options[] = Html::_('select.option', '0', Text::_('COM_COMPONENTBUILDER_DO_NOT_ADD')); -return $options; + return $options; } } diff --git a/admin/src/Field/InterfacepowersField.php b/admin/src/Field/InterfacepowersField.php index 13ba6243e..4ba59d848 100644 --- a/admin/src/Field/InterfacepowersField.php +++ b/admin/src/Field/InterfacepowersField.php @@ -17,6 +17,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use Joomla\CMS\Uri\Uri; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -56,7 +57,7 @@ class InterfacepowersField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', @@ -154,7 +155,7 @@ class InterfacepowersField extends ListField // Get the user object. $user = Factory::getApplication()->getIdentity(); // Get the databse object. - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','extendsinterfaces_name','system_name','type','version'))); $query->from($db->quoteName('#__componentbuilder_power', 'a')); @@ -173,7 +174,7 @@ class InterfacepowersField extends ListField } } // get the input - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $power_id = $jinput->getInt('id', 0); // if we have an id we remove all classes of the same namespace and name diff --git a/admin/src/Field/JoinfieldsField.php b/admin/src/Field/JoinfieldsField.php index fe4fa50e0..289ebdeb9 100644 --- a/admin/src/Field/JoinfieldsField.php +++ b/admin/src/Field/JoinfieldsField.php @@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -47,9 +48,9 @@ class JoinfieldsField extends ListField protected function getOptions() { // load the db opbject - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); // rest the fields guids diff --git a/admin/src/Field/JoomlacomponentField.php b/admin/src/Field/JoomlacomponentField.php index 49e29fbef..a0a28d909 100644 --- a/admin/src/Field/JoomlacomponentField.php +++ b/admin/src/Field/JoomlacomponentField.php @@ -56,7 +56,7 @@ class JoomlacomponentField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/JoomlapluginsField.php b/admin/src/Field/JoomlapluginsField.php index 8d39165bd..331673cc2 100644 --- a/admin/src/Field/JoomlapluginsField.php +++ b/admin/src/Field/JoomlapluginsField.php @@ -56,7 +56,7 @@ class JoomlapluginsField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/LibconfigfieldField.php b/admin/src/Field/LibconfigfieldField.php index 75e43d093..4585ea993 100644 --- a/admin/src/Field/LibconfigfieldField.php +++ b/admin/src/Field/LibconfigfieldField.php @@ -16,6 +16,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -43,9 +44,9 @@ class LibconfigfieldField extends ListField protected function getOptions() { // load the db object - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); // rest the fields ids @@ -83,7 +84,7 @@ class LibconfigfieldField extends ListField $query->order('a.name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { $options[] = Html::_('select.option', '', 'Select an option'); @@ -94,6 +95,6 @@ class LibconfigfieldField extends ListField return $options; } } - return array(Html::_('select.option', '', 'No config fields linked')); + return [Html::_('select.option', '', 'No config fields linked')]; } } diff --git a/admin/src/Field/LibrariesField.php b/admin/src/Field/LibrariesField.php index 56aa98ccc..a0165eebe 100644 --- a/admin/src/Field/LibrariesField.php +++ b/admin/src/Field/LibrariesField.php @@ -56,7 +56,7 @@ class LibrariesField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/LibrariesxField.php b/admin/src/Field/LibrariesxField.php index d04c35bae..d0bd73bcf 100644 --- a/admin/src/Field/LibrariesxField.php +++ b/admin/src/Field/LibrariesxField.php @@ -17,6 +17,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use Joomla\CMS\Uri\Uri; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -56,7 +57,7 @@ class LibrariesxField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', @@ -152,10 +153,10 @@ class LibrariesxField extends ListField protected function getOptions() { // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the library id $libID = $jinput->getInt('id', 0); - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.guid','a.name'),array('guid','libraries_name'))); $query->from($db->quoteName('#__componentbuilder_library', 'a')); diff --git a/admin/src/Field/LibraryfilesField.php b/admin/src/Field/LibraryfilesField.php index 0ffaa222f..b632a883f 100644 --- a/admin/src/Field/LibraryfilesField.php +++ b/admin/src/Field/LibraryfilesField.php @@ -43,7 +43,7 @@ class LibraryfilesField extends ListField protected function getOptions() { // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the library id $id = $jinput->getInt('id', 0); // get custom the files diff --git a/admin/src/Field/LinkedviewsorderfieldsField.php b/admin/src/Field/LinkedviewsorderfieldsField.php index ed9ba7b57..c76bbe9c1 100644 --- a/admin/src/Field/LinkedviewsorderfieldsField.php +++ b/admin/src/Field/LinkedviewsorderfieldsField.php @@ -16,6 +16,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -43,9 +44,9 @@ class LinkedviewsorderfieldsField extends ListField protected function getOptions() { // load the db object - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $adminView = $jinput->getInt('id', 0); // check if we have an admin view @@ -84,7 +85,7 @@ class LinkedviewsorderfieldsField extends ListField $query->order('a.name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { $options[] = Html::_('select.option', '', Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); diff --git a/admin/src/Field/ListfieldsField.php b/admin/src/Field/ListfieldsField.php index 703d9caad..a86da9567 100644 --- a/admin/src/Field/ListfieldsField.php +++ b/admin/src/Field/ListfieldsField.php @@ -21,6 +21,7 @@ use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\String\FieldHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -48,9 +49,9 @@ class ListfieldsField extends ListField protected function getOptions() { // load the db opbject - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); // rest the fields guids diff --git a/admin/src/Field/MatchfieldField.php b/admin/src/Field/MatchfieldField.php index 1b5349cd7..628156473 100644 --- a/admin/src/Field/MatchfieldField.php +++ b/admin/src/Field/MatchfieldField.php @@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -47,9 +48,9 @@ class MatchfieldField extends ListField protected function getOptions() { // load the db object - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); diff --git a/admin/src/Field/ServersField.php b/admin/src/Field/ServersField.php index 5f64f16ff..9c2130c51 100644 --- a/admin/src/Field/ServersField.php +++ b/admin/src/Field/ServersField.php @@ -56,7 +56,7 @@ class ServersField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/SnippetsField.php b/admin/src/Field/SnippetsField.php index 12e9e12c1..b396222b4 100644 --- a/admin/src/Field/SnippetsField.php +++ b/admin/src/Field/SnippetsField.php @@ -57,7 +57,7 @@ class SnippetsField extends ListField $button_code_name = $this->getAttribute('name'); // get the input from url $app = Factory::getApplication(); - $jinput = $app->input; + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', diff --git a/admin/src/Field/TargetfieldsField.php b/admin/src/Field/TargetfieldsField.php index 7f1c068d6..64c761d82 100644 --- a/admin/src/Field/TargetfieldsField.php +++ b/admin/src/Field/TargetfieldsField.php @@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -47,9 +48,9 @@ class TargetfieldsField extends ListField protected function getOptions() { // load the db opbject - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); // rest the fields guids @@ -107,7 +108,7 @@ class TargetfieldsField extends ListField $query->order('a.name ASC'); $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { foreach($items as $item) diff --git a/admin/src/Field/ViewtabsField.php b/admin/src/Field/ViewtabsField.php index 5be392d13..358fe107c 100644 --- a/admin/src/Field/ViewtabsField.php +++ b/admin/src/Field/ViewtabsField.php @@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\Database\DatabaseInterface; // No direct access to this file \defined('_JEXEC') or die; @@ -47,9 +48,9 @@ class ViewtabsField extends ListField protected function getOptions() { // load the db opbject - $db = Factory::getDBO(); + $db = Factory::getContainer()->get(DatabaseInterface::class); // get the input from url - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); // get the id $ID = $jinput->getInt('id', 0); $adminView = null; @@ -70,7 +71,6 @@ class ViewtabsField extends ListField $adminView = $initDefaults['admin_view'] ?? null; } } - $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(['a.addtabs'],['addtabs'])); $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); diff --git a/admin/src/Helper/ComponentbuilderHelper.php b/admin/src/Helper/ComponentbuilderHelper.php index dcf8f741b..1b36f93f9 100644 --- a/admin/src/Helper/ComponentbuilderHelper.php +++ b/admin/src/Helper/ComponentbuilderHelper.php @@ -2460,7 +2460,7 @@ abstract class ComponentbuilderHelper $script['setdata'][] = self::_t(2) . "{"; $script['setdata'][] = self::_t(3) . "// make sure the file is loaded"; $script['setdata'][] = self::_t(3) . "[[[-#-#-Component]]]Helper::composerAutoload('phpspreadsheet');"; - $script['setdata'][] = self::_t(3) . "\$jinput = Factory::getApplication()->input;"; + $script['setdata'][] = self::_t(3) . "\$jinput = Factory::getApplication()->getInput();"; $script['setdata'][] = self::_t(3) . "foreach(\$target_headers as \$header)"; $script['setdata'][] = self::_t(3) . "{"; $script['setdata'][] = self::_t(4) . "if ((\$column = \$jinput->getString(\$header, false)) !== false ||"; diff --git a/admin/src/Model/Admin_custom_tabsModel.php b/admin/src/Model/Admin_custom_tabsModel.php index 122395e92..7ca611448 100644 --- a/admin/src/Model/Admin_custom_tabsModel.php +++ b/admin/src/Model/Admin_custom_tabsModel.php @@ -191,7 +191,9 @@ class Admin_custom_tabsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Admin_fieldsModel.php b/admin/src/Model/Admin_fieldsModel.php index 45a2a6cad..e4856075d 100644 --- a/admin/src/Model/Admin_fieldsModel.php +++ b/admin/src/Model/Admin_fieldsModel.php @@ -212,7 +212,9 @@ class Admin_fieldsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Admin_fields_conditionsModel.php b/admin/src/Model/Admin_fields_conditionsModel.php index d7bca9291..48fd365a3 100644 --- a/admin/src/Model/Admin_fields_conditionsModel.php +++ b/admin/src/Model/Admin_fields_conditionsModel.php @@ -212,7 +212,9 @@ class Admin_fields_conditionsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Admin_fields_relationsModel.php b/admin/src/Model/Admin_fields_relationsModel.php index 871d52033..4298ee451 100644 --- a/admin/src/Model/Admin_fields_relationsModel.php +++ b/admin/src/Model/Admin_fields_relationsModel.php @@ -159,8 +159,9 @@ class Admin_fields_relationsModel extends AdminModel SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id); SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -231,8 +232,9 @@ class Admin_fields_relationsModel extends AdminModel SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id); SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -283,7 +285,9 @@ class Admin_fields_relationsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Admin_viewModel.php b/admin/src/Model/Admin_viewModel.php index f1972957e..7e27f6193 100644 --- a/admin/src/Model/Admin_viewModel.php +++ b/admin/src/Model/Admin_viewModel.php @@ -295,8 +295,9 @@ class Admin_viewModel extends AdminModel SessionHelper::set($this->vastDevMod, 'admin_view__'.$id); SessionHelper::set('admin_view__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -601,8 +602,9 @@ class Admin_viewModel extends AdminModel SessionHelper::set($this->vastDevMod, 'admin_view__'.$id); SessionHelper::set('admin_view__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -669,7 +671,9 @@ class Admin_viewModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Admin_viewsModel.php b/admin/src/Model/Admin_viewsModel.php index fe63a1bbc..f6a0c1b38 100644 --- a/admin/src/Model/Admin_viewsModel.php +++ b/admin/src/Model/Admin_viewsModel.php @@ -164,20 +164,21 @@ class Admin_viewsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -199,49 +200,49 @@ class Admin_viewsModel extends ListModel $add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein'); if ($formSubmited) { - $add_fadein = $app->input->post->get('add_fadein'); + $add_fadein = $input->post->get('add_fadein'); $this->setState('filter.add_fadein', $add_fadein); } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); if ($formSubmited) { - $add_custom_button = $app->input->post->get('add_custom_button'); + $add_custom_button = $input->post->get('add_custom_button'); $this->setState('filter.add_custom_button', $add_custom_button); } $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); if ($formSubmited) { - $add_php_ajax = $app->input->post->get('add_php_ajax'); + $add_php_ajax = $input->post->get('add_php_ajax'); $this->setState('filter.add_php_ajax', $add_php_ajax); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } $name_single = $this->getUserStateFromRequest($this->context . '.filter.name_single', 'filter_name_single'); if ($formSubmited) { - $name_single = $app->input->post->get('name_single'); + $name_single = $input->post->get('name_single'); $this->setState('filter.name_single', $name_single); } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); if ($formSubmited) { - $short_description = $app->input->post->get('short_description'); + $short_description = $input->post->get('short_description'); $this->setState('filter.short_description', $short_description); } @@ -670,6 +671,7 @@ class Admin_viewsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_admin_view')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Admins_custom_tabsModel.php b/admin/src/Model/Admins_custom_tabsModel.php index 909f322d6..ebf2350b4 100644 --- a/admin/src/Model/Admins_custom_tabsModel.php +++ b/admin/src/Model/Admins_custom_tabsModel.php @@ -108,20 +108,21 @@ class Admins_custom_tabsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Admins_custom_tabsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_admin_custom_tabs')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Admins_fieldsModel.php b/admin/src/Model/Admins_fieldsModel.php index 342afdb6b..2360cd479 100644 --- a/admin/src/Model/Admins_fieldsModel.php +++ b/admin/src/Model/Admins_fieldsModel.php @@ -108,20 +108,21 @@ class Admins_fieldsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Admins_fieldsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_admin_fields')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Admins_fields_conditionsModel.php b/admin/src/Model/Admins_fields_conditionsModel.php index 6dc539250..e19769af3 100644 --- a/admin/src/Model/Admins_fields_conditionsModel.php +++ b/admin/src/Model/Admins_fields_conditionsModel.php @@ -108,20 +108,21 @@ class Admins_fields_conditionsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Admins_fields_conditionsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_admin_fields_conditions')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Admins_fields_relationsModel.php b/admin/src/Model/Admins_fields_relationsModel.php index c2b947bec..a24fed6fc 100644 --- a/admin/src/Model/Admins_fields_relationsModel.php +++ b/admin/src/Model/Admins_fields_relationsModel.php @@ -108,20 +108,21 @@ class Admins_fields_relationsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Admins_fields_relationsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_admin_fields_relations')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/AjaxModel.php b/admin/src/Model/AjaxModel.php index b5d9989f4..dbd5a8896 100644 --- a/admin/src/Model/AjaxModel.php +++ b/admin/src/Model/AjaxModel.php @@ -2205,8 +2205,8 @@ class AjaxModel extends ListModel if (!isset($this->viewid[$call])) { // get the vdm key - $jinput = Factory::getApplication()->input; - $vdm = $jinput->get('vdm', null, 'WORD'); + $input = Factory::getApplication()->getInput(); + $vdm = $input->get('vdm', null, 'WORD'); if ($vdm) { // set view and id @@ -3423,7 +3423,7 @@ class AjaxModel extends ListModel */ protected function buildReturnUrl(array $view, int $id): string { - $jinput = Factory::getApplication()->input; + $jinput = Factory::getApplication()->getInput(); $returnHere = $jinput->get('return_here', null, 'base64'); if (StringHelper::check($returnHere)) { @@ -3670,8 +3670,8 @@ class AjaxModel extends ListModel */ protected function buildReturnUrlForcustom_code(int $id): string { - $jinput = Factory::getApplication()->input; - $returnHere = $jinput->get('return_here', null, 'base64'); + $input = Factory::getApplication()->getInput(); + $returnHere = $input->get('return_here', null, 'base64'); if (StringHelper::check($returnHere)) { return '&return=' . $returnHere; @@ -4104,8 +4104,8 @@ class AjaxModel extends ListModel */ protected function buildReturnUrlForplaceholder(int $id): string { - $jinput = Factory::getApplication()->input; - $returnHere = $jinput->get('return_here', null, 'base64'); + $input = Factory::getApplication()->getInput(); + $returnHere = $input->get('return_here', null, 'base64'); if (StringHelper::check($returnHere)) { return '&return=' . $returnHere; diff --git a/admin/src/Model/Class_extendingsModel.php b/admin/src/Model/Class_extendingsModel.php index 487eef80f..41f7ec4f6 100644 --- a/admin/src/Model/Class_extendingsModel.php +++ b/admin/src/Model/Class_extendingsModel.php @@ -110,20 +110,21 @@ class Class_extendingsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -145,14 +146,14 @@ class Class_extendingsModel extends ListModel $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); if ($formSubmited) { - $extension_type = $app->input->post->get('extension_type'); + $extension_type = $input->post->get('extension_type'); $this->setState('filter.extension_type', $extension_type); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } @@ -434,6 +435,7 @@ class Class_extendingsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_class_extends')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Class_extendsModel.php b/admin/src/Model/Class_extendsModel.php index 4b01cea1f..d0df7369f 100644 --- a/admin/src/Model/Class_extendsModel.php +++ b/admin/src/Model/Class_extendsModel.php @@ -164,8 +164,9 @@ class Class_extendsModel extends AdminModel SessionHelper::set($this->vastDevMod, 'class_extends__'.$id); SessionHelper::set('class_extends__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -240,8 +241,9 @@ class Class_extendsModel extends AdminModel SessionHelper::set($this->vastDevMod, 'class_extends__'.$id); SessionHelper::set('class_extends__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -292,7 +294,9 @@ class Class_extendsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Class_methodModel.php b/admin/src/Model/Class_methodModel.php index 6670a0512..99bcfef02 100644 --- a/admin/src/Model/Class_methodModel.php +++ b/admin/src/Model/Class_methodModel.php @@ -167,8 +167,9 @@ class Class_methodModel extends AdminModel SessionHelper::set($this->vastDevMod, 'class_method__'.$id); SessionHelper::set('class_method__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -249,8 +250,9 @@ class Class_methodModel extends AdminModel SessionHelper::set($this->vastDevMod, 'class_method__'.$id); SessionHelper::set('class_method__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -301,7 +303,9 @@ class Class_methodModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Class_methodsModel.php b/admin/src/Model/Class_methodsModel.php index 311687b2e..2afdf7a7a 100644 --- a/admin/src/Model/Class_methodsModel.php +++ b/admin/src/Model/Class_methodsModel.php @@ -111,20 +111,21 @@ class Class_methodsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -146,21 +147,21 @@ class Class_methodsModel extends ListModel $visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility'); if ($formSubmited) { - $visibility = $app->input->post->get('visibility'); + $visibility = $input->post->get('visibility'); $this->setState('filter.visibility', $visibility); } $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); if ($formSubmited) { - $extension_type = $app->input->post->get('extension_type'); + $extension_type = $input->post->get('extension_type'); $this->setState('filter.extension_type', $extension_type); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } @@ -485,6 +486,7 @@ class Class_methodsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_class_method')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Class_propertiesModel.php b/admin/src/Model/Class_propertiesModel.php index 7772b3073..82091deeb 100644 --- a/admin/src/Model/Class_propertiesModel.php +++ b/admin/src/Model/Class_propertiesModel.php @@ -111,20 +111,21 @@ class Class_propertiesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -146,21 +147,21 @@ class Class_propertiesModel extends ListModel $visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility'); if ($formSubmited) { - $visibility = $app->input->post->get('visibility'); + $visibility = $input->post->get('visibility'); $this->setState('filter.visibility', $visibility); } $extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type'); if ($formSubmited) { - $extension_type = $app->input->post->get('extension_type'); + $extension_type = $input->post->get('extension_type'); $this->setState('filter.extension_type', $extension_type); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } @@ -479,6 +480,7 @@ class Class_propertiesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_class_property')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Class_propertyModel.php b/admin/src/Model/Class_propertyModel.php index a01596eec..dc5424a65 100644 --- a/admin/src/Model/Class_propertyModel.php +++ b/admin/src/Model/Class_propertyModel.php @@ -164,8 +164,9 @@ class Class_propertyModel extends AdminModel SessionHelper::set($this->vastDevMod, 'class_property__'.$id); SessionHelper::set('class_property__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -240,8 +241,9 @@ class Class_propertyModel extends AdminModel SessionHelper::set($this->vastDevMod, 'class_property__'.$id); SessionHelper::set('class_property__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -292,7 +294,9 @@ class Class_propertyModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/CompilerModel.php b/admin/src/Model/CompilerModel.php index 4e653cbf9..0a63044d2 100644 --- a/admin/src/Model/CompilerModel.php +++ b/admin/src/Model/CompilerModel.php @@ -25,6 +25,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\JsonHelper; +use Joomla\CMS\Event\Content\ContentPrepareEvent; use Joomla\Filesystem\Folder; use Joomla\Filesystem\File; use Joomla\CMS\Installer\InstallerHelper; @@ -209,9 +210,8 @@ class CompilerModel extends ListModel // Insure all item fields are adapted where needed. if (UtilitiesArrayHelper::check($items)) { - // Load the JEvent Dispatcher + // Load the Event Dispatcher PluginHelper::importPlugin('content'); - $this->_dispatcher = Factory::getApplication(); foreach ($items as $nr => &$item) { // Always create a slug for sef URL's @@ -222,7 +222,18 @@ class CompilerModel extends ListModel $_copyright = new \stdClass(); $_copyright->text =& $item->copyright; // value must be in text // Since all values are now in text (Joomla Limitation), we also add the field name (copyright) to context - $this->_dispatcher->triggerEvent("onContentPrepare", array('com_componentbuilder.compiler.copyright', &$_copyright, &$params, 0)); + // onContentPrepare Event Trigger + $this->getDispatcher()->dispatch('onContentPrepare', + new ContentPrepareEvent( + 'onContentPrepare', + [ + 'context' => 'com_componentbuilder.compiler.copyright', + 'subject' => $_copyright, + 'params' => $params, + 'page' => 0 + ] + ) + ); // Checking if copyright has UIKit components that must be loaded. $this->uikitComp = ComponentbuilderHelper::getUikitComp($item->copyright,$this->uikitComp); } diff --git a/admin/src/Model/Component_admin_viewsModel.php b/admin/src/Model/Component_admin_viewsModel.php index ff4027639..e617e8476 100644 --- a/admin/src/Model/Component_admin_viewsModel.php +++ b/admin/src/Model/Component_admin_viewsModel.php @@ -200,7 +200,9 @@ class Component_admin_viewsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_configModel.php b/admin/src/Model/Component_configModel.php index dfc03246b..63ee5bca1 100644 --- a/admin/src/Model/Component_configModel.php +++ b/admin/src/Model/Component_configModel.php @@ -199,7 +199,9 @@ class Component_configModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_custom_admin_menusModel.php b/admin/src/Model/Component_custom_admin_menusModel.php index af28cd2ee..1519a502b 100644 --- a/admin/src/Model/Component_custom_admin_menusModel.php +++ b/admin/src/Model/Component_custom_admin_menusModel.php @@ -199,7 +199,9 @@ class Component_custom_admin_menusModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_custom_admin_viewsModel.php b/admin/src/Model/Component_custom_admin_viewsModel.php index 451eedf1b..9bc44969e 100644 --- a/admin/src/Model/Component_custom_admin_viewsModel.php +++ b/admin/src/Model/Component_custom_admin_viewsModel.php @@ -200,7 +200,9 @@ class Component_custom_admin_viewsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_dashboardModel.php b/admin/src/Model/Component_dashboardModel.php index dc7e8af95..f2adec39b 100644 --- a/admin/src/Model/Component_dashboardModel.php +++ b/admin/src/Model/Component_dashboardModel.php @@ -167,8 +167,9 @@ class Component_dashboardModel extends AdminModel SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id); SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -245,8 +246,9 @@ class Component_dashboardModel extends AdminModel SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id); SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -297,7 +299,9 @@ class Component_dashboardModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_files_foldersModel.php b/admin/src/Model/Component_files_foldersModel.php index 5fde4d7d3..0685a06c8 100644 --- a/admin/src/Model/Component_files_foldersModel.php +++ b/admin/src/Model/Component_files_foldersModel.php @@ -234,7 +234,9 @@ class Component_files_foldersModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_modulesModel.php b/admin/src/Model/Component_modulesModel.php index e73d5b910..c2ec2a1b2 100644 --- a/admin/src/Model/Component_modulesModel.php +++ b/admin/src/Model/Component_modulesModel.php @@ -200,7 +200,9 @@ class Component_modulesModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_mysql_tweaksModel.php b/admin/src/Model/Component_mysql_tweaksModel.php index cb23e50e4..bbd5ec7c2 100644 --- a/admin/src/Model/Component_mysql_tweaksModel.php +++ b/admin/src/Model/Component_mysql_tweaksModel.php @@ -199,7 +199,9 @@ class Component_mysql_tweaksModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_placeholdersModel.php b/admin/src/Model/Component_placeholdersModel.php index 7b82a311d..f8ddaff82 100644 --- a/admin/src/Model/Component_placeholdersModel.php +++ b/admin/src/Model/Component_placeholdersModel.php @@ -199,7 +199,9 @@ class Component_placeholdersModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_pluginsModel.php b/admin/src/Model/Component_pluginsModel.php index d9f9c3ffc..f5b6fd930 100644 --- a/admin/src/Model/Component_pluginsModel.php +++ b/admin/src/Model/Component_pluginsModel.php @@ -200,7 +200,9 @@ class Component_pluginsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_routerModel.php b/admin/src/Model/Component_routerModel.php index c29b1954d..09b1a071f 100644 --- a/admin/src/Model/Component_routerModel.php +++ b/admin/src/Model/Component_routerModel.php @@ -168,8 +168,9 @@ class Component_routerModel extends AdminModel SessionHelper::set($this->vastDevMod, 'component_router__'.$id); SessionHelper::set('component_router__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -258,8 +259,9 @@ class Component_routerModel extends AdminModel SessionHelper::set($this->vastDevMod, 'component_router__'.$id); SessionHelper::set('component_router__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -310,7 +312,9 @@ class Component_routerModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_site_viewsModel.php b/admin/src/Model/Component_site_viewsModel.php index 5b234af3a..9ca375bb5 100644 --- a/admin/src/Model/Component_site_viewsModel.php +++ b/admin/src/Model/Component_site_viewsModel.php @@ -200,7 +200,9 @@ class Component_site_viewsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Component_updatesModel.php b/admin/src/Model/Component_updatesModel.php index 9b0dd5d05..e55b8ec4b 100644 --- a/admin/src/Model/Component_updatesModel.php +++ b/admin/src/Model/Component_updatesModel.php @@ -199,7 +199,9 @@ class Component_updatesModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Components_admin_viewsModel.php b/admin/src/Model/Components_admin_viewsModel.php index b66ea50ef..dca7ee972 100644 --- a/admin/src/Model/Components_admin_viewsModel.php +++ b/admin/src/Model/Components_admin_viewsModel.php @@ -108,20 +108,21 @@ class Components_admin_viewsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_admin_viewsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_admin_views')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_configModel.php b/admin/src/Model/Components_configModel.php index fe62bb952..12d6968d5 100644 --- a/admin/src/Model/Components_configModel.php +++ b/admin/src/Model/Components_configModel.php @@ -108,20 +108,21 @@ class Components_configModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_configModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_config')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_custom_admin_menusModel.php b/admin/src/Model/Components_custom_admin_menusModel.php index 6c23b9118..fb2aa5b6f 100644 --- a/admin/src/Model/Components_custom_admin_menusModel.php +++ b/admin/src/Model/Components_custom_admin_menusModel.php @@ -108,20 +108,21 @@ class Components_custom_admin_menusModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_custom_admin_menusModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_custom_admin_menus')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_custom_admin_viewsModel.php b/admin/src/Model/Components_custom_admin_viewsModel.php index f123da109..1c846104a 100644 --- a/admin/src/Model/Components_custom_admin_viewsModel.php +++ b/admin/src/Model/Components_custom_admin_viewsModel.php @@ -108,20 +108,21 @@ class Components_custom_admin_viewsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_custom_admin_viewsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_custom_admin_views')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_dashboardModel.php b/admin/src/Model/Components_dashboardModel.php index c8e589476..c5644be40 100644 --- a/admin/src/Model/Components_dashboardModel.php +++ b/admin/src/Model/Components_dashboardModel.php @@ -108,20 +108,21 @@ class Components_dashboardModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_dashboardModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_dashboard')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_files_foldersModel.php b/admin/src/Model/Components_files_foldersModel.php index dbcbf7677..d1eda21e3 100644 --- a/admin/src/Model/Components_files_foldersModel.php +++ b/admin/src/Model/Components_files_foldersModel.php @@ -108,20 +108,21 @@ class Components_files_foldersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_files_foldersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_files_folders')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_modulesModel.php b/admin/src/Model/Components_modulesModel.php index 4eeb280fc..bdee6ebfe 100644 --- a/admin/src/Model/Components_modulesModel.php +++ b/admin/src/Model/Components_modulesModel.php @@ -108,20 +108,21 @@ class Components_modulesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_modulesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_modules')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_mysql_tweaksModel.php b/admin/src/Model/Components_mysql_tweaksModel.php index 78f03d7b6..957db4a9f 100644 --- a/admin/src/Model/Components_mysql_tweaksModel.php +++ b/admin/src/Model/Components_mysql_tweaksModel.php @@ -108,20 +108,21 @@ class Components_mysql_tweaksModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_mysql_tweaksModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_mysql_tweaks')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_placeholdersModel.php b/admin/src/Model/Components_placeholdersModel.php index b982911fd..ca6e4876e 100644 --- a/admin/src/Model/Components_placeholdersModel.php +++ b/admin/src/Model/Components_placeholdersModel.php @@ -108,20 +108,21 @@ class Components_placeholdersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_placeholdersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_placeholders')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_pluginsModel.php b/admin/src/Model/Components_pluginsModel.php index c6cadca2d..04993e1db 100644 --- a/admin/src/Model/Components_pluginsModel.php +++ b/admin/src/Model/Components_pluginsModel.php @@ -108,20 +108,21 @@ class Components_pluginsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_pluginsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_plugins')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_routersModel.php b/admin/src/Model/Components_routersModel.php index b24122a82..7219d33a5 100644 --- a/admin/src/Model/Components_routersModel.php +++ b/admin/src/Model/Components_routersModel.php @@ -111,20 +111,21 @@ class Components_routersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -146,21 +147,21 @@ class Components_routersModel extends ListModel $mode_constructor_before_parent = $this->getUserStateFromRequest($this->context . '.filter.mode_constructor_before_parent', 'filter_mode_constructor_before_parent'); if ($formSubmited) { - $mode_constructor_before_parent = $app->input->post->get('mode_constructor_before_parent'); + $mode_constructor_before_parent = $input->post->get('mode_constructor_before_parent'); $this->setState('filter.mode_constructor_before_parent', $mode_constructor_before_parent); } $mode_constructor_after_parent = $this->getUserStateFromRequest($this->context . '.filter.mode_constructor_after_parent', 'filter_mode_constructor_after_parent'); if ($formSubmited) { - $mode_constructor_after_parent = $app->input->post->get('mode_constructor_after_parent'); + $mode_constructor_after_parent = $input->post->get('mode_constructor_after_parent'); $this->setState('filter.mode_constructor_after_parent', $mode_constructor_after_parent); } $mode_methods = $this->getUserStateFromRequest($this->context . '.filter.mode_methods', 'filter_mode_methods'); if ($formSubmited) { - $mode_methods = $app->input->post->get('mode_methods'); + $mode_methods = $input->post->get('mode_methods'); $this->setState('filter.mode_methods', $mode_methods); } @@ -495,6 +496,7 @@ class Components_routersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_router')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_site_viewsModel.php b/admin/src/Model/Components_site_viewsModel.php index dba2d0a52..9b3caa262 100644 --- a/admin/src/Model/Components_site_viewsModel.php +++ b/admin/src/Model/Components_site_viewsModel.php @@ -108,20 +108,21 @@ class Components_site_viewsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_site_viewsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_site_views')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Components_updatesModel.php b/admin/src/Model/Components_updatesModel.php index 5c47ace45..b1cbc7088 100644 --- a/admin/src/Model/Components_updatesModel.php +++ b/admin/src/Model/Components_updatesModel.php @@ -108,20 +108,21 @@ class Components_updatesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Components_updatesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_component_updates')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Custom_admin_viewModel.php b/admin/src/Model/Custom_admin_viewModel.php index 20c53edab..721f38274 100644 --- a/admin/src/Model/Custom_admin_viewModel.php +++ b/admin/src/Model/Custom_admin_viewModel.php @@ -225,8 +225,9 @@ class Custom_admin_viewModel extends AdminModel SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id); SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -393,8 +394,9 @@ class Custom_admin_viewModel extends AdminModel SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id); SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -466,7 +468,9 @@ class Custom_admin_viewModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Custom_admin_viewsModel.php b/admin/src/Model/Custom_admin_viewsModel.php index 3f8c2e623..f1c1e6c84 100644 --- a/admin/src/Model/Custom_admin_viewsModel.php +++ b/admin/src/Model/Custom_admin_viewsModel.php @@ -162,20 +162,21 @@ class Custom_admin_viewsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -197,42 +198,42 @@ class Custom_admin_viewsModel extends ListModel $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); if ($formSubmited) { - $add_php_ajax = $app->input->post->get('add_php_ajax'); + $add_php_ajax = $input->post->get('add_php_ajax'); $this->setState('filter.add_php_ajax', $add_php_ajax); } $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); if ($formSubmited) { - $add_custom_button = $app->input->post->get('add_custom_button'); + $add_custom_button = $input->post->get('add_custom_button'); $this->setState('filter.add_custom_button', $add_custom_button); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } $main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get'); if ($formSubmited) { - $main_get = $app->input->post->get('main_get'); + $main_get = $input->post->get('main_get'); $this->setState('filter.main_get', $main_get); } @@ -566,6 +567,7 @@ class Custom_admin_viewsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_custom_admin_view')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Custom_codeModel.php b/admin/src/Model/Custom_codeModel.php index 661ded6eb..7340af6dd 100644 --- a/admin/src/Model/Custom_codeModel.php +++ b/admin/src/Model/Custom_codeModel.php @@ -179,8 +179,9 @@ class Custom_codeModel extends AdminModel SessionHelper::set($this->vastDevMod, 'custom_code__'.$id); SessionHelper::set('custom_code__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -249,8 +250,9 @@ class Custom_codeModel extends AdminModel SessionHelper::set($this->vastDevMod, 'custom_code__'.$id); SessionHelper::set('custom_code__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -301,7 +303,9 @@ class Custom_codeModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Custom_codesModel.php b/admin/src/Model/Custom_codesModel.php index ab54bb018..5453cd8ba 100644 --- a/admin/src/Model/Custom_codesModel.php +++ b/admin/src/Model/Custom_codesModel.php @@ -113,20 +113,21 @@ class Custom_codesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -148,35 +149,35 @@ class Custom_codesModel extends ListModel $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); if ($formSubmited) { - $target = $app->input->post->get('target'); + $target = $input->post->get('target'); $this->setState('filter.target', $target); } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $comment_type = $this->getUserStateFromRequest($this->context . '.filter.comment_type', 'filter_comment_type'); if ($formSubmited) { - $comment_type = $app->input->post->get('comment_type'); + $comment_type = $input->post->get('comment_type'); $this->setState('filter.comment_type', $comment_type); } $path = $this->getUserStateFromRequest($this->context . '.filter.path', 'filter_path'); if ($formSubmited) { - $path = $app->input->post->get('path'); + $path = $input->post->get('path'); $this->setState('filter.path', $path); } $joomla_version = $this->getUserStateFromRequest($this->context . '.filter.joomla_version', 'filter_joomla_version'); if ($formSubmited) { - $joomla_version = $app->input->post->get('joomla_version'); + $joomla_version = $input->post->get('joomla_version'); $this->setState('filter.joomla_version', $joomla_version); } @@ -549,6 +550,7 @@ class Custom_codesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_custom_code')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Dynamic_getModel.php b/admin/src/Model/Dynamic_getModel.php index 928623be6..eedffff99 100644 --- a/admin/src/Model/Dynamic_getModel.php +++ b/admin/src/Model/Dynamic_getModel.php @@ -219,8 +219,9 @@ class Dynamic_getModel extends AdminModel SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id); SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -393,8 +394,9 @@ class Dynamic_getModel extends AdminModel SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id); SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -445,7 +447,9 @@ class Dynamic_getModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Dynamic_getsModel.php b/admin/src/Model/Dynamic_getsModel.php index 5ca690834..542d37988 100644 --- a/admin/src/Model/Dynamic_getsModel.php +++ b/admin/src/Model/Dynamic_getsModel.php @@ -150,20 +150,21 @@ class Dynamic_getsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -185,21 +186,21 @@ class Dynamic_getsModel extends ListModel $main_source = $this->getUserStateFromRequest($this->context . '.filter.main_source', 'filter_main_source'); if ($formSubmited) { - $main_source = $app->input->post->get('main_source'); + $main_source = $input->post->get('main_source'); $this->setState('filter.main_source', $main_source); } $gettype = $this->getUserStateFromRequest($this->context . '.filter.gettype', 'filter_gettype'); if ($formSubmited) { - $gettype = $app->input->post->get('gettype'); + $gettype = $input->post->get('gettype'); $this->setState('filter.gettype', $gettype); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } @@ -565,6 +566,7 @@ class Dynamic_getsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_dynamic_get')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/FieldModel.php b/admin/src/Model/FieldModel.php index 74e43feb2..1e1b23271 100644 --- a/admin/src/Model/FieldModel.php +++ b/admin/src/Model/FieldModel.php @@ -212,8 +212,9 @@ class FieldModel extends AdminModel SessionHelper::set($this->vastDevMod, 'field__'.$id); SessionHelper::set('field__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -330,8 +331,9 @@ class FieldModel extends AdminModel SessionHelper::set($this->vastDevMod, 'field__'.$id); SessionHelper::set('field__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -382,7 +384,9 @@ class FieldModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/FieldsModel.php b/admin/src/Model/FieldsModel.php index 76a436baf..2049f49bc 100644 --- a/admin/src/Model/FieldsModel.php +++ b/admin/src/Model/FieldsModel.php @@ -177,20 +177,21 @@ class FieldsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -212,35 +213,35 @@ class FieldsModel extends ListModel $fieldtype = $this->getUserStateFromRequest($this->context . '.filter.fieldtype', 'filter_fieldtype'); if ($formSubmited) { - $fieldtype = $app->input->post->get('fieldtype'); + $fieldtype = $input->post->get('fieldtype'); $this->setState('filter.fieldtype', $fieldtype); } $datatype = $this->getUserStateFromRequest($this->context . '.filter.datatype', 'filter_datatype'); if ($formSubmited) { - $datatype = $app->input->post->get('datatype'); + $datatype = $input->post->get('datatype'); $this->setState('filter.datatype', $datatype); } $indexes = $this->getUserStateFromRequest($this->context . '.filter.indexes', 'filter_indexes'); if ($formSubmited) { - $indexes = $app->input->post->get('indexes'); + $indexes = $input->post->get('indexes'); $this->setState('filter.indexes', $indexes); } $null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch'); if ($formSubmited) { - $null_switch = $app->input->post->get('null_switch'); + $null_switch = $input->post->get('null_switch'); $this->setState('filter.null_switch', $null_switch); } $store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store'); if ($formSubmited) { - $store = $app->input->post->get('store'); + $store = $input->post->get('store'); $this->setState('filter.store', $store); } @@ -253,14 +254,14 @@ class FieldsModel extends ListModel $catid = $this->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); if ($formSubmited) { - $catid = $app->input->post->get('catid'); + $catid = $input->post->get('catid'); $this->setState('filter.catid', $catid); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } @@ -784,6 +785,7 @@ class FieldsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_field')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/FieldtypeModel.php b/admin/src/Model/FieldtypeModel.php index a94f9503a..ba98c9a09 100644 --- a/admin/src/Model/FieldtypeModel.php +++ b/admin/src/Model/FieldtypeModel.php @@ -186,8 +186,9 @@ class FieldtypeModel extends AdminModel SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id); SessionHelper::set('fieldtype__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -258,8 +259,9 @@ class FieldtypeModel extends AdminModel SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id); SessionHelper::set('fieldtype__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -329,7 +331,9 @@ class FieldtypeModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/FieldtypesModel.php b/admin/src/Model/FieldtypesModel.php index d12b36d60..4f31b94cd 100644 --- a/admin/src/Model/FieldtypesModel.php +++ b/admin/src/Model/FieldtypesModel.php @@ -113,20 +113,21 @@ class FieldtypesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -154,21 +155,21 @@ class FieldtypesModel extends ListModel $catid = $this->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); if ($formSubmited) { - $catid = $app->input->post->get('catid'); + $catid = $input->post->get('catid'); $this->setState('filter.catid', $catid); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); if ($formSubmited) { - $short_description = $app->input->post->get('short_description'); + $short_description = $input->post->get('short_description'); $this->setState('filter.short_description', $short_description); } @@ -456,6 +457,7 @@ class FieldtypesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_fieldtype')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Help_documentModel.php b/admin/src/Model/Help_documentModel.php index 5e975e6f8..6e3a11a4a 100644 --- a/admin/src/Model/Help_documentModel.php +++ b/admin/src/Model/Help_documentModel.php @@ -205,7 +205,9 @@ class Help_documentModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Help_documentsModel.php b/admin/src/Model/Help_documentsModel.php index 48bff2130..d3f0967ee 100644 --- a/admin/src/Model/Help_documentsModel.php +++ b/admin/src/Model/Help_documentsModel.php @@ -112,20 +112,21 @@ class Help_documentsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -147,35 +148,35 @@ class Help_documentsModel extends ListModel $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $location = $this->getUserStateFromRequest($this->context . '.filter.location', 'filter_location'); if ($formSubmited) { - $location = $app->input->post->get('location'); + $location = $input->post->get('location'); $this->setState('filter.location', $location); } $admin_view = $this->getUserStateFromRequest($this->context . '.filter.admin_view', 'filter_admin_view'); if ($formSubmited) { - $admin_view = $app->input->post->get('admin_view'); + $admin_view = $input->post->get('admin_view'); $this->setState('filter.admin_view', $admin_view); } $site_view = $this->getUserStateFromRequest($this->context . '.filter.site_view', 'filter_site_view'); if ($formSubmited) { - $site_view = $app->input->post->get('site_view'); + $site_view = $input->post->get('site_view'); $this->setState('filter.site_view', $site_view); } $title = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title'); if ($formSubmited) { - $title = $app->input->post->get('title'); + $title = $input->post->get('title'); $this->setState('filter.title', $title); } @@ -501,6 +502,7 @@ class Help_documentsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_help_document')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Import_joomla_componentsimportModel.php b/admin/src/Model/Import_joomla_componentsimportModel.php index fd306b8df..705316868 100644 --- a/admin/src/Model/Import_joomla_componentsimportModel.php +++ b/admin/src/Model/Import_joomla_componentsimportModel.php @@ -391,7 +391,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel { // Get the uploaded file information $app = Factory::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); @@ -451,7 +451,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel protected function _getPackageFromFolder() { $app = Factory::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); @@ -496,7 +496,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel protected function _getPackageFromUrl() { $app = Factory::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the URL of the package to import $url = $input->getString('import_url'); diff --git a/admin/src/Model/Import_language_translationsimportModel.php b/admin/src/Model/Import_language_translationsimportModel.php index 6358cd448..210943090 100644 --- a/admin/src/Model/Import_language_translationsimportModel.php +++ b/admin/src/Model/Import_language_translationsimportModel.php @@ -203,7 +203,7 @@ class Import_language_translationsimportModel extends BaseDatabaseModel { // Get the uploaded file information $app = Factory::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); @@ -263,7 +263,7 @@ class Import_language_translationsimportModel extends BaseDatabaseModel protected function _getPackageFromFolder() { $app = Factory::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); @@ -308,7 +308,7 @@ class Import_language_translationsimportModel extends BaseDatabaseModel protected function _getPackageFromUrl() { $app = Factory::getApplication(); - $input = $app->input; + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // Get the URL of the package to import $url = $input->getString('import_url'); diff --git a/admin/src/Model/Joomla_componentModel.php b/admin/src/Model/Joomla_componentModel.php index 6c4df7323..9bf7a56de 100644 --- a/admin/src/Model/Joomla_componentModel.php +++ b/admin/src/Model/Joomla_componentModel.php @@ -339,8 +339,9 @@ class Joomla_componentModel extends AdminModel SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id); SessionHelper::set('joomla_component__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -543,8 +544,9 @@ class Joomla_componentModel extends AdminModel SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id); SessionHelper::set('joomla_component__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -595,7 +597,9 @@ class Joomla_componentModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_componentsModel.php b/admin/src/Model/Joomla_componentsModel.php index 79a729871..497618bb2 100644 --- a/admin/src/Model/Joomla_componentsModel.php +++ b/admin/src/Model/Joomla_componentsModel.php @@ -119,20 +119,21 @@ class Joomla_componentsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -151,49 +152,49 @@ class Joomla_componentsModel extends ListModel $companyname = $this->getUserStateFromRequest($this->context . '.filter.companyname', 'filter_companyname'); if ($formSubmited) { - $companyname = $app->input->post->get('companyname'); + $companyname = $input->post->get('companyname'); $this->setState('filter.companyname', $companyname); } $author = $this->getUserStateFromRequest($this->context . '.filter.author', 'filter_author'); if ($formSubmited) { - $author = $app->input->post->get('author'); + $author = $input->post->get('author'); $this->setState('filter.author', $author); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } $name_code = $this->getUserStateFromRequest($this->context . '.filter.name_code', 'filter_name_code'); if ($formSubmited) { - $name_code = $app->input->post->get('name_code'); + $name_code = $input->post->get('name_code'); $this->setState('filter.name_code', $name_code); } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); if ($formSubmited) { - $short_description = $app->input->post->get('short_description'); + $short_description = $input->post->get('short_description'); $this->setState('filter.short_description', $short_description); } $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); if ($formSubmited) { - $created = $app->input->post->get('created'); + $created = $input->post->get('created'); $this->setState('filter.created', $created); } $modified = $this->getUserStateFromRequest($this->context . '.filter.modified', 'filter_modified'); if ($formSubmited) { - $modified = $app->input->post->get('modified'); + $modified = $input->post->get('modified'); $this->setState('filter.modified', $modified); } @@ -706,6 +707,7 @@ class Joomla_componentsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_component')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_moduleModel.php b/admin/src/Model/Joomla_moduleModel.php index cd463d5a0..73466c185 100644 --- a/admin/src/Model/Joomla_moduleModel.php +++ b/admin/src/Model/Joomla_moduleModel.php @@ -252,8 +252,9 @@ class Joomla_moduleModel extends AdminModel SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id); SessionHelper::set('joomla_module__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -436,8 +437,9 @@ class Joomla_moduleModel extends AdminModel SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id); SessionHelper::set('joomla_module__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -488,7 +490,9 @@ class Joomla_moduleModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_module_files_folders_urlsModel.php b/admin/src/Model/Joomla_module_files_folders_urlsModel.php index 579999c24..df1729dfb 100644 --- a/admin/src/Model/Joomla_module_files_folders_urlsModel.php +++ b/admin/src/Model/Joomla_module_files_folders_urlsModel.php @@ -237,7 +237,9 @@ class Joomla_module_files_folders_urlsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_module_updatesModel.php b/admin/src/Model/Joomla_module_updatesModel.php index 093e6e33e..862b35683 100644 --- a/admin/src/Model/Joomla_module_updatesModel.php +++ b/admin/src/Model/Joomla_module_updatesModel.php @@ -191,7 +191,9 @@ class Joomla_module_updatesModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_modulesModel.php b/admin/src/Model/Joomla_modulesModel.php index 7180ff5c9..dd091c180 100644 --- a/admin/src/Model/Joomla_modulesModel.php +++ b/admin/src/Model/Joomla_modulesModel.php @@ -111,20 +111,21 @@ class Joomla_modulesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -146,21 +147,21 @@ class Joomla_modulesModel extends ListModel $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); if ($formSubmited) { - $target = $app->input->post->get('target'); + $target = $input->post->get('target'); $this->setState('filter.target', $target); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } @@ -440,6 +441,7 @@ class Joomla_modulesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_module')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_modules_files_folders_urlsModel.php b/admin/src/Model/Joomla_modules_files_folders_urlsModel.php index 404f5fd99..943392ede 100644 --- a/admin/src/Model/Joomla_modules_files_folders_urlsModel.php +++ b/admin/src/Model/Joomla_modules_files_folders_urlsModel.php @@ -108,20 +108,21 @@ class Joomla_modules_files_folders_urlsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Joomla_modules_files_folders_urlsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_module_files_folders_urls')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_modules_updatesModel.php b/admin/src/Model/Joomla_modules_updatesModel.php index 569fa8c1b..d84873d08 100644 --- a/admin/src/Model/Joomla_modules_updatesModel.php +++ b/admin/src/Model/Joomla_modules_updatesModel.php @@ -108,20 +108,21 @@ class Joomla_modules_updatesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Joomla_modules_updatesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_module_updates')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_pluginModel.php b/admin/src/Model/Joomla_pluginModel.php index 20f3dd531..fb938bf96 100644 --- a/admin/src/Model/Joomla_pluginModel.php +++ b/admin/src/Model/Joomla_pluginModel.php @@ -227,8 +227,9 @@ class Joomla_pluginModel extends AdminModel SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id); SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -387,8 +388,9 @@ class Joomla_pluginModel extends AdminModel SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id); SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -439,7 +441,9 @@ class Joomla_pluginModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_plugin_files_folders_urlsModel.php b/admin/src/Model/Joomla_plugin_files_folders_urlsModel.php index 57e262646..4b81719b5 100644 --- a/admin/src/Model/Joomla_plugin_files_folders_urlsModel.php +++ b/admin/src/Model/Joomla_plugin_files_folders_urlsModel.php @@ -237,7 +237,9 @@ class Joomla_plugin_files_folders_urlsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_plugin_groupModel.php b/admin/src/Model/Joomla_plugin_groupModel.php index 473e744e7..689312d18 100644 --- a/admin/src/Model/Joomla_plugin_groupModel.php +++ b/admin/src/Model/Joomla_plugin_groupModel.php @@ -186,7 +186,9 @@ class Joomla_plugin_groupModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_plugin_groupsModel.php b/admin/src/Model/Joomla_plugin_groupsModel.php index f6564b3fd..bca085785 100644 --- a/admin/src/Model/Joomla_plugin_groupsModel.php +++ b/admin/src/Model/Joomla_plugin_groupsModel.php @@ -109,20 +109,21 @@ class Joomla_plugin_groupsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -144,14 +145,14 @@ class Joomla_plugin_groupsModel extends ListModel $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); if ($formSubmited) { - $class_extends = $app->input->post->get('class_extends'); + $class_extends = $input->post->get('class_extends'); $this->setState('filter.class_extends', $class_extends); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } @@ -379,6 +380,7 @@ class Joomla_plugin_groupsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_plugin_group')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_plugin_updatesModel.php b/admin/src/Model/Joomla_plugin_updatesModel.php index d9c2e4989..6d5890b42 100644 --- a/admin/src/Model/Joomla_plugin_updatesModel.php +++ b/admin/src/Model/Joomla_plugin_updatesModel.php @@ -191,7 +191,9 @@ class Joomla_plugin_updatesModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_pluginsModel.php b/admin/src/Model/Joomla_pluginsModel.php index 70cf371b5..6709ee2c5 100644 --- a/admin/src/Model/Joomla_pluginsModel.php +++ b/admin/src/Model/Joomla_pluginsModel.php @@ -111,20 +111,21 @@ class Joomla_pluginsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -146,21 +147,21 @@ class Joomla_pluginsModel extends ListModel $class_extends = $this->getUserStateFromRequest($this->context . '.filter.class_extends', 'filter_class_extends'); if ($formSubmited) { - $class_extends = $app->input->post->get('class_extends'); + $class_extends = $input->post->get('class_extends'); $this->setState('filter.class_extends', $class_extends); } $joomla_plugin_group = $this->getUserStateFromRequest($this->context . '.filter.joomla_plugin_group', 'filter_joomla_plugin_group'); if ($formSubmited) { - $joomla_plugin_group = $app->input->post->get('joomla_plugin_group'); + $joomla_plugin_group = $input->post->get('joomla_plugin_group'); $this->setState('filter.joomla_plugin_group', $joomla_plugin_group); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } @@ -431,6 +432,7 @@ class Joomla_pluginsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_plugin')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_plugins_files_folders_urlsModel.php b/admin/src/Model/Joomla_plugins_files_folders_urlsModel.php index e37dc30e3..79dbe54f0 100644 --- a/admin/src/Model/Joomla_plugins_files_folders_urlsModel.php +++ b/admin/src/Model/Joomla_plugins_files_folders_urlsModel.php @@ -108,20 +108,21 @@ class Joomla_plugins_files_folders_urlsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Joomla_plugins_files_folders_urlsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_plugins_updatesModel.php b/admin/src/Model/Joomla_plugins_updatesModel.php index db4817687..a3768db48 100644 --- a/admin/src/Model/Joomla_plugins_updatesModel.php +++ b/admin/src/Model/Joomla_plugins_updatesModel.php @@ -108,20 +108,21 @@ class Joomla_plugins_updatesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Joomla_plugins_updatesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_plugin_updates')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Joomla_powerModel.php b/admin/src/Model/Joomla_powerModel.php index 6e7bea044..186402ccb 100644 --- a/admin/src/Model/Joomla_powerModel.php +++ b/admin/src/Model/Joomla_powerModel.php @@ -194,7 +194,9 @@ class Joomla_powerModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Joomla_powersModel.php b/admin/src/Model/Joomla_powersModel.php index c999aca0f..7f6382182 100644 --- a/admin/src/Model/Joomla_powersModel.php +++ b/admin/src/Model/Joomla_powersModel.php @@ -109,20 +109,21 @@ class Joomla_powersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -144,7 +145,7 @@ class Joomla_powersModel extends ListModel $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } @@ -373,6 +374,7 @@ class Joomla_powersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_joomla_power')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/LanguageModel.php b/admin/src/Model/LanguageModel.php index e3e37fd19..38b27eaf3 100644 --- a/admin/src/Model/LanguageModel.php +++ b/admin/src/Model/LanguageModel.php @@ -183,7 +183,9 @@ class LanguageModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Language_translationModel.php b/admin/src/Model/Language_translationModel.php index 7e25f9ea0..95d0a5b32 100644 --- a/admin/src/Model/Language_translationModel.php +++ b/admin/src/Model/Language_translationModel.php @@ -216,7 +216,9 @@ class Language_translationModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Language_translationsModel.php b/admin/src/Model/Language_translationsModel.php index 3e68fd568..3d7f5cc6d 100644 --- a/admin/src/Model/Language_translationsModel.php +++ b/admin/src/Model/Language_translationsModel.php @@ -199,20 +199,21 @@ class Language_translationsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -234,7 +235,7 @@ class Language_translationsModel extends ListModel $source = $this->getUserStateFromRequest($this->context . '.filter.source', 'filter_source'); if ($formSubmited) { - $source = $app->input->post->get('source'); + $source = $input->post->get('source'); $this->setState('filter.source', $source); } @@ -683,6 +684,7 @@ class Language_translationsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_language_translation')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/LanguagesModel.php b/admin/src/Model/LanguagesModel.php index 5f30e6fff..e58253913 100644 --- a/admin/src/Model/LanguagesModel.php +++ b/admin/src/Model/LanguagesModel.php @@ -235,20 +235,21 @@ class LanguagesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -270,14 +271,14 @@ class LanguagesModel extends ListModel $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $langtag = $this->getUserStateFromRequest($this->context . '.filter.langtag', 'filter_langtag'); if ($formSubmited) { - $langtag = $app->input->post->get('langtag'); + $langtag = $input->post->get('langtag'); $this->setState('filter.langtag', $langtag); } @@ -505,6 +506,7 @@ class LanguagesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_language')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/LayoutModel.php b/admin/src/Model/LayoutModel.php index abc774285..2c4c688b9 100644 --- a/admin/src/Model/LayoutModel.php +++ b/admin/src/Model/LayoutModel.php @@ -182,8 +182,9 @@ class LayoutModel extends AdminModel SessionHelper::set($this->vastDevMod, 'layout__'.$id); SessionHelper::set('layout__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -266,8 +267,9 @@ class LayoutModel extends AdminModel SessionHelper::set($this->vastDevMod, 'layout__'.$id); SessionHelper::set('layout__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -318,7 +320,9 @@ class LayoutModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/LayoutsModel.php b/admin/src/Model/LayoutsModel.php index 4548b79f8..7050780cd 100644 --- a/admin/src/Model/LayoutsModel.php +++ b/admin/src/Model/LayoutsModel.php @@ -112,20 +112,21 @@ class LayoutsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -147,28 +148,28 @@ class LayoutsModel extends ListModel $dynamic_get = $this->getUserStateFromRequest($this->context . '.filter.dynamic_get', 'filter_dynamic_get'); if ($formSubmited) { - $dynamic_get = $app->input->post->get('dynamic_get'); + $dynamic_get = $input->post->get('dynamic_get'); $this->setState('filter.dynamic_get', $dynamic_get); } $add_php_view = $this->getUserStateFromRequest($this->context . '.filter.add_php_view', 'filter_add_php_view'); if ($formSubmited) { - $add_php_view = $app->input->post->get('add_php_view'); + $add_php_view = $input->post->get('add_php_view'); $this->setState('filter.add_php_view', $add_php_view); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } @@ -470,6 +471,7 @@ class LayoutsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_layout')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/LibrariesModel.php b/admin/src/Model/LibrariesModel.php index 30f58eed4..db0c89348 100644 --- a/admin/src/Model/LibrariesModel.php +++ b/admin/src/Model/LibrariesModel.php @@ -113,20 +113,21 @@ class LibrariesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -148,35 +149,35 @@ class LibrariesModel extends ListModel $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); if ($formSubmited) { - $target = $app->input->post->get('target'); + $target = $input->post->get('target'); $this->setState('filter.target', $target); } $how = $this->getUserStateFromRequest($this->context . '.filter.how', 'filter_how'); if ($formSubmited) { - $how = $app->input->post->get('how'); + $how = $input->post->get('how'); $this->setState('filter.how', $how); } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } @@ -507,6 +508,7 @@ class LibrariesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_library')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Libraries_configModel.php b/admin/src/Model/Libraries_configModel.php index c97711233..6e696c5ea 100644 --- a/admin/src/Model/Libraries_configModel.php +++ b/admin/src/Model/Libraries_configModel.php @@ -108,20 +108,21 @@ class Libraries_configModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Libraries_configModel extends ListModel $query->from($db->quoteName('#__componentbuilder_library_config')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Libraries_files_folders_urlsModel.php b/admin/src/Model/Libraries_files_folders_urlsModel.php index 79918181d..05082e83c 100644 --- a/admin/src/Model/Libraries_files_folders_urlsModel.php +++ b/admin/src/Model/Libraries_files_folders_urlsModel.php @@ -108,20 +108,21 @@ class Libraries_files_folders_urlsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -351,6 +352,7 @@ class Libraries_files_folders_urlsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_library_files_folders_urls')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/LibraryModel.php b/admin/src/Model/LibraryModel.php index e0f26d5a1..13da27d9a 100644 --- a/admin/src/Model/LibraryModel.php +++ b/admin/src/Model/LibraryModel.php @@ -198,8 +198,9 @@ class LibraryModel extends AdminModel SessionHelper::set($this->vastDevMod, 'library__'.$id); SessionHelper::set('library__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -284,8 +285,9 @@ class LibraryModel extends AdminModel SessionHelper::set($this->vastDevMod, 'library__'.$id); SessionHelper::set('library__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -336,7 +338,9 @@ class LibraryModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Library_configModel.php b/admin/src/Model/Library_configModel.php index c06b22966..882b8bfd8 100644 --- a/admin/src/Model/Library_configModel.php +++ b/admin/src/Model/Library_configModel.php @@ -191,7 +191,9 @@ class Library_configModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Library_files_folders_urlsModel.php b/admin/src/Model/Library_files_folders_urlsModel.php index 047bf6d63..09f33f7ec 100644 --- a/admin/src/Model/Library_files_folders_urlsModel.php +++ b/admin/src/Model/Library_files_folders_urlsModel.php @@ -237,7 +237,9 @@ class Library_files_folders_urlsModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/PlaceholderModel.php b/admin/src/Model/PlaceholderModel.php index 5efefa4c6..fbc027378 100644 --- a/admin/src/Model/PlaceholderModel.php +++ b/admin/src/Model/PlaceholderModel.php @@ -161,8 +161,9 @@ class PlaceholderModel extends AdminModel SessionHelper::set($this->vastDevMod, 'placeholder__'.$id); SessionHelper::set('placeholder__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -231,8 +232,9 @@ class PlaceholderModel extends AdminModel SessionHelper::set($this->vastDevMod, 'placeholder__'.$id); SessionHelper::set('placeholder__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -283,7 +285,9 @@ class PlaceholderModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/PlaceholdersModel.php b/admin/src/Model/PlaceholdersModel.php index 9ff22a1f7..ec99347c2 100644 --- a/admin/src/Model/PlaceholdersModel.php +++ b/admin/src/Model/PlaceholdersModel.php @@ -110,20 +110,21 @@ class PlaceholdersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -145,14 +146,14 @@ class PlaceholdersModel extends ListModel $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); if ($formSubmited) { - $target = $app->input->post->get('target'); + $target = $input->post->get('target'); $this->setState('filter.target', $target); } $value = $this->getUserStateFromRequest($this->context . '.filter.value', 'filter_value'); if ($formSubmited) { - $value = $app->input->post->get('value'); + $value = $input->post->get('value'); $this->setState('filter.value', $value); } @@ -382,6 +383,7 @@ class PlaceholdersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_placeholder')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/PowerModel.php b/admin/src/Model/PowerModel.php index 110719efb..f767ae28b 100644 --- a/admin/src/Model/PowerModel.php +++ b/admin/src/Model/PowerModel.php @@ -207,8 +207,9 @@ class PowerModel extends AdminModel SessionHelper::set($this->vastDevMod, 'power__'.$id); SessionHelper::set('power__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -351,8 +352,9 @@ class PowerModel extends AdminModel SessionHelper::set($this->vastDevMod, 'power__'.$id); SessionHelper::set('power__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -403,7 +405,9 @@ class PowerModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -1153,7 +1157,7 @@ class PowerModel extends AdminModel { // does not exist so we allow save2copy $data['id'] = 0; - Factory::getApplication()->input->set('task', 'save2copy'); + Factory::getApplication()->getInput()->set('task', 'save2copy'); } } diff --git a/admin/src/Model/PowersModel.php b/admin/src/Model/PowersModel.php index 02365633e..16b59738d 100644 --- a/admin/src/Model/PowersModel.php +++ b/admin/src/Model/PowersModel.php @@ -202,20 +202,21 @@ class PowersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -237,35 +238,35 @@ class PowersModel extends ListModel $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $approved = $this->getUserStateFromRequest($this->context . '.filter.approved', 'filter_approved'); if ($formSubmited) { - $approved = $app->input->post->get('approved'); + $approved = $input->post->get('approved'); $this->setState('filter.approved', $approved); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } $namespace = $this->getUserStateFromRequest($this->context . '.filter.namespace', 'filter_namespace'); if ($formSubmited) { - $namespace = $app->input->post->get('namespace'); + $namespace = $input->post->get('namespace'); $this->setState('filter.namespace', $namespace); } $power_version = $this->getUserStateFromRequest($this->context . '.filter.power_version', 'filter_power_version'); if ($formSubmited) { - $power_version = $app->input->post->get('power_version'); + $power_version = $input->post->get('power_version'); $this->setState('filter.power_version', $power_version); } @@ -661,6 +662,7 @@ class PowersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_power')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/RepositoriesModel.php b/admin/src/Model/RepositoriesModel.php index 012cf3efb..269720991 100644 --- a/admin/src/Model/RepositoriesModel.php +++ b/admin/src/Model/RepositoriesModel.php @@ -157,20 +157,21 @@ class RepositoriesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -192,35 +193,35 @@ class RepositoriesModel extends ListModel $organisation = $this->getUserStateFromRequest($this->context . '.filter.organisation', 'filter_organisation'); if ($formSubmited) { - $organisation = $app->input->post->get('organisation'); + $organisation = $input->post->get('organisation'); $this->setState('filter.organisation', $organisation); } $repository = $this->getUserStateFromRequest($this->context . '.filter.repository', 'filter_repository'); if ($formSubmited) { - $repository = $app->input->post->get('repository'); + $repository = $input->post->get('repository'); $this->setState('filter.repository', $repository); } $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target'); if ($formSubmited) { - $target = $app->input->post->get('target'); + $target = $input->post->get('target'); $this->setState('filter.target', $target); } $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $base = $this->getUserStateFromRequest($this->context . '.filter.base', 'filter_base'); if ($formSubmited) { - $base = $app->input->post->get('base'); + $base = $input->post->get('base'); $this->setState('filter.base', $base); } @@ -636,6 +637,7 @@ class RepositoriesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_repository')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/RepositoryModel.php b/admin/src/Model/RepositoryModel.php index 6fa5d15e5..e3820725e 100644 --- a/admin/src/Model/RepositoryModel.php +++ b/admin/src/Model/RepositoryModel.php @@ -212,7 +212,9 @@ class RepositoryModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/ServerModel.php b/admin/src/Model/ServerModel.php index e89776ecd..6af20379b 100644 --- a/admin/src/Model/ServerModel.php +++ b/admin/src/Model/ServerModel.php @@ -260,7 +260,9 @@ class ServerModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/ServersModel.php b/admin/src/Model/ServersModel.php index d9b01ffa9..040b63111 100644 --- a/admin/src/Model/ServersModel.php +++ b/admin/src/Model/ServersModel.php @@ -110,20 +110,21 @@ class ServersModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -145,14 +146,14 @@ class ServersModel extends ListModel $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $protocol = $this->getUserStateFromRequest($this->context . '.filter.protocol', 'filter_protocol'); if ($formSubmited) { - $protocol = $app->input->post->get('protocol'); + $protocol = $input->post->get('protocol'); $this->setState('filter.protocol', $protocol); } @@ -449,6 +450,7 @@ class ServersModel extends ListModel $query->from($db->quoteName('#__componentbuilder_server')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Site_viewModel.php b/admin/src/Model/Site_viewModel.php index c95781c07..fc808c0fe 100644 --- a/admin/src/Model/Site_viewModel.php +++ b/admin/src/Model/Site_viewModel.php @@ -228,8 +228,9 @@ class Site_viewModel extends AdminModel SessionHelper::set($this->vastDevMod, 'site_view__'.$id); SessionHelper::set('site_view__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -396,8 +397,9 @@ class Site_viewModel extends AdminModel SessionHelper::set($this->vastDevMod, 'site_view__'.$id); SessionHelper::set('site_view__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -487,7 +489,9 @@ class Site_viewModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Site_viewsModel.php b/admin/src/Model/Site_viewsModel.php index 94cffa12c..666c4cd11 100644 --- a/admin/src/Model/Site_viewsModel.php +++ b/admin/src/Model/Site_viewsModel.php @@ -163,20 +163,21 @@ class Site_viewsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -198,49 +199,49 @@ class Site_viewsModel extends ListModel $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); if ($formSubmited) { - $add_php_ajax = $app->input->post->get('add_php_ajax'); + $add_php_ajax = $input->post->get('add_php_ajax'); $this->setState('filter.add_php_ajax', $add_php_ajax); } $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); if ($formSubmited) { - $add_custom_button = $app->input->post->get('add_custom_button'); + $add_custom_button = $input->post->get('add_custom_button'); $this->setState('filter.add_custom_button', $add_custom_button); } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); if ($formSubmited) { - $system_name = $app->input->post->get('system_name'); + $system_name = $input->post->get('system_name'); $this->setState('filter.system_name', $system_name); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } $main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get'); if ($formSubmited) { - $main_get = $app->input->post->get('main_get'); + $main_get = $input->post->get('main_get'); $this->setState('filter.main_get', $main_get); } $context = $this->getUserStateFromRequest($this->context . '.filter.context', 'filter_context'); if ($formSubmited) { - $context = $app->input->post->get('context'); + $context = $input->post->get('context'); $this->setState('filter.context', $context); } @@ -575,6 +576,7 @@ class Site_viewsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_site_view')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/SnippetModel.php b/admin/src/Model/SnippetModel.php index f037b827b..a467a9c91 100644 --- a/admin/src/Model/SnippetModel.php +++ b/admin/src/Model/SnippetModel.php @@ -213,7 +213,9 @@ class SnippetModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Snippet_typeModel.php b/admin/src/Model/Snippet_typeModel.php index ee29617a5..60d9c0002 100644 --- a/admin/src/Model/Snippet_typeModel.php +++ b/admin/src/Model/Snippet_typeModel.php @@ -185,7 +185,9 @@ class Snippet_typeModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Snippet_typesModel.php b/admin/src/Model/Snippet_typesModel.php index 8925cefbf..b9537990e 100644 --- a/admin/src/Model/Snippet_typesModel.php +++ b/admin/src/Model/Snippet_typesModel.php @@ -110,20 +110,21 @@ class Snippet_typesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -145,14 +146,14 @@ class Snippet_typesModel extends ListModel $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } @@ -380,6 +381,7 @@ class Snippet_typesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_snippet_type')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/SnippetsModel.php b/admin/src/Model/SnippetsModel.php index a25ca4a4d..eee39696c 100644 --- a/admin/src/Model/SnippetsModel.php +++ b/admin/src/Model/SnippetsModel.php @@ -113,20 +113,21 @@ class SnippetsModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -148,35 +149,35 @@ class SnippetsModel extends ListModel $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); if ($formSubmited) { - $type = $app->input->post->get('type'); + $type = $input->post->get('type'); $this->setState('filter.type', $type); } $library = $this->getUserStateFromRequest($this->context . '.filter.library', 'filter_library'); if ($formSubmited) { - $library = $app->input->post->get('library'); + $library = $input->post->get('library'); $this->setState('filter.library', $library); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $url = $this->getUserStateFromRequest($this->context . '.filter.url', 'filter_url'); if ($formSubmited) { - $url = $app->input->post->get('url'); + $url = $input->post->get('url'); $this->setState('filter.url', $url); } $heading = $this->getUserStateFromRequest($this->context . '.filter.heading', 'filter_heading'); if ($formSubmited) { - $heading = $app->input->post->get('heading'); + $heading = $input->post->get('heading'); $this->setState('filter.heading', $heading); } @@ -449,6 +450,7 @@ class SnippetsModel extends ListModel $query->from($db->quoteName('#__componentbuilder_snippet')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/TemplateModel.php b/admin/src/Model/TemplateModel.php index ac0564276..62d0c32f4 100644 --- a/admin/src/Model/TemplateModel.php +++ b/admin/src/Model/TemplateModel.php @@ -182,8 +182,9 @@ class TemplateModel extends AdminModel SessionHelper::set($this->vastDevMod, 'template__'.$id); SessionHelper::set('template__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -266,8 +267,9 @@ class TemplateModel extends AdminModel SessionHelper::set($this->vastDevMod, 'template__'.$id); SessionHelper::set('template__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -318,7 +320,9 @@ class TemplateModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/TemplatesModel.php b/admin/src/Model/TemplatesModel.php index b292ea01e..fcef428f8 100644 --- a/admin/src/Model/TemplatesModel.php +++ b/admin/src/Model/TemplatesModel.php @@ -112,20 +112,21 @@ class TemplatesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -147,28 +148,28 @@ class TemplatesModel extends ListModel $dynamic_get = $this->getUserStateFromRequest($this->context . '.filter.dynamic_get', 'filter_dynamic_get'); if ($formSubmited) { - $dynamic_get = $app->input->post->get('dynamic_get'); + $dynamic_get = $input->post->get('dynamic_get'); $this->setState('filter.dynamic_get', $dynamic_get); } $add_php_view = $this->getUserStateFromRequest($this->context . '.filter.add_php_view', 'filter_add_php_view'); if ($formSubmited) { - $add_php_view = $app->input->post->get('add_php_view'); + $add_php_view = $input->post->get('add_php_view'); $this->setState('filter.add_php_view', $add_php_view); } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); if ($formSubmited) { - $description = $app->input->post->get('description'); + $description = $input->post->get('description'); $this->setState('filter.description', $description); } @@ -470,6 +471,7 @@ class TemplatesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_template')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Model/Validation_ruleModel.php b/admin/src/Model/Validation_ruleModel.php index e3a81ecfd..db6fd13fb 100644 --- a/admin/src/Model/Validation_ruleModel.php +++ b/admin/src/Model/Validation_ruleModel.php @@ -164,8 +164,9 @@ class Validation_ruleModel extends AdminModel SessionHelper::set($this->vastDevMod, 'validation_rule__'.$id); SessionHelper::set('validation_rule__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -234,8 +235,9 @@ class Validation_ruleModel extends AdminModel SessionHelper::set($this->vastDevMod, 'validation_rule__'.$id); SessionHelper::set('validation_rule__'.$id, $this->vastDevMod); // set a return value if found - $jinput = Factory::getApplication()->input; - $return = $jinput->get('return', null, 'base64'); + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; + $return = $input->get('return', null, 'base64'); SessionHelper::set($this->vastDevMod . '__return', $return); // set a GUID value if found if (isset($item) && ObjectHelper::check($item) && isset($item->guid) @@ -286,7 +288,9 @@ class Validation_ruleModel extends AdminModel return false; } - $jinput = Factory::getApplication()->input; + $app = Factory::getApplication(); + + $jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) diff --git a/admin/src/Model/Validation_rulesModel.php b/admin/src/Model/Validation_rulesModel.php index d688d1a61..2268bd751 100644 --- a/admin/src/Model/Validation_rulesModel.php +++ b/admin/src/Model/Validation_rulesModel.php @@ -110,20 +110,21 @@ class Validation_rulesModel extends ListModel protected function populateState($ordering = null, $direction = null) { $app = $this->app; + $input = $this->app->getInput(); // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) + if ($layout = $input->get('layout')) { $this->context .= '.' . $layout; } // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); + $formSubmited = $input->post->get('form_submited'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); if ($formSubmited) { - $access = $app->input->post->get('access'); + $access = $input->post->get('access'); $this->setState('filter.access', $access); } @@ -145,14 +146,14 @@ class Validation_rulesModel extends ListModel $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); if ($formSubmited) { - $name = $app->input->post->get('name'); + $name = $input->post->get('name'); $this->setState('filter.name', $name); } $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); if ($formSubmited) { - $short_description = $app->input->post->get('short_description'); + $short_description = $input->post->get('short_description'); $this->setState('filter.short_description', $short_description); } @@ -380,6 +381,7 @@ class Validation_rulesModel extends ListModel $query->from($db->quoteName('#__componentbuilder_validation_rule')); // Only select items that are checked out. $query->where(('checked_out') . ' >= 0'); + // Query only to see if we have a rows $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) diff --git a/admin/src/Table/Admin_custom_tabsTable.php b/admin/src/Table/Admin_custom_tabsTable.php index 4065d8a9e..a6b889f5f 100644 --- a/admin/src/Table/Admin_custom_tabsTable.php +++ b/admin/src/Table/Admin_custom_tabsTable.php @@ -62,7 +62,7 @@ class Admin_custom_tabsTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_admin_custom_tabs', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Admin_custom_tabsTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Admin_fieldsTable.php b/admin/src/Table/Admin_fieldsTable.php index 3746c6a88..510f40f09 100644 --- a/admin/src/Table/Admin_fieldsTable.php +++ b/admin/src/Table/Admin_fieldsTable.php @@ -62,7 +62,7 @@ class Admin_fieldsTable extends Table implements VersionableTableInterface, Tagg $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_admin_fields', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Admin_fieldsTable extends Table implements VersionableTableInterface, Tagg * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Admin_fields_conditionsTable.php b/admin/src/Table/Admin_fields_conditionsTable.php index 3033a670f..539d86e9b 100644 --- a/admin/src/Table/Admin_fields_conditionsTable.php +++ b/admin/src/Table/Admin_fields_conditionsTable.php @@ -62,7 +62,7 @@ class Admin_fields_conditionsTable extends Table implements VersionableTableInte $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_admin_fields_conditions', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Admin_fields_conditionsTable extends Table implements VersionableTableInte * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Admin_fields_relationsTable.php b/admin/src/Table/Admin_fields_relationsTable.php index b2a5a6a31..88a537fa1 100644 --- a/admin/src/Table/Admin_fields_relationsTable.php +++ b/admin/src/Table/Admin_fields_relationsTable.php @@ -62,7 +62,7 @@ class Admin_fields_relationsTable extends Table implements VersionableTableInter $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_admin_fields_relations', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Admin_fields_relationsTable extends Table implements VersionableTableInter * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Admin_viewTable.php b/admin/src/Table/Admin_viewTable.php index b98f25dfa..bdd37dab5 100644 --- a/admin/src/Table/Admin_viewTable.php +++ b/admin/src/Table/Admin_viewTable.php @@ -62,7 +62,7 @@ class Admin_viewTable extends Table implements VersionableTableInterface, Taggab $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_admin_view', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Admin_viewTable extends Table implements VersionableTableInterface, Taggab * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Class_extendsTable.php b/admin/src/Table/Class_extendsTable.php index 1d1ebccac..061156b6c 100644 --- a/admin/src/Table/Class_extendsTable.php +++ b/admin/src/Table/Class_extendsTable.php @@ -62,7 +62,7 @@ class Class_extendsTable extends Table implements VersionableTableInterface, Tag $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_class_extends', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Class_extendsTable extends Table implements VersionableTableInterface, Tag * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Class_methodTable.php b/admin/src/Table/Class_methodTable.php index ad4306acb..276c980a5 100644 --- a/admin/src/Table/Class_methodTable.php +++ b/admin/src/Table/Class_methodTable.php @@ -62,7 +62,7 @@ class Class_methodTable extends Table implements VersionableTableInterface, Tagg $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_class_method', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Class_methodTable extends Table implements VersionableTableInterface, Tagg * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Class_propertyTable.php b/admin/src/Table/Class_propertyTable.php index c36529382..16c4cbf0f 100644 --- a/admin/src/Table/Class_propertyTable.php +++ b/admin/src/Table/Class_propertyTable.php @@ -62,7 +62,7 @@ class Class_propertyTable extends Table implements VersionableTableInterface, Ta $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_class_property', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Class_propertyTable extends Table implements VersionableTableInterface, Ta * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_admin_viewsTable.php b/admin/src/Table/Component_admin_viewsTable.php index 8df698d8c..b0911da8b 100644 --- a/admin/src/Table/Component_admin_viewsTable.php +++ b/admin/src/Table/Component_admin_viewsTable.php @@ -62,7 +62,7 @@ class Component_admin_viewsTable extends Table implements VersionableTableInterf $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_admin_views', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_admin_viewsTable extends Table implements VersionableTableInterf * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_configTable.php b/admin/src/Table/Component_configTable.php index 66275d8b7..6f06f96e1 100644 --- a/admin/src/Table/Component_configTable.php +++ b/admin/src/Table/Component_configTable.php @@ -62,7 +62,7 @@ class Component_configTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_config', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_configTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_custom_admin_menusTable.php b/admin/src/Table/Component_custom_admin_menusTable.php index 08ae8f8c3..3ab2c7fd6 100644 --- a/admin/src/Table/Component_custom_admin_menusTable.php +++ b/admin/src/Table/Component_custom_admin_menusTable.php @@ -62,7 +62,7 @@ class Component_custom_admin_menusTable extends Table implements VersionableTabl $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_custom_admin_menus', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_custom_admin_menusTable extends Table implements VersionableTabl * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_custom_admin_viewsTable.php b/admin/src/Table/Component_custom_admin_viewsTable.php index 92b62985b..01db0c254 100644 --- a/admin/src/Table/Component_custom_admin_viewsTable.php +++ b/admin/src/Table/Component_custom_admin_viewsTable.php @@ -62,7 +62,7 @@ class Component_custom_admin_viewsTable extends Table implements VersionableTabl $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_custom_admin_views', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_custom_admin_viewsTable extends Table implements VersionableTabl * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_dashboardTable.php b/admin/src/Table/Component_dashboardTable.php index 0a57d1c6d..b3b224619 100644 --- a/admin/src/Table/Component_dashboardTable.php +++ b/admin/src/Table/Component_dashboardTable.php @@ -62,7 +62,7 @@ class Component_dashboardTable extends Table implements VersionableTableInterfac $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_dashboard', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_dashboardTable extends Table implements VersionableTableInterfac * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_files_foldersTable.php b/admin/src/Table/Component_files_foldersTable.php index 9dd776431..6db6e9479 100644 --- a/admin/src/Table/Component_files_foldersTable.php +++ b/admin/src/Table/Component_files_foldersTable.php @@ -62,7 +62,7 @@ class Component_files_foldersTable extends Table implements VersionableTableInte $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_files_folders', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_files_foldersTable extends Table implements VersionableTableInte * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_modulesTable.php b/admin/src/Table/Component_modulesTable.php index 66b1a66e8..ad5a04f8a 100644 --- a/admin/src/Table/Component_modulesTable.php +++ b/admin/src/Table/Component_modulesTable.php @@ -62,7 +62,7 @@ class Component_modulesTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_modules', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_modulesTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_mysql_tweaksTable.php b/admin/src/Table/Component_mysql_tweaksTable.php index 4dd87a695..eda2e9651 100644 --- a/admin/src/Table/Component_mysql_tweaksTable.php +++ b/admin/src/Table/Component_mysql_tweaksTable.php @@ -62,7 +62,7 @@ class Component_mysql_tweaksTable extends Table implements VersionableTableInter $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_mysql_tweaks', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_mysql_tweaksTable extends Table implements VersionableTableInter * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_placeholdersTable.php b/admin/src/Table/Component_placeholdersTable.php index c04e1a695..9b79ce27b 100644 --- a/admin/src/Table/Component_placeholdersTable.php +++ b/admin/src/Table/Component_placeholdersTable.php @@ -62,7 +62,7 @@ class Component_placeholdersTable extends Table implements VersionableTableInter $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_placeholders', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_placeholdersTable extends Table implements VersionableTableInter * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_pluginsTable.php b/admin/src/Table/Component_pluginsTable.php index ccd61da4f..f13e573a2 100644 --- a/admin/src/Table/Component_pluginsTable.php +++ b/admin/src/Table/Component_pluginsTable.php @@ -62,7 +62,7 @@ class Component_pluginsTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_plugins', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_pluginsTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_routerTable.php b/admin/src/Table/Component_routerTable.php index 550b154e4..4e504e52e 100644 --- a/admin/src/Table/Component_routerTable.php +++ b/admin/src/Table/Component_routerTable.php @@ -62,7 +62,7 @@ class Component_routerTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_router', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_routerTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_site_viewsTable.php b/admin/src/Table/Component_site_viewsTable.php index 5a7b0aaed..8df9ed52e 100644 --- a/admin/src/Table/Component_site_viewsTable.php +++ b/admin/src/Table/Component_site_viewsTable.php @@ -62,7 +62,7 @@ class Component_site_viewsTable extends Table implements VersionableTableInterfa $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_site_views', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_site_viewsTable extends Table implements VersionableTableInterfa * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Component_updatesTable.php b/admin/src/Table/Component_updatesTable.php index a0de98d2e..c831d74ba 100644 --- a/admin/src/Table/Component_updatesTable.php +++ b/admin/src/Table/Component_updatesTable.php @@ -62,7 +62,7 @@ class Component_updatesTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_component_updates', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Component_updatesTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Custom_admin_viewTable.php b/admin/src/Table/Custom_admin_viewTable.php index 42a3c01e1..2e1f8328c 100644 --- a/admin/src/Table/Custom_admin_viewTable.php +++ b/admin/src/Table/Custom_admin_viewTable.php @@ -62,7 +62,7 @@ class Custom_admin_viewTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_custom_admin_view', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Custom_admin_viewTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Custom_codeTable.php b/admin/src/Table/Custom_codeTable.php index f59d4b853..cbfad8210 100644 --- a/admin/src/Table/Custom_codeTable.php +++ b/admin/src/Table/Custom_codeTable.php @@ -62,7 +62,7 @@ class Custom_codeTable extends Table implements VersionableTableInterface, Tagga $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_custom_code', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Custom_codeTable extends Table implements VersionableTableInterface, Tagga * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Dynamic_getTable.php b/admin/src/Table/Dynamic_getTable.php index b7c519f3d..7e0f777d6 100644 --- a/admin/src/Table/Dynamic_getTable.php +++ b/admin/src/Table/Dynamic_getTable.php @@ -62,7 +62,7 @@ class Dynamic_getTable extends Table implements VersionableTableInterface, Tagga $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_dynamic_get', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Dynamic_getTable extends Table implements VersionableTableInterface, Tagga * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/FieldTable.php b/admin/src/Table/FieldTable.php index 5a5b24e7d..e13c68340 100644 --- a/admin/src/Table/FieldTable.php +++ b/admin/src/Table/FieldTable.php @@ -62,7 +62,7 @@ class FieldTable extends Table implements VersionableTableInterface, TaggableTab $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_field', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class FieldTable extends Table implements VersionableTableInterface, TaggableTab * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/FieldtypeTable.php b/admin/src/Table/FieldtypeTable.php index 44f775398..219660d41 100644 --- a/admin/src/Table/FieldtypeTable.php +++ b/admin/src/Table/FieldtypeTable.php @@ -62,7 +62,7 @@ class FieldtypeTable extends Table implements VersionableTableInterface, Taggabl $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_fieldtype', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class FieldtypeTable extends Table implements VersionableTableInterface, Taggabl * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Help_documentTable.php b/admin/src/Table/Help_documentTable.php index ceb706136..1c75a09a2 100644 --- a/admin/src/Table/Help_documentTable.php +++ b/admin/src/Table/Help_documentTable.php @@ -62,7 +62,7 @@ class Help_documentTable extends Table implements VersionableTableInterface, Tag $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_help_document', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Help_documentTable extends Table implements VersionableTableInterface, Tag * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_componentTable.php b/admin/src/Table/Joomla_componentTable.php index 9b1407a67..0f4956ac4 100644 --- a/admin/src/Table/Joomla_componentTable.php +++ b/admin/src/Table/Joomla_componentTable.php @@ -62,7 +62,7 @@ class Joomla_componentTable extends Table implements VersionableTableInterface, $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_component', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_componentTable extends Table implements VersionableTableInterface, * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_moduleTable.php b/admin/src/Table/Joomla_moduleTable.php index 3f87c6d11..854a2a004 100644 --- a/admin/src/Table/Joomla_moduleTable.php +++ b/admin/src/Table/Joomla_moduleTable.php @@ -62,7 +62,7 @@ class Joomla_moduleTable extends Table implements VersionableTableInterface, Tag $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_module', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_moduleTable extends Table implements VersionableTableInterface, Tag * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_module_files_folders_urlsTable.php b/admin/src/Table/Joomla_module_files_folders_urlsTable.php index 51a5df048..3f8a9282f 100644 --- a/admin/src/Table/Joomla_module_files_folders_urlsTable.php +++ b/admin/src/Table/Joomla_module_files_folders_urlsTable.php @@ -62,7 +62,7 @@ class Joomla_module_files_folders_urlsTable extends Table implements Versionable $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_module_files_folders_urls', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_module_files_folders_urlsTable extends Table implements Versionable * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_module_updatesTable.php b/admin/src/Table/Joomla_module_updatesTable.php index 1fa1fb39e..822d5356b 100644 --- a/admin/src/Table/Joomla_module_updatesTable.php +++ b/admin/src/Table/Joomla_module_updatesTable.php @@ -62,7 +62,7 @@ class Joomla_module_updatesTable extends Table implements VersionableTableInterf $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_module_updates', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_module_updatesTable extends Table implements VersionableTableInterf * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_pluginTable.php b/admin/src/Table/Joomla_pluginTable.php index 748845347..ce475c829 100644 --- a/admin/src/Table/Joomla_pluginTable.php +++ b/admin/src/Table/Joomla_pluginTable.php @@ -62,7 +62,7 @@ class Joomla_pluginTable extends Table implements VersionableTableInterface, Tag $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_plugin', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_pluginTable extends Table implements VersionableTableInterface, Tag * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_plugin_files_folders_urlsTable.php b/admin/src/Table/Joomla_plugin_files_folders_urlsTable.php index 2b6cdc2c0..fc26aebd3 100644 --- a/admin/src/Table/Joomla_plugin_files_folders_urlsTable.php +++ b/admin/src/Table/Joomla_plugin_files_folders_urlsTable.php @@ -62,7 +62,7 @@ class Joomla_plugin_files_folders_urlsTable extends Table implements Versionable $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_plugin_files_folders_urls', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_plugin_files_folders_urlsTable extends Table implements Versionable * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_plugin_groupTable.php b/admin/src/Table/Joomla_plugin_groupTable.php index a8325ba29..c93390e44 100644 --- a/admin/src/Table/Joomla_plugin_groupTable.php +++ b/admin/src/Table/Joomla_plugin_groupTable.php @@ -62,7 +62,7 @@ class Joomla_plugin_groupTable extends Table implements VersionableTableInterfac $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_plugin_group', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_plugin_groupTable extends Table implements VersionableTableInterfac * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_plugin_updatesTable.php b/admin/src/Table/Joomla_plugin_updatesTable.php index 7609db9c1..c4e8b163a 100644 --- a/admin/src/Table/Joomla_plugin_updatesTable.php +++ b/admin/src/Table/Joomla_plugin_updatesTable.php @@ -62,7 +62,7 @@ class Joomla_plugin_updatesTable extends Table implements VersionableTableInterf $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_plugin_updates', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_plugin_updatesTable extends Table implements VersionableTableInterf * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Joomla_powerTable.php b/admin/src/Table/Joomla_powerTable.php index 293503913..8806bbee2 100644 --- a/admin/src/Table/Joomla_powerTable.php +++ b/admin/src/Table/Joomla_powerTable.php @@ -62,7 +62,7 @@ class Joomla_powerTable extends Table implements VersionableTableInterface, Tagg $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_joomla_power', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Joomla_powerTable extends Table implements VersionableTableInterface, Tagg * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/LanguageTable.php b/admin/src/Table/LanguageTable.php index 61472ba16..6b5d3e412 100644 --- a/admin/src/Table/LanguageTable.php +++ b/admin/src/Table/LanguageTable.php @@ -62,7 +62,7 @@ class LanguageTable extends Table implements VersionableTableInterface, Taggable $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_language', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class LanguageTable extends Table implements VersionableTableInterface, Taggable * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Language_translationTable.php b/admin/src/Table/Language_translationTable.php index 7161913ec..30284d45b 100644 --- a/admin/src/Table/Language_translationTable.php +++ b/admin/src/Table/Language_translationTable.php @@ -62,7 +62,7 @@ class Language_translationTable extends Table implements VersionableTableInterfa $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_language_translation', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Language_translationTable extends Table implements VersionableTableInterfa * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/LayoutTable.php b/admin/src/Table/LayoutTable.php index f422c4310..2e927e1d4 100644 --- a/admin/src/Table/LayoutTable.php +++ b/admin/src/Table/LayoutTable.php @@ -62,7 +62,7 @@ class LayoutTable extends Table implements VersionableTableInterface, TaggableTa $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_layout', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class LayoutTable extends Table implements VersionableTableInterface, TaggableTa * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/LibraryTable.php b/admin/src/Table/LibraryTable.php index 201dc0aa5..6123ad8ec 100644 --- a/admin/src/Table/LibraryTable.php +++ b/admin/src/Table/LibraryTable.php @@ -62,7 +62,7 @@ class LibraryTable extends Table implements VersionableTableInterface, TaggableT $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_library', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class LibraryTable extends Table implements VersionableTableInterface, TaggableT * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Library_configTable.php b/admin/src/Table/Library_configTable.php index 56dec96d8..71b638ea6 100644 --- a/admin/src/Table/Library_configTable.php +++ b/admin/src/Table/Library_configTable.php @@ -62,7 +62,7 @@ class Library_configTable extends Table implements VersionableTableInterface, Ta $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_library_config', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Library_configTable extends Table implements VersionableTableInterface, Ta * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Library_files_folders_urlsTable.php b/admin/src/Table/Library_files_folders_urlsTable.php index 3c0a71197..3e5e946ab 100644 --- a/admin/src/Table/Library_files_folders_urlsTable.php +++ b/admin/src/Table/Library_files_folders_urlsTable.php @@ -62,7 +62,7 @@ class Library_files_folders_urlsTable extends Table implements VersionableTableI $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_library_files_folders_urls', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Library_files_folders_urlsTable extends Table implements VersionableTableI * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/PlaceholderTable.php b/admin/src/Table/PlaceholderTable.php index 99dc14534..df0e39c3d 100644 --- a/admin/src/Table/PlaceholderTable.php +++ b/admin/src/Table/PlaceholderTable.php @@ -62,7 +62,7 @@ class PlaceholderTable extends Table implements VersionableTableInterface, Tagga $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_placeholder', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class PlaceholderTable extends Table implements VersionableTableInterface, Tagga * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/PowerTable.php b/admin/src/Table/PowerTable.php index 1099b25c8..a0fc9e5c1 100644 --- a/admin/src/Table/PowerTable.php +++ b/admin/src/Table/PowerTable.php @@ -62,7 +62,7 @@ class PowerTable extends Table implements VersionableTableInterface, TaggableTab $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_power', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class PowerTable extends Table implements VersionableTableInterface, TaggableTab * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/RepositoryTable.php b/admin/src/Table/RepositoryTable.php index 17eb1c7c5..d3aff266f 100644 --- a/admin/src/Table/RepositoryTable.php +++ b/admin/src/Table/RepositoryTable.php @@ -62,7 +62,7 @@ class RepositoryTable extends Table implements VersionableTableInterface, Taggab $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_repository', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class RepositoryTable extends Table implements VersionableTableInterface, Taggab * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/ServerTable.php b/admin/src/Table/ServerTable.php index 4815c60ff..930cd491f 100644 --- a/admin/src/Table/ServerTable.php +++ b/admin/src/Table/ServerTable.php @@ -62,7 +62,7 @@ class ServerTable extends Table implements VersionableTableInterface, TaggableTa $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_server', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class ServerTable extends Table implements VersionableTableInterface, TaggableTa * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Site_viewTable.php b/admin/src/Table/Site_viewTable.php index 7c8fc8a55..167efd658 100644 --- a/admin/src/Table/Site_viewTable.php +++ b/admin/src/Table/Site_viewTable.php @@ -62,7 +62,7 @@ class Site_viewTable extends Table implements VersionableTableInterface, Taggabl $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_site_view', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Site_viewTable extends Table implements VersionableTableInterface, Taggabl * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/SnippetTable.php b/admin/src/Table/SnippetTable.php index 80f571dc5..ac9482361 100644 --- a/admin/src/Table/SnippetTable.php +++ b/admin/src/Table/SnippetTable.php @@ -62,7 +62,7 @@ class SnippetTable extends Table implements VersionableTableInterface, TaggableT $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_snippet', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class SnippetTable extends Table implements VersionableTableInterface, TaggableT * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Snippet_typeTable.php b/admin/src/Table/Snippet_typeTable.php index 89eb2fc62..a4c465033 100644 --- a/admin/src/Table/Snippet_typeTable.php +++ b/admin/src/Table/Snippet_typeTable.php @@ -62,7 +62,7 @@ class Snippet_typeTable extends Table implements VersionableTableInterface, Tagg $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_snippet_type', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Snippet_typeTable extends Table implements VersionableTableInterface, Tagg * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/TemplateTable.php b/admin/src/Table/TemplateTable.php index 668fead5e..9b63fa4fc 100644 --- a/admin/src/Table/TemplateTable.php +++ b/admin/src/Table/TemplateTable.php @@ -62,7 +62,7 @@ class TemplateTable extends Table implements VersionableTableInterface, Taggable $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_template', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class TemplateTable extends Table implements VersionableTableInterface, Taggable * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/Table/Validation_ruleTable.php b/admin/src/Table/Validation_ruleTable.php index 36a5a617a..6966760b5 100644 --- a/admin/src/Table/Validation_ruleTable.php +++ b/admin/src/Table/Validation_ruleTable.php @@ -62,7 +62,7 @@ class Validation_ruleTable extends Table implements VersionableTableInterface, T $this->_jsonEncode = ['params', 'metadata']; // Indicates that columns fully support the NULL value in the database - // $this->_supportNullValue = true; // hmmm will keep an eye on this ;) + $this->_supportNullValue = true; parent::__construct('#__componentbuilder_validation_rule', 'id', $db, $dispatcher); } @@ -100,7 +100,7 @@ class Validation_ruleTable extends Table implements VersionableTableInterface, T * @return boolean True on success, false on failure. * @since 1.6 */ - public function store($updateNulls = false) + public function store($updateNulls = true) { $date = Factory::getDate()->toSql(); $userId = $this->getCurrentUser()->id; diff --git a/admin/src/View/Admin_custom_tabs/HtmlView.php b/admin/src/View/Admin_custom_tabs/HtmlView.php index dec8baef5..5fc0a0c67 100644 --- a/admin/src/View/Admin_custom_tabs/HtmlView.php +++ b/admin/src/View/Admin_custom_tabs/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Admin_fields/HtmlView.php b/admin/src/View/Admin_fields/HtmlView.php index f03dec9b5..b5278ba30 100644 --- a/admin/src/View/Admin_fields/HtmlView.php +++ b/admin/src/View/Admin_fields/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('admin_fields', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Admin_fields_conditions/HtmlView.php b/admin/src/View/Admin_fields_conditions/HtmlView.php index 9e3d935a5..b1519e369 100644 --- a/admin/src/View/Admin_fields_conditions/HtmlView.php +++ b/admin/src/View/Admin_fields_conditions/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Admin_fields_relations/HtmlView.php b/admin/src/View/Admin_fields_relations/HtmlView.php index 20cfe8fb4..db758fb02 100644 --- a/admin/src/View/Admin_fields_relations/HtmlView.php +++ b/admin/src/View/Admin_fields_relations/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('admin_fields_relations', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Admin_view/HtmlView.php b/admin/src/View/Admin_view/HtmlView.php index 9bde56c1c..7ea5ed848 100644 --- a/admin/src/View/Admin_view/HtmlView.php +++ b/admin/src/View/Admin_view/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('admin_view', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Admin_views/HtmlView.php b/admin/src/View/Admin_views/HtmlView.php index 272c24ec8..5be34b141 100644 --- a/admin/src/View/Admin_views/HtmlView.php +++ b/admin/src/View/Admin_views/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Admins_custom_tabs/HtmlView.php b/admin/src/View/Admins_custom_tabs/HtmlView.php index 58df48ea9..2331e6354 100644 --- a/admin/src/View/Admins_custom_tabs/HtmlView.php +++ b/admin/src/View/Admins_custom_tabs/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Admins_fields/HtmlView.php b/admin/src/View/Admins_fields/HtmlView.php index 17366d14d..555c0e2e6 100644 --- a/admin/src/View/Admins_fields/HtmlView.php +++ b/admin/src/View/Admins_fields/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Admins_fields_conditions/HtmlView.php b/admin/src/View/Admins_fields_conditions/HtmlView.php index 061f723ec..54d624656 100644 --- a/admin/src/View/Admins_fields_conditions/HtmlView.php +++ b/admin/src/View/Admins_fields_conditions/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Admins_fields_relations/HtmlView.php b/admin/src/View/Admins_fields_relations/HtmlView.php index 51befddb1..c73e2bfe6 100644 --- a/admin/src/View/Admins_fields_relations/HtmlView.php +++ b/admin/src/View/Admins_fields_relations/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Class_extendings/HtmlView.php b/admin/src/View/Class_extendings/HtmlView.php index ce1c967e5..751fe83f7 100644 --- a/admin/src/View/Class_extendings/HtmlView.php +++ b/admin/src/View/Class_extendings/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Class_extends/HtmlView.php b/admin/src/View/Class_extends/HtmlView.php index 127b1ac93..d73223ca4 100644 --- a/admin/src/View/Class_extends/HtmlView.php +++ b/admin/src/View/Class_extends/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('class_extends', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Class_method/HtmlView.php b/admin/src/View/Class_method/HtmlView.php index ab0bf7037..890582772 100644 --- a/admin/src/View/Class_method/HtmlView.php +++ b/admin/src/View/Class_method/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('class_method', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Class_methods/HtmlView.php b/admin/src/View/Class_methods/HtmlView.php index 65344b560..2a1f34186 100644 --- a/admin/src/View/Class_methods/HtmlView.php +++ b/admin/src/View/Class_methods/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Class_properties/HtmlView.php b/admin/src/View/Class_properties/HtmlView.php index b91d3ad35..d9cece1b5 100644 --- a/admin/src/View/Class_properties/HtmlView.php +++ b/admin/src/View/Class_properties/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Class_property/HtmlView.php b/admin/src/View/Class_property/HtmlView.php index 77ba30a81..9d2770e82 100644 --- a/admin/src/View/Class_property/HtmlView.php +++ b/admin/src/View/Class_property/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('class_property', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Compiler/HtmlView.php b/admin/src/View/Compiler/HtmlView.php index 71c21b414..f5d54a80b 100644 --- a/admin/src/View/Compiler/HtmlView.php +++ b/admin/src/View/Compiler/HtmlView.php @@ -91,15 +91,17 @@ class HtmlView extends BaseHtmlView $this->user ??= $this->getCurrentUser(); // get global action permissions $this->canDo = ComponentbuilderHelper::getActions('compiler'); - $this->styles = $this->get('Styles') ?? []; - $this->scripts = $this->get('Scripts') ?? []; + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles() ?? []; + $this->scripts = $model->getScripts() ?? []; // Initialise variables. - $this->items = $this->get('Items'); + $this->items = $model->getItems(); // get the success message if set $this->SuccessMessage = $this->app->getUserState('com_componentbuilder.success_message', false); // get active components - $this->Components = $this->get('Components'); + $this->Components = $model->getComponents(); // get the needed form fields $this->form = $this->getDynamicForm(); @@ -151,7 +153,7 @@ class HtmlView extends BaseHtmlView } // Check for errors. - if (count($errors = $this->get('Errors'))) + if (count($errors = $model->getErrors())) { throw new \Exception(implode(PHP_EOL, $errors), 500); } @@ -686,7 +688,7 @@ class HtmlView extends BaseHtmlView protected function addToolbar(): void { // hide the main menu - $this->app->input->set('hidemainmenu', true); + $this->app->getInput()->set('hidemainmenu', true); // add title to the page ToolbarHelper::title(Text::_('COM_COMPONENTBUILDER_COMPILER'),'cogs'); // add cpanel button diff --git a/admin/src/View/Component_admin_views/HtmlView.php b/admin/src/View/Component_admin_views/HtmlView.php index 857b115c0..a29d9b3bc 100644 --- a/admin/src/View/Component_admin_views/HtmlView.php +++ b/admin/src/View/Component_admin_views/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_admin_views', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_config/HtmlView.php b/admin/src/View/Component_config/HtmlView.php index 0d1316e34..adef8da49 100644 --- a/admin/src/View/Component_config/HtmlView.php +++ b/admin/src/View/Component_config/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_config', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_custom_admin_menus/HtmlView.php b/admin/src/View/Component_custom_admin_menus/HtmlView.php index 006f96b17..c62f4d494 100644 --- a/admin/src/View/Component_custom_admin_menus/HtmlView.php +++ b/admin/src/View/Component_custom_admin_menus/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_custom_admin_views/HtmlView.php b/admin/src/View/Component_custom_admin_views/HtmlView.php index dd8d6aac7..75a48187f 100644 --- a/admin/src/View/Component_custom_admin_views/HtmlView.php +++ b/admin/src/View/Component_custom_admin_views/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_dashboard/HtmlView.php b/admin/src/View/Component_dashboard/HtmlView.php index 2f9a767ca..65f8ae4b9 100644 --- a/admin/src/View/Component_dashboard/HtmlView.php +++ b/admin/src/View/Component_dashboard/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_dashboard', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_files_folders/HtmlView.php b/admin/src/View/Component_files_folders/HtmlView.php index 64cb9841e..4a1323cf1 100644 --- a/admin/src/View/Component_files_folders/HtmlView.php +++ b/admin/src/View/Component_files_folders/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_files_folders', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_modules/HtmlView.php b/admin/src/View/Component_modules/HtmlView.php index ba35c62a1..a85d1432e 100644 --- a/admin/src/View/Component_modules/HtmlView.php +++ b/admin/src/View/Component_modules/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_modules', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_mysql_tweaks/HtmlView.php b/admin/src/View/Component_mysql_tweaks/HtmlView.php index 939ca8257..c744802a3 100644 --- a/admin/src/View/Component_mysql_tweaks/HtmlView.php +++ b/admin/src/View/Component_mysql_tweaks/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_placeholders/HtmlView.php b/admin/src/View/Component_placeholders/HtmlView.php index 4c67ee71c..089166d61 100644 --- a/admin/src/View/Component_placeholders/HtmlView.php +++ b/admin/src/View/Component_placeholders/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_placeholders', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_plugins/HtmlView.php b/admin/src/View/Component_plugins/HtmlView.php index d9a588661..039cec936 100644 --- a/admin/src/View/Component_plugins/HtmlView.php +++ b/admin/src/View/Component_plugins/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_plugins', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_router/HtmlView.php b/admin/src/View/Component_router/HtmlView.php index 0df32aa54..00f05fd91 100644 --- a/admin/src/View/Component_router/HtmlView.php +++ b/admin/src/View/Component_router/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_router', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_site_views/HtmlView.php b/admin/src/View/Component_site_views/HtmlView.php index 94ab51726..aefa037a0 100644 --- a/admin/src/View/Component_site_views/HtmlView.php +++ b/admin/src/View/Component_site_views/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_site_views', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Component_updates/HtmlView.php b/admin/src/View/Component_updates/HtmlView.php index 0680bbc94..10b690a35 100644 --- a/admin/src/View/Component_updates/HtmlView.php +++ b/admin/src/View/Component_updates/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('component_updates', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Components_admin_views/HtmlView.php b/admin/src/View/Components_admin_views/HtmlView.php index 374c088e5..fc8be0a1f 100644 --- a/admin/src/View/Components_admin_views/HtmlView.php +++ b/admin/src/View/Components_admin_views/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_config/HtmlView.php b/admin/src/View/Components_config/HtmlView.php index 0d2037173..c45e5a37f 100644 --- a/admin/src/View/Components_config/HtmlView.php +++ b/admin/src/View/Components_config/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_custom_admin_menus/HtmlView.php b/admin/src/View/Components_custom_admin_menus/HtmlView.php index edb19f336..8b4a9635d 100644 --- a/admin/src/View/Components_custom_admin_menus/HtmlView.php +++ b/admin/src/View/Components_custom_admin_menus/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_custom_admin_views/HtmlView.php b/admin/src/View/Components_custom_admin_views/HtmlView.php index a6f3ce074..a71a662dd 100644 --- a/admin/src/View/Components_custom_admin_views/HtmlView.php +++ b/admin/src/View/Components_custom_admin_views/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_dashboard/HtmlView.php b/admin/src/View/Components_dashboard/HtmlView.php index 4a95f81f9..c39a3a161 100644 --- a/admin/src/View/Components_dashboard/HtmlView.php +++ b/admin/src/View/Components_dashboard/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_files_folders/HtmlView.php b/admin/src/View/Components_files_folders/HtmlView.php index 8e0673ff2..10da4e342 100644 --- a/admin/src/View/Components_files_folders/HtmlView.php +++ b/admin/src/View/Components_files_folders/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_modules/HtmlView.php b/admin/src/View/Components_modules/HtmlView.php index abd3b9e99..66cb20bae 100644 --- a/admin/src/View/Components_modules/HtmlView.php +++ b/admin/src/View/Components_modules/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_mysql_tweaks/HtmlView.php b/admin/src/View/Components_mysql_tweaks/HtmlView.php index 3a3d02b92..ea07aa989 100644 --- a/admin/src/View/Components_mysql_tweaks/HtmlView.php +++ b/admin/src/View/Components_mysql_tweaks/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_placeholders/HtmlView.php b/admin/src/View/Components_placeholders/HtmlView.php index efff7d923..3df5a3a04 100644 --- a/admin/src/View/Components_placeholders/HtmlView.php +++ b/admin/src/View/Components_placeholders/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_plugins/HtmlView.php b/admin/src/View/Components_plugins/HtmlView.php index 55c7378d0..2349b1f9d 100644 --- a/admin/src/View/Components_plugins/HtmlView.php +++ b/admin/src/View/Components_plugins/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_routers/HtmlView.php b/admin/src/View/Components_routers/HtmlView.php index fc6de9f30..58397eaa5 100644 --- a/admin/src/View/Components_routers/HtmlView.php +++ b/admin/src/View/Components_routers/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_site_views/HtmlView.php b/admin/src/View/Components_site_views/HtmlView.php index 459be667c..12943f5e6 100644 --- a/admin/src/View/Components_site_views/HtmlView.php +++ b/admin/src/View/Components_site_views/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Components_updates/HtmlView.php b/admin/src/View/Components_updates/HtmlView.php index c2e8da057..c801c912d 100644 --- a/admin/src/View/Components_updates/HtmlView.php +++ b/admin/src/View/Components_updates/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Custom_admin_view/HtmlView.php b/admin/src/View/Custom_admin_view/HtmlView.php index dad828f84..982bed5b8 100644 --- a/admin/src/View/Custom_admin_view/HtmlView.php +++ b/admin/src/View/Custom_admin_view/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('custom_admin_view', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Custom_admin_views/HtmlView.php b/admin/src/View/Custom_admin_views/HtmlView.php index 5b5738398..63c103943 100644 --- a/admin/src/View/Custom_admin_views/HtmlView.php +++ b/admin/src/View/Custom_admin_views/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Custom_code/HtmlView.php b/admin/src/View/Custom_code/HtmlView.php index 84161dd82..174730775 100644 --- a/admin/src/View/Custom_code/HtmlView.php +++ b/admin/src/View/Custom_code/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('custom_code', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Custom_codes/HtmlView.php b/admin/src/View/Custom_codes/HtmlView.php index b3202ab89..da0915f88 100644 --- a/admin/src/View/Custom_codes/HtmlView.php +++ b/admin/src/View/Custom_codes/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Dynamic_get/HtmlView.php b/admin/src/View/Dynamic_get/HtmlView.php index 7bf7d86c0..7a86b58f4 100644 --- a/admin/src/View/Dynamic_get/HtmlView.php +++ b/admin/src/View/Dynamic_get/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('dynamic_get', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Dynamic_gets/HtmlView.php b/admin/src/View/Dynamic_gets/HtmlView.php index 91afd7cd9..a24ddcca1 100644 --- a/admin/src/View/Dynamic_gets/HtmlView.php +++ b/admin/src/View/Dynamic_gets/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Field/HtmlView.php b/admin/src/View/Field/HtmlView.php index b90e94b52..2a30e8bb4 100644 --- a/admin/src/View/Field/HtmlView.php +++ b/admin/src/View/Field/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('field', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Fields/HtmlView.php b/admin/src/View/Fields/HtmlView.php index 9d73170e2..1e8771344 100644 --- a/admin/src/View/Fields/HtmlView.php +++ b/admin/src/View/Fields/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Fieldtype/HtmlView.php b/admin/src/View/Fieldtype/HtmlView.php index 1964505be..0bf979bbe 100644 --- a/admin/src/View/Fieldtype/HtmlView.php +++ b/admin/src/View/Fieldtype/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('fieldtype', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Fieldtypes/HtmlView.php b/admin/src/View/Fieldtypes/HtmlView.php index d6b0fc2ff..a8ae4152c 100644 --- a/admin/src/View/Fieldtypes/HtmlView.php +++ b/admin/src/View/Fieldtypes/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Help_document/HtmlView.php b/admin/src/View/Help_document/HtmlView.php index 414e41427..936c10f3b 100644 --- a/admin/src/View/Help_document/HtmlView.php +++ b/admin/src/View/Help_document/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('help_document', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Help_documents/HtmlView.php b/admin/src/View/Help_documents/HtmlView.php index b3f79a61e..371fec649 100644 --- a/admin/src/View/Help_documents/HtmlView.php +++ b/admin/src/View/Help_documents/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Initialization_selection/HtmlView.php b/admin/src/View/Initialization_selection/HtmlView.php index 3ba992d17..1b2b6e298 100644 --- a/admin/src/View/Initialization_selection/HtmlView.php +++ b/admin/src/View/Initialization_selection/HtmlView.php @@ -54,10 +54,12 @@ class HtmlView extends BaseHtmlView $this->user ??= Factory::getApplication()->getIdentity(); // get global action permissions $this->canDo = ComponentbuilderHelper::getActions('initialization_selection'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); // Initialise variables. - $this->item = $this->get('Item'); + $this->item = $model->getItem(); // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') @@ -67,7 +69,7 @@ class HtmlView extends BaseHtmlView } // Check for errors. - if (count($errors = $this->get('Errors'))) + if (count($errors = $model->getErrors())) { throw new \Exception(implode(PHP_EOL, $errors), 500); } @@ -159,7 +161,7 @@ class HtmlView extends BaseHtmlView protected function addToolbar(): void { // hide the main menu - $this->app->input->set('hidemainmenu', true); + $this->app->getInput()->set('hidemainmenu', true); // set the title if (isset($this->item->name) && $this->item->name) { diff --git a/admin/src/View/Joomla_component/HtmlView.php b/admin/src/View/Joomla_component/HtmlView.php index deece9059..b6474013a 100644 --- a/admin/src/View/Joomla_component/HtmlView.php +++ b/admin/src/View/Joomla_component/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_component', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_components/HtmlView.php b/admin/src/View/Joomla_components/HtmlView.php index 4a37692a3..87ce7ec97 100644 --- a/admin/src/View/Joomla_components/HtmlView.php +++ b/admin/src/View/Joomla_components/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_module/HtmlView.php b/admin/src/View/Joomla_module/HtmlView.php index b8f94b988..f75050d2c 100644 --- a/admin/src/View/Joomla_module/HtmlView.php +++ b/admin/src/View/Joomla_module/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_module', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_module_files_folders_urls/HtmlView.php b/admin/src/View/Joomla_module_files_folders_urls/HtmlView.php index 7ca65028a..75dd03bee 100644 --- a/admin/src/View/Joomla_module_files_folders_urls/HtmlView.php +++ b/admin/src/View/Joomla_module_files_folders_urls/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_module_files_folders_urls', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_module_updates/HtmlView.php b/admin/src/View/Joomla_module_updates/HtmlView.php index 27c53a3fe..1e6329078 100644 --- a/admin/src/View/Joomla_module_updates/HtmlView.php +++ b/admin/src/View/Joomla_module_updates/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_module_updates', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_modules/HtmlView.php b/admin/src/View/Joomla_modules/HtmlView.php index 73aea973f..ab76b556c 100644 --- a/admin/src/View/Joomla_modules/HtmlView.php +++ b/admin/src/View/Joomla_modules/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_modules_files_folders_urls/HtmlView.php b/admin/src/View/Joomla_modules_files_folders_urls/HtmlView.php index c261b7bca..19417449c 100644 --- a/admin/src/View/Joomla_modules_files_folders_urls/HtmlView.php +++ b/admin/src/View/Joomla_modules_files_folders_urls/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_modules_updates/HtmlView.php b/admin/src/View/Joomla_modules_updates/HtmlView.php index b6c23e87f..3f2e089fd 100644 --- a/admin/src/View/Joomla_modules_updates/HtmlView.php +++ b/admin/src/View/Joomla_modules_updates/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_plugin/HtmlView.php b/admin/src/View/Joomla_plugin/HtmlView.php index 2359bf9e2..91fb55aea 100644 --- a/admin/src/View/Joomla_plugin/HtmlView.php +++ b/admin/src/View/Joomla_plugin/HtmlView.php @@ -27,6 +27,7 @@ use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -48,6 +49,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -150,16 +159,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -216,7 +228,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -314,7 +326,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_plugin_files_folders_urls/HtmlView.php b/admin/src/View/Joomla_plugin_files_folders_urls/HtmlView.php index 25638036b..f3f21df69 100644 --- a/admin/src/View/Joomla_plugin_files_folders_urls/HtmlView.php +++ b/admin/src/View/Joomla_plugin_files_folders_urls/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_files_folders_urls', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_plugin_group/HtmlView.php b/admin/src/View/Joomla_plugin_group/HtmlView.php index 92a628614..1bea5fd50 100644 --- a/admin/src/View/Joomla_plugin_group/HtmlView.php +++ b/admin/src/View/Joomla_plugin_group/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_group', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_plugin_groups/HtmlView.php b/admin/src/View/Joomla_plugin_groups/HtmlView.php index 4267bf576..79d24dfbe 100644 --- a/admin/src/View/Joomla_plugin_groups/HtmlView.php +++ b/admin/src/View/Joomla_plugin_groups/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_plugin_updates/HtmlView.php b/admin/src/View/Joomla_plugin_updates/HtmlView.php index c3d3d0bd5..2b4cece65 100644 --- a/admin/src/View/Joomla_plugin_updates/HtmlView.php +++ b/admin/src/View/Joomla_plugin_updates/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_plugins/HtmlView.php b/admin/src/View/Joomla_plugins/HtmlView.php index 4a8baa3b5..a5d7c8ed3 100644 --- a/admin/src/View/Joomla_plugins/HtmlView.php +++ b/admin/src/View/Joomla_plugins/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_plugins_files_folders_urls/HtmlView.php b/admin/src/View/Joomla_plugins_files_folders_urls/HtmlView.php index 2a57f81a0..3b53d79b2 100644 --- a/admin/src/View/Joomla_plugins_files_folders_urls/HtmlView.php +++ b/admin/src/View/Joomla_plugins_files_folders_urls/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_plugins_updates/HtmlView.php b/admin/src/View/Joomla_plugins_updates/HtmlView.php index 9e940020b..7fd1a086c 100644 --- a/admin/src/View/Joomla_plugins_updates/HtmlView.php +++ b/admin/src/View/Joomla_plugins_updates/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Joomla_power/HtmlView.php b/admin/src/View/Joomla_power/HtmlView.php index 8b7f0da30..3aeaab6d9 100644 --- a/admin/src/View/Joomla_power/HtmlView.php +++ b/admin/src/View/Joomla_power/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('joomla_power', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Joomla_powers/HtmlView.php b/admin/src/View/Joomla_powers/HtmlView.php index f1a94cbf0..6c9779a13 100644 --- a/admin/src/View/Joomla_powers/HtmlView.php +++ b/admin/src/View/Joomla_powers/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Language/HtmlView.php b/admin/src/View/Language/HtmlView.php index 8eda47a00..56ed6d4d7 100644 --- a/admin/src/View/Language/HtmlView.php +++ b/admin/src/View/Language/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('language', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Language_translation/HtmlView.php b/admin/src/View/Language_translation/HtmlView.php index 44e528c37..64184a1f2 100644 --- a/admin/src/View/Language_translation/HtmlView.php +++ b/admin/src/View/Language_translation/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('language_translation', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Language_translations/HtmlView.php b/admin/src/View/Language_translations/HtmlView.php index b646bd6b7..0457480a8 100644 --- a/admin/src/View/Language_translations/HtmlView.php +++ b/admin/src/View/Language_translations/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Languages/HtmlView.php b/admin/src/View/Languages/HtmlView.php index 35e8fff26..cd9b32639 100644 --- a/admin/src/View/Languages/HtmlView.php +++ b/admin/src/View/Languages/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Layout/HtmlView.php b/admin/src/View/Layout/HtmlView.php index 2645251c2..e72768ceb 100644 --- a/admin/src/View/Layout/HtmlView.php +++ b/admin/src/View/Layout/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('layout', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Layouts/HtmlView.php b/admin/src/View/Layouts/HtmlView.php index 298d4f8b4..d44ac8181 100644 --- a/admin/src/View/Layouts/HtmlView.php +++ b/admin/src/View/Layouts/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Libraries/HtmlView.php b/admin/src/View/Libraries/HtmlView.php index c69ebf156..3669b2cfc 100644 --- a/admin/src/View/Libraries/HtmlView.php +++ b/admin/src/View/Libraries/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Libraries_config/HtmlView.php b/admin/src/View/Libraries_config/HtmlView.php index fd73ee8a8..9d1dab8a5 100644 --- a/admin/src/View/Libraries_config/HtmlView.php +++ b/admin/src/View/Libraries_config/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Libraries_files_folders_urls/HtmlView.php b/admin/src/View/Libraries_files_folders_urls/HtmlView.php index 243eeca89..ab72a6e30 100644 --- a/admin/src/View/Libraries_files_folders_urls/HtmlView.php +++ b/admin/src/View/Libraries_files_folders_urls/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Library/HtmlView.php b/admin/src/View/Library/HtmlView.php index a45a18211..aca08c2d4 100644 --- a/admin/src/View/Library/HtmlView.php +++ b/admin/src/View/Library/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('library', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Library_config/HtmlView.php b/admin/src/View/Library_config/HtmlView.php index 103aa93e4..35b1dfa55 100644 --- a/admin/src/View/Library_config/HtmlView.php +++ b/admin/src/View/Library_config/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('library_config', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Library_files_folders_urls/HtmlView.php b/admin/src/View/Library_files_folders_urls/HtmlView.php index f4c794064..605a9c325 100644 --- a/admin/src/View/Library_files_folders_urls/HtmlView.php +++ b/admin/src/View/Library_files_folders_urls/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Placeholder/HtmlView.php b/admin/src/View/Placeholder/HtmlView.php index a663883b1..bfb0c968c 100644 --- a/admin/src/View/Placeholder/HtmlView.php +++ b/admin/src/View/Placeholder/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('placeholder', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Placeholders/HtmlView.php b/admin/src/View/Placeholders/HtmlView.php index 2264da40f..8733f87e1 100644 --- a/admin/src/View/Placeholders/HtmlView.php +++ b/admin/src/View/Placeholders/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Power/HtmlView.php b/admin/src/View/Power/HtmlView.php index f9de19a2b..341de7641 100644 --- a/admin/src/View/Power/HtmlView.php +++ b/admin/src/View/Power/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('power', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Powers/HtmlView.php b/admin/src/View/Powers/HtmlView.php index b6c5d9bcc..ffcfe3582 100644 --- a/admin/src/View/Powers/HtmlView.php +++ b/admin/src/View/Powers/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Repositories/HtmlView.php b/admin/src/View/Repositories/HtmlView.php index b913910f5..3d63bbedc 100644 --- a/admin/src/View/Repositories/HtmlView.php +++ b/admin/src/View/Repositories/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Repository/HtmlView.php b/admin/src/View/Repository/HtmlView.php index 81d3b1709..10b2e8cd5 100644 --- a/admin/src/View/Repository/HtmlView.php +++ b/admin/src/View/Repository/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('repository', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Search/HtmlView.php b/admin/src/View/Search/HtmlView.php index 25b0ecbfe..1fcfef1f0 100644 --- a/admin/src/View/Search/HtmlView.php +++ b/admin/src/View/Search/HtmlView.php @@ -59,11 +59,13 @@ class HtmlView extends BaseHtmlView $this->user ??= Factory::getApplication()->getIdentity(); // get global action permissions $this->canDo = ComponentbuilderHelper::getActions('search'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); // Initialise variables. - $this->item = $this->get('Item'); - $this->urlvalues = $this->get('UrlValues'); + $this->item = $model->getItem(); + $this->urlvalues = $model->getUrlValues(); // get the needed form fields $this->form = $this->getDynamicForm(); @@ -112,7 +114,7 @@ class HtmlView extends BaseHtmlView } // Check for errors. - if (count($errors = $this->get('Errors'))) + if (count($errors = $model->getErrors())) { throw new \Exception(implode(PHP_EOL, $errors), 500); } @@ -421,7 +423,7 @@ class HtmlView extends BaseHtmlView protected function addToolbar(): void { // hide the main menu - $this->app->input->set('hidemainmenu', true); + $this->app->getInput()->set('hidemainmenu', true); // set the title if (isset($this->item->name) && $this->item->name) { diff --git a/admin/src/View/Server/HtmlView.php b/admin/src/View/Server/HtmlView.php index b62a3f380..da009070f 100644 --- a/admin/src/View/Server/HtmlView.php +++ b/admin/src/View/Server/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('server', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Servers/HtmlView.php b/admin/src/View/Servers/HtmlView.php index 40913556b..484b3cf4a 100644 --- a/admin/src/View/Servers/HtmlView.php +++ b/admin/src/View/Servers/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Site_view/HtmlView.php b/admin/src/View/Site_view/HtmlView.php index 7e62f85f9..d6f65a821 100644 --- a/admin/src/View/Site_view/HtmlView.php +++ b/admin/src/View/Site_view/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('site_view', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Site_views/HtmlView.php b/admin/src/View/Site_views/HtmlView.php index 5c555f6d8..58de04b9b 100644 --- a/admin/src/View/Site_views/HtmlView.php +++ b/admin/src/View/Site_views/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Snippet/HtmlView.php b/admin/src/View/Snippet/HtmlView.php index 47a5466c3..0841b1987 100644 --- a/admin/src/View/Snippet/HtmlView.php +++ b/admin/src/View/Snippet/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('snippet', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Snippet_type/HtmlView.php b/admin/src/View/Snippet_type/HtmlView.php index 1cb98f957..b001cfd5d 100644 --- a/admin/src/View/Snippet_type/HtmlView.php +++ b/admin/src/View/Snippet_type/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('snippet_type', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Snippet_types/HtmlView.php b/admin/src/View/Snippet_types/HtmlView.php index 49234fa18..9a883142f 100644 --- a/admin/src/View/Snippet_types/HtmlView.php +++ b/admin/src/View/Snippet_types/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Snippets/HtmlView.php b/admin/src/View/Snippets/HtmlView.php index 222f979be..d2e4bd94e 100644 --- a/admin/src/View/Snippets/HtmlView.php +++ b/admin/src/View/Snippets/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Template/HtmlView.php b/admin/src/View/Template/HtmlView.php index edbf88ee8..377400d31 100644 --- a/admin/src/View/Template/HtmlView.php +++ b/admin/src/View/Template/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('template', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -313,7 +325,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Templates/HtmlView.php b/admin/src/View/Templates/HtmlView.php index 1001d0900..2ee7b7979 100644 --- a/admin/src/View/Templates/HtmlView.php +++ b/admin/src/View/Templates/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/src/View/Validation_rule/HtmlView.php b/admin/src/View/Validation_rule/HtmlView.php index 7a9ce8ec2..97610ef7e 100644 --- a/admin/src/View/Validation_rule/HtmlView.php +++ b/admin/src/View/Validation_rule/HtmlView.php @@ -26,6 +26,7 @@ use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Document\Document; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; // No direct access to this file @@ -47,6 +48,14 @@ class HtmlView extends BaseHtmlView */ public mixed $item; + /** + * The app class + * + * @var CMSApplicationInterface + * @since 5.2.1 + */ + public CMSApplicationInterface $app; + /** * The input class * @@ -149,16 +158,19 @@ class HtmlView extends BaseHtmlView // set params $this->params = ComponentHelper::getParams('com_componentbuilder'); $this->useCoreUI = true; - // Assign the variables - $this->form ??= $this->get('Form'); - $this->item = $this->get('Item'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); - $this->state = $this->get('State'); + // Load module values + $model = $this->getModel(); + $this->form ??= $model->getForm(); + $this->item = $model->getItem(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); + $this->state = $model->getState(); // get action permissions $this->canDo = ComponentbuilderHelper::getActions('validation_rule', $this->item); + // get application + $this->app ??= Factory::getApplication(); // get input - $this->input ??= Factory::getApplication()->input; + $this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input; $this->ref = $this->input->get('ref', 0, 'word'); $this->refid = $this->input->get('refid', 0, 'int'); $return = $this->input->get('return', null, 'base64'); @@ -215,7 +227,7 @@ class HtmlView extends BaseHtmlView */ protected function addToolbar(): void { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; @@ -303,7 +315,7 @@ class HtmlView extends BaseHtmlView */ protected function addModalToolbar() { - Factory::getApplication()->input->set('hidemainmenu', true); + Factory::getApplication()->getInput()->set('hidemainmenu', true); $user = $this->getCurrentUser(); $userId = $user->id; $isNew = $this->item->id == 0; diff --git a/admin/src/View/Validation_rules/HtmlView.php b/admin/src/View/Validation_rules/HtmlView.php index d9948186b..5618d1d83 100644 --- a/admin/src/View/Validation_rules/HtmlView.php +++ b/admin/src/View/Validation_rules/HtmlView.php @@ -122,12 +122,13 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null): void { - // Assign data to the view - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->styles = $this->get('Styles'); - $this->scripts = $this->get('Scripts'); + // Load module values + $model = $this->getModel(); + $this->items = $model->getItems(); + $this->pagination = $model->getPagination(); + $this->state = $model->getState(); + $this->styles = $model->getStyles(); + $this->scripts = $model->getScripts(); $this->user ??= $this->getCurrentUser(); // Load the filter form from xml. $this->filterForm = $this->get('FilterForm'); diff --git a/admin/tmpl/admin_views/modal.php b/admin/tmpl/admin_views/modal.php index 7b8e958f3..d2b76d7dc 100644 --- a/admin/tmpl/admin_views/modal.php +++ b/admin/tmpl/admin_views/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/admins_custom_tabs/modal.php b/admin/tmpl/admins_custom_tabs/modal.php index ee2136933..ffc0f7bfa 100644 --- a/admin/tmpl/admins_custom_tabs/modal.php +++ b/admin/tmpl/admins_custom_tabs/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/admins_fields/modal.php b/admin/tmpl/admins_fields/modal.php index 77eaaa879..136192d65 100644 --- a/admin/tmpl/admins_fields/modal.php +++ b/admin/tmpl/admins_fields/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/admins_fields_conditions/modal.php b/admin/tmpl/admins_fields_conditions/modal.php index 7cec6735c..d39472a36 100644 --- a/admin/tmpl/admins_fields_conditions/modal.php +++ b/admin/tmpl/admins_fields_conditions/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/admins_fields_relations/modal.php b/admin/tmpl/admins_fields_relations/modal.php index 6f066a203..740187c93 100644 --- a/admin/tmpl/admins_fields_relations/modal.php +++ b/admin/tmpl/admins_fields_relations/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/class_extendings/modal.php b/admin/tmpl/class_extendings/modal.php index 0c4ec30d5..9eba2eb23 100644 --- a/admin/tmpl/class_extendings/modal.php +++ b/admin/tmpl/class_extendings/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/class_methods/modal.php b/admin/tmpl/class_methods/modal.php index e6153c553..282a9be00 100644 --- a/admin/tmpl/class_methods/modal.php +++ b/admin/tmpl/class_methods/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/class_properties/modal.php b/admin/tmpl/class_properties/modal.php index 44ca91739..48463e107 100644 --- a/admin/tmpl/class_properties/modal.php +++ b/admin/tmpl/class_properties/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/compiler/default.php b/admin/tmpl/compiler/default.php index 2bfa5a167..08a620a29 100644 --- a/admin/tmpl/compiler/default.php +++ b/admin/tmpl/compiler/default.php @@ -27,12 +27,12 @@ use Joomla\CMS\Session\Session; // No direct access to this file defined('_JEXEC') or die; -$this->app->input->set('hidemainmenu', false); +$this->app->getInput()->set('hidemainmenu', false); $selectNotice = '

' . Text::_('COM_COMPONENTBUILDER_HI') . ' ' . $this->user->name . '

'; $selectNotice .= '

' . Text::_('COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE') . '

'; // set the noticeboard options -$noticeboardOptions = array('vdm', 'pro'); +$noticeboardOptions = ['vdm', 'pro']; ?> canDo->get('compiler.access')): ?> diff --git a/admin/tmpl/components_admin_views/modal.php b/admin/tmpl/components_admin_views/modal.php index 5ce6102dc..8f11c7d57 100644 --- a/admin/tmpl/components_admin_views/modal.php +++ b/admin/tmpl/components_admin_views/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_config/modal.php b/admin/tmpl/components_config/modal.php index 66c6f073a..0b97139de 100644 --- a/admin/tmpl/components_config/modal.php +++ b/admin/tmpl/components_config/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_custom_admin_menus/modal.php b/admin/tmpl/components_custom_admin_menus/modal.php index e8c4058de..f3b93af34 100644 --- a/admin/tmpl/components_custom_admin_menus/modal.php +++ b/admin/tmpl/components_custom_admin_menus/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_custom_admin_views/modal.php b/admin/tmpl/components_custom_admin_views/modal.php index e67464ff0..2311daa30 100644 --- a/admin/tmpl/components_custom_admin_views/modal.php +++ b/admin/tmpl/components_custom_admin_views/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_dashboard/modal.php b/admin/tmpl/components_dashboard/modal.php index 8b4adf84b..48755681d 100644 --- a/admin/tmpl/components_dashboard/modal.php +++ b/admin/tmpl/components_dashboard/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_files_folders/modal.php b/admin/tmpl/components_files_folders/modal.php index b3a03f517..79a73a3be 100644 --- a/admin/tmpl/components_files_folders/modal.php +++ b/admin/tmpl/components_files_folders/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_modules/modal.php b/admin/tmpl/components_modules/modal.php index ff25ff308..5d02a2a95 100644 --- a/admin/tmpl/components_modules/modal.php +++ b/admin/tmpl/components_modules/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_mysql_tweaks/modal.php b/admin/tmpl/components_mysql_tweaks/modal.php index 1da8f836d..82b871e6a 100644 --- a/admin/tmpl/components_mysql_tweaks/modal.php +++ b/admin/tmpl/components_mysql_tweaks/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_placeholders/modal.php b/admin/tmpl/components_placeholders/modal.php index efc173938..c0f84d809 100644 --- a/admin/tmpl/components_placeholders/modal.php +++ b/admin/tmpl/components_placeholders/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_plugins/modal.php b/admin/tmpl/components_plugins/modal.php index 316ecbe79..674dcaacd 100644 --- a/admin/tmpl/components_plugins/modal.php +++ b/admin/tmpl/components_plugins/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_routers/modal.php b/admin/tmpl/components_routers/modal.php index 968e7097f..69bc30226 100644 --- a/admin/tmpl/components_routers/modal.php +++ b/admin/tmpl/components_routers/modal.php @@ -25,12 +25,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_site_views/modal.php b/admin/tmpl/components_site_views/modal.php index d59be40a4..ae2729591 100644 --- a/admin/tmpl/components_site_views/modal.php +++ b/admin/tmpl/components_site_views/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/components_updates/modal.php b/admin/tmpl/components_updates/modal.php index 67f3e0fed..a5904f419 100644 --- a/admin/tmpl/components_updates/modal.php +++ b/admin/tmpl/components_updates/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/custom_admin_views/modal.php b/admin/tmpl/custom_admin_views/modal.php index a073d7571..b1b18a31f 100644 --- a/admin/tmpl/custom_admin_views/modal.php +++ b/admin/tmpl/custom_admin_views/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/custom_codes/modal.php b/admin/tmpl/custom_codes/modal.php index e338b51f5..066a7f4ee 100644 --- a/admin/tmpl/custom_codes/modal.php +++ b/admin/tmpl/custom_codes/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/dynamic_gets/modal.php b/admin/tmpl/dynamic_gets/modal.php index 6322760ce..1eea89de4 100644 --- a/admin/tmpl/dynamic_gets/modal.php +++ b/admin/tmpl/dynamic_gets/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/fields/modal.php b/admin/tmpl/fields/modal.php index 9d1139c1c..d1112bb3b 100644 --- a/admin/tmpl/fields/modal.php +++ b/admin/tmpl/fields/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/fieldtypes/modal.php b/admin/tmpl/fieldtypes/modal.php index fc87223e8..439fcee1d 100644 --- a/admin/tmpl/fieldtypes/modal.php +++ b/admin/tmpl/fieldtypes/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/help_documents/modal.php b/admin/tmpl/help_documents/modal.php index 0b68f885e..c86e699c3 100644 --- a/admin/tmpl/help_documents/modal.php +++ b/admin/tmpl/help_documents/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_components/modal.php b/admin/tmpl/joomla_components/modal.php index 24df86aee..c4a8d827c 100644 --- a/admin/tmpl/joomla_components/modal.php +++ b/admin/tmpl/joomla_components/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_modules/modal.php b/admin/tmpl/joomla_modules/modal.php index ba398a7aa..1a3268597 100644 --- a/admin/tmpl/joomla_modules/modal.php +++ b/admin/tmpl/joomla_modules/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_modules_files_folders_urls/modal.php b/admin/tmpl/joomla_modules_files_folders_urls/modal.php index 52a34b570..b4ac2fd87 100644 --- a/admin/tmpl/joomla_modules_files_folders_urls/modal.php +++ b/admin/tmpl/joomla_modules_files_folders_urls/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_modules_updates/modal.php b/admin/tmpl/joomla_modules_updates/modal.php index 26b03c425..1624e5946 100644 --- a/admin/tmpl/joomla_modules_updates/modal.php +++ b/admin/tmpl/joomla_modules_updates/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_plugin_groups/modal.php b/admin/tmpl/joomla_plugin_groups/modal.php index 26ba7ec68..c64dedf02 100644 --- a/admin/tmpl/joomla_plugin_groups/modal.php +++ b/admin/tmpl/joomla_plugin_groups/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_plugins/modal.php b/admin/tmpl/joomla_plugins/modal.php index 3e3c46020..750c7c052 100644 --- a/admin/tmpl/joomla_plugins/modal.php +++ b/admin/tmpl/joomla_plugins/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_plugins_files_folders_urls/modal.php b/admin/tmpl/joomla_plugins_files_folders_urls/modal.php index 38306dc92..4b5712dbe 100644 --- a/admin/tmpl/joomla_plugins_files_folders_urls/modal.php +++ b/admin/tmpl/joomla_plugins_files_folders_urls/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_plugins_updates/modal.php b/admin/tmpl/joomla_plugins_updates/modal.php index 9fec81ce0..3e28e2d9c 100644 --- a/admin/tmpl/joomla_plugins_updates/modal.php +++ b/admin/tmpl/joomla_plugins_updates/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/joomla_powers/modal.php b/admin/tmpl/joomla_powers/modal.php index 5550a4a51..69a4854c3 100644 --- a/admin/tmpl/joomla_powers/modal.php +++ b/admin/tmpl/joomla_powers/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/language_translations/modal.php b/admin/tmpl/language_translations/modal.php index 3eefe0032..21d977527 100644 --- a/admin/tmpl/language_translations/modal.php +++ b/admin/tmpl/language_translations/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/languages/modal.php b/admin/tmpl/languages/modal.php index 1013e039a..d3864eb56 100644 --- a/admin/tmpl/languages/modal.php +++ b/admin/tmpl/languages/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/layouts/modal.php b/admin/tmpl/layouts/modal.php index a1e6f1d87..3eb5f827b 100644 --- a/admin/tmpl/layouts/modal.php +++ b/admin/tmpl/layouts/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/libraries/modal.php b/admin/tmpl/libraries/modal.php index 163711404..1caab0113 100644 --- a/admin/tmpl/libraries/modal.php +++ b/admin/tmpl/libraries/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/libraries_config/modal.php b/admin/tmpl/libraries_config/modal.php index 1ad8c8e77..1d47fb8b5 100644 --- a/admin/tmpl/libraries_config/modal.php +++ b/admin/tmpl/libraries_config/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/libraries_files_folders_urls/modal.php b/admin/tmpl/libraries_files_folders_urls/modal.php index 9492f0f3a..5b47142ad 100644 --- a/admin/tmpl/libraries_files_folders_urls/modal.php +++ b/admin/tmpl/libraries_files_folders_urls/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/placeholders/modal.php b/admin/tmpl/placeholders/modal.php index ed06fdee8..7d93d68ea 100644 --- a/admin/tmpl/placeholders/modal.php +++ b/admin/tmpl/placeholders/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/powers/modal.php b/admin/tmpl/powers/modal.php index f22000093..0e56191cd 100644 --- a/admin/tmpl/powers/modal.php +++ b/admin/tmpl/powers/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/repositories/modal.php b/admin/tmpl/repositories/modal.php index d66ab1f4b..153f7ac59 100644 --- a/admin/tmpl/repositories/modal.php +++ b/admin/tmpl/repositories/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/search/default.php b/admin/tmpl/search/default.php index 0367f0912..24ad25a16 100644 --- a/admin/tmpl/search/default.php +++ b/admin/tmpl/search/default.php @@ -28,7 +28,7 @@ use Joomla\CMS\Session\Session; defined('_JEXEC') or die; // allow main menu selection -$this->app->input->set('hidemainmenu', false); +$this->app->getInput()->set('hidemainmenu', false); // set the basu URL $url_base = Uri::base() . 'index.php?option=com_componentbuilder'; diff --git a/admin/tmpl/servers/modal.php b/admin/tmpl/servers/modal.php index 493b7e4c8..227b8ee9c 100644 --- a/admin/tmpl/servers/modal.php +++ b/admin/tmpl/servers/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/site_views/modal.php b/admin/tmpl/site_views/modal.php index e6a218b92..10d435f23 100644 --- a/admin/tmpl/site_views/modal.php +++ b/admin/tmpl/site_views/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/snippet_types/modal.php b/admin/tmpl/snippet_types/modal.php index 4f98fef68..584bd3a10 100644 --- a/admin/tmpl/snippet_types/modal.php +++ b/admin/tmpl/snippet_types/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/snippets/modal.php b/admin/tmpl/snippets/modal.php index b20e0ca78..b43b07efc 100644 --- a/admin/tmpl/snippets/modal.php +++ b/admin/tmpl/snippets/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/templates/modal.php b/admin/tmpl/templates/modal.php index d4edab45a..dafb308c7 100644 --- a/admin/tmpl/templates/modal.php +++ b/admin/tmpl/templates/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/admin/tmpl/validation_rules/modal.php b/admin/tmpl/validation_rules/modal.php index ebbb69088..186c6754e 100644 --- a/admin/tmpl/validation_rules/modal.php +++ b/admin/tmpl/validation_rules/modal.php @@ -24,12 +24,14 @@ defined('_JEXEC') or die; $app = Factory::getApplication(); -if ($app->isClient('site')) { +if ($app->isClient('site')) +{ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } // dynamic selection of title key (link in modal) -$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word'); +$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; +$this->modalTitleKey = $input->get('titleKey', 'id', 'word'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); diff --git a/componentbuilder.xml b/componentbuilder.xml index 3aca5b08a..4847fd958 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 2nd September, 2025 + 3rd September, 2025 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 5.1.2-alpha2 + 5.1.2-alpha3 Component Builder (v.5.1.2-alpha2) +

Component Builder (v.5.1.2-alpha3)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 8da796040..0ffea8c44 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -152,7 +152,7 @@ 5.1.2-alpha https://dev.vdm.io - https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha2.zip + https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha3.zip alpha @@ -167,10 +167,10 @@ pkg_component_builder package admininstrator - 5.1.2-alpha2 + 5.1.2-alpha3 https://dev.vdm.io - https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha2.zip + https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha3.zip alpha diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php index d60509e2a..fa17928e8 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php @@ -54,7 +54,7 @@ abstract class ComponentConfig extends FunctionRegistry */ public function __construct(?Input $input = null, ?JoomlaRegistry $params = null) { - $this->input = $input ?: Factory::getApplication()->input; + $this->input = $input ?: Factory::getApplication()->getInput(); $this->params = $params ?: Helper::getParams('com_componentbuilder'); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFive/Model/CheckInNow.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFive/Model/CheckInNow.php index e25b25299..a4f98f529 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFive/Model/CheckInNow.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFive/Model/CheckInNow.php @@ -72,7 +72,7 @@ final class CheckInNow implements CheckInNowInterface $checkin .= PHP_EOL . Indent::_(3) . "\$query->where($db->quoteName('checked_out') . ' >= 0');"; - Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; $checkin .= PHP_EOL . Indent::_(3) . "\$db->setQuery(\$query, 0, 1);"; $checkin .= PHP_EOL . Indent::_(3) . "\$db->execute();"; $checkin .= PHP_EOL . Indent::_(3) . "if (\$db->getNumRows())"; diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFour/Model/CheckInNow.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFour/Model/CheckInNow.php index 9ad76ef01..4e57adf50 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFour/Model/CheckInNow.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaFour/Model/CheckInNow.php @@ -72,7 +72,7 @@ final class CheckInNow implements CheckInNowInterface $checkin .= PHP_EOL . Indent::_(3) . "\$query->where($db->quoteName('checked_out') . ' >= 0');"; - Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; $checkin .= PHP_EOL . Indent::_(3) . "\$db->setQuery(\$query, 0, 1);"; $checkin .= PHP_EOL . Indent::_(3) . "\$db->execute();"; $checkin .= PHP_EOL . Indent::_(3) . "if (\$db->getNumRows())"; diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaThree/Model/CheckInNow.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaThree/Model/CheckInNow.php index fbbd758bf..46bebe87a 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaThree/Model/CheckInNow.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaThree/Model/CheckInNow.php @@ -71,7 +71,7 @@ final class CheckInNow implements CheckInNowInterface $checkin .= PHP_EOL . Indent::_(3) . "\$query->where(\$db->quoteName('checked_out') . ' != 0');"; - Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; $checkin .= PHP_EOL . Indent::_(3) . "\$db->setQuery(\$query, 0, 1);"; $checkin .= PHP_EOL . Indent::_(3) . "\$db->execute();"; $checkin .= PHP_EOL . Indent::_(3) . "if (\$db->getNumRows())"; diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Dynamicget/FieldonContentPrepare.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Dynamicget/FieldonContentPrepare.php index e9e3aee6c..a06a13dfc 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Dynamicget/FieldonContentPrepare.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Dynamicget/FieldonContentPrepare.php @@ -121,13 +121,24 @@ final class FieldonContentPrepare // build decoder string if (empty($runplugins)) { - $runplugins = PHP_EOL . $tab . Indent::_(1) . "//" - . Line::_(__Line__, __Class__) - . " Load the JEvent Dispatcher"; - $runplugins .= PHP_EOL . $tab . Indent::_(1) - . "PluginHelper::importPlugin('content');"; - $runplugins .= PHP_EOL . $tab . Indent::_(1) - . '$this->_dispatcher = Joomla__'.'_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();'; + if ($this->config->get('joomla_version', 3) == 3) + { + $runplugins = PHP_EOL . $tab . Indent::_(1) . "//" + . Line::_(__Line__, __Class__) + . " Load the Event Dispatcher"; + $runplugins .= PHP_EOL . $tab . Indent::_(1) + . "Joomla__" . "_7934665b_e432_4ec6_b38d_27bf32730eb9___Power::importPlugin('content');"; + $runplugins .= PHP_EOL . $tab . Indent::_(1) + . '$this->_dispatcher = Joomla__'.'_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();'; + } + else + { + $runplugins = PHP_EOL . $tab . Indent::_(1) . "//" + . Line::_(__Line__, __Class__) + . " Load the Event Dispatcher"; + $runplugins .= PHP_EOL . $tab . Indent::_(1) + . "Joomla__" . "_7934665b_e432_4ec6_b38d_27bf32730eb9___Power::importPlugin('content');"; + } } if (!$params) @@ -159,10 +170,28 @@ final class FieldonContentPrepare . "//" . Line::_(__Line__, __Class__) . " Since all values are now in text (Joomla Limitation), we also add the field name (" . $field . ") to context"; - $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) - . '$this->_dispatcher->triggerEvent("onContentPrepare", array(\'' - . $context . '.' . $field . '\', &$_' . $field - . ', &$params, 0));'; + if ($this->config->get('joomla_version', 3) == 3) + { + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) + . '$this->_dispatcher->triggerEvent("onContentPrepare", array(\'' + . $context . '.' . $field . '\', &$_' . $field + . ', &$params, 0));'; + } + else + { + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "//" . Line::_(__Line__, __Class__) . " onContentPrepare Event Trigger"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "\$this->getDispatcher()->dispatch('onContentPrepare',"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "new Joomla__" . "_6ee61914_64ed_4a3a_b156_dfc4891ae00d___Power("; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "'onContentPrepare',"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "["; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "'context' => '{$context}.{$field}',"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "'subject' => \$_{$field},"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "'params' => \$params,"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "'page' => 0"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "]"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . ")"; + $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . ");"; + } } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFive/InputButton.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFive/InputButton.php index 308cac4b3..ee6ff6ca5 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFive/InputButton.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFive/InputButton.php @@ -155,7 +155,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; - $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; + $addButton[] = Indent::_(3) . "\$jinput = method_exists(\$app, 'getInput') ? \$app->getInput() : \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; $addButton[] = Indent::_(3) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFour/InputButton.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFour/InputButton.php index cdc0cba39..e68dcecd8 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFour/InputButton.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaFour/InputButton.php @@ -155,7 +155,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; - $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; + $addButton[] = Indent::_(3) . "\$jinput = method_exists(\$app, 'getInput') ? \$app->getInput() : \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; $addButton[] = Indent::_(3) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php index 2e2762dec..266f2ceed 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php @@ -148,14 +148,14 @@ final class InputButton implements InputButtonInterface . " if true set button"; $addButton[] = Indent::_(2) . "if (\$set_button === 'true')"; $addButton[] = Indent::_(2) . "{"; - $addButton[] = Indent::_(3) . "\$button = array();"; - $addButton[] = Indent::_(3) . "\$script = array();"; + $addButton[] = Indent::_(3) . "\$button = [];"; + $addButton[] = Indent::_(3) . "\$script = [];"; $addButton[] = Indent::_(3) . "\$button_code_name = \$this->getAttribute('name');"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; - $addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; - $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; + $addButton[] = Indent::_(3) . "\$app = Joomla__" . "_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; + $addButton[] = Indent::_(3) . "\$jinput = method_exists(\$app, 'getInput') ? \$app->getInput() : \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; $addButton[] = Indent::_(3) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php index 088e66476..0ceeaa882 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php @@ -1335,7 +1335,7 @@ class Infusion extends Interpretation __LINE__,__CLASS__ ) . " hide the main menu" . PHP_EOL . Indent::_(2) - . "\$this->app->input->set('hidemainmenu', true);" + . "\$this->app->getInput()->set('hidemainmenu', true);" ); } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php index a79f17736..d5f9ec842 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php @@ -2668,12 +2668,16 @@ class Interpretation extends Fields $view['settings']->main_get->plugin_events )) { - // load the dispatcher - $method .= PHP_EOL . Indent::_(2) . "//" . Line::_( - __LINE__,__CLASS__ - ) . " Initialise dispatcher."; - $method .= PHP_EOL . Indent::_(2) - . "\$dispatcher = JEventDispatcher::getInstance();"; + + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + // load the dispatcher + $method .= PHP_EOL . Indent::_(2) . "//" . Line::_( + __LINE__,__CLASS__ + ) . " Initialise dispatcher."; + $method .= PHP_EOL . Indent::_(2) + . "\$dispatcher = JEventDispatcher::getInstance();"; + } } if ($view['settings']->main_get->gettype == 1) { @@ -2681,8 +2685,16 @@ class Interpretation extends Fields $method .= PHP_EOL . Indent::_(2) . "//" . Line::_( __LINE__,__CLASS__ ) . " Initialise variables."; - $method .= PHP_EOL . Indent::_(2) - . "\$this->item = \$this->get('Item');"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $method .= PHP_EOL . Indent::_(2) + . "\$this->item = \$this->get('Item');"; + } + else + { + $method .= PHP_EOL . Indent::_(2) + . "\$this->item = \$model->getItem();"; + } } elseif ($view['settings']->main_get->gettype == 2) { @@ -2690,13 +2702,27 @@ class Interpretation extends Fields $method .= PHP_EOL . Indent::_(2) . "//" . Line::_( __LINE__,__CLASS__ ) . " Initialise variables."; - $method .= PHP_EOL . Indent::_(2) - . "\$this->items = \$this->get('Items');"; - // only add if pagination is requered - if ($view['settings']->main_get->pagination == 1) + if (CFactory::_('Config')->get('joomla_version', 3) == 3) { $method .= PHP_EOL . Indent::_(2) - . "\$this->pagination = \$this->get('Pagination');"; + . "\$this->items = \$this->get('Items');"; + // only add if pagination is requered + if ($view['settings']->main_get->pagination == 1) + { + $method .= PHP_EOL . Indent::_(2) + . "\$this->pagination = \$this->get('Pagination');"; + } + } + else + { + $method .= PHP_EOL . Indent::_(2) + . "\$this->items = \$model->getItems();"; + // only add if pagination is requered + if ($view['settings']->main_get->pagination == 1) + { + $method .= PHP_EOL . Indent::_(2) + . "\$this->pagination = \$model->getPagination();"; + } } } // add the custom get methods @@ -2710,9 +2736,18 @@ class Interpretation extends Fields $custom_get_name = str_replace( 'get', '', (string) $custom_get->getcustom ); - $method .= PHP_EOL . Indent::_(2) . "\$this->" - . StringHelper::safe($custom_get_name) - . " = \$this->get('" . $custom_get_name . "');"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $method .= PHP_EOL . Indent::_(2) . "\$this->" + . StringHelper::safe($custom_get_name) + . " = \$this->get('" . $custom_get_name . "');"; + } + else + { + $method .= PHP_EOL . Indent::_(2) . "\$this->" + . StringHelper::safe($custom_get_name) + . " = \$model->{$custom_get->getcustom}();"; + } } } // add custom script @@ -2769,8 +2804,16 @@ class Interpretation extends Fields $method .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_( __LINE__,__CLASS__ ) . " Check for errors."; - $method .= PHP_EOL . Indent::_(2) - . "if (count(\$errors = \$this->get('Errors')))"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $method .= PHP_EOL . Indent::_(2) + . "if (count(\$errors = \$model->get('Errors')))"; + } + else + { + $method .= PHP_EOL . Indent::_(2) + . "if (count(\$errors = \$model->getErrors()))"; + } $method .= PHP_EOL . Indent::_(2) . "{"; $method .= PHP_EOL . Indent::_(3) . "throw new \Exception(implode(PHP_EOL, \$errors), 500);"; @@ -2788,7 +2831,7 @@ class Interpretation extends Fields . "Super_" . "__91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$this->item))"; $method .= PHP_EOL . Indent::_(2) . "{"; $method .= PHP_EOL . Indent::_(3) - . "PluginHelper::importPlugin('content');"; + . "Joomla__" . "_7934665b_e432_4ec6_b38d_27bf32730eb9___Power::importPlugin('content');"; $method .= PHP_EOL . Indent::_(3) . "//" . Line::_( __LINE__,__CLASS__ ) . " Setup Event Object."; @@ -2801,28 +2844,62 @@ class Interpretation extends Fields . "\$params = (isset(\$this->item->params) && " . "Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;"; // load the defaults - foreach ( - $view['settings']->main_get->plugin_events as $plugin_event - ) + foreach ($view['settings']->main_get->plugin_events as $plugin_event) { // load the events if ('onContentPrepare' === $plugin_event) { // TODO the onContentPrepare already gets triggered on the fields of its relation // $method .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " onContentPrepare Event Trigger."; - // $method .= PHP_EOL . Indent::_(2) . "\$dispatcher->trigger('onContentPrepare', array ('com_" . CFactory::_('Config')->component_code_name . ".article', &\$this->item, &\$this->params, 0));"; + // if (CFactory::_('Config')->get('joomla_version', 3) == 3) + // { + // $method .= PHP_EOL . Indent::_(2) . "\$dispatcher->trigger('onContentPrepare', ['com_" . CFactory::_('Config')->component_code_name . ".article', &\$this->item, &\$this->params, 0]);"; + // } + } else { - $method .= PHP_EOL . Indent::_(3) . "//" - . Line::_(__Line__, __Class__) . " " . $plugin_event - . " Event Trigger."; - $method .= PHP_EOL . Indent::_(3) - . "\$results = \$dispatcher->trigger('" - . $plugin_event . "', array('com_" - . CFactory::_('Config')->component_code_name . "." - . $view['settings']->context - . "', &\$this->item, &\$params, 0));"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $method .= PHP_EOL . Indent::_(3) . "//" + . Line::_(__Line__, __Class__) . " " . $plugin_event . " Event Trigger."; + $method .= PHP_EOL . Indent::_(3) + . "\$results = \$dispatcher->trigger('" + . $plugin_event . "', array('com_" + . CFactory::_('Config')->component_code_name . "." + . $view['settings']->context + . "', &\$this->item, &\$params, 0));"; + } + else + { + $joomla_power = 'error'; + if ('onContentAfterTitle' === $plugin_event) + { + $joomla_power = "Joomla__" . "_fa9c1320_a115_452a_a0a8_534fcdea490b___Power"; + } + elseif ('onContentBeforeDisplay' === $plugin_event) + { + $joomla_power = "Joomla__" . "_fc1ab159_0df1_4be8_babd_0bd18d35f467___Power"; + } + elseif ('onContentAfterDisplay' === $plugin_event) + { + $joomla_power = "Joomla__" . "_a42c4e8e_ead1_442d_8b9a_99236a1ee9a9___Power"; + } + + $method .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " {$plugin_event} Event Trigger"; + $method .= PHP_EOL . Indent::_(3) . "\$results = \$this->getDispatcher()->dispatch('{$plugin_event}',"; + $method .= PHP_EOL . Indent::_(4) . "new {$joomla_power}("; + $method .= PHP_EOL . Indent::_(5) . "'{$plugin_event}',"; + $method .= PHP_EOL . Indent::_(5) . "["; + $method .= PHP_EOL . Indent::_(6) . "'context' => '" . CFactory::_('Config')->component_code_name . "." . $view['settings']->context . "',"; + $method .= PHP_EOL . Indent::_(6) . "'subject' => \$this->item,"; + $method .= PHP_EOL . Indent::_(6) . "'params' => \$params,"; + $method .= PHP_EOL . Indent::_(6) . "'page' => 0"; + $method .= PHP_EOL . Indent::_(5) . "]"; + $method .= PHP_EOL . Indent::_(4) . ")"; + $method .= PHP_EOL . Indent::_(3) . ")->getArgument('result', []);"; + } + $method .= PHP_EOL . Indent::_(3) . '$this->item->event->' . $plugin_event . ' = trim(implode("\n", $results));'; @@ -4449,7 +4526,7 @@ class Interpretation extends Fields && isset($this->customAdminViewListId[$view])) { $input = PHP_EOL . Indent::_(1) - . ''; + . ''; } return $input . PHP_EOL @@ -16750,7 +16827,9 @@ class Interpretation extends Fields else { $getForm[] = PHP_EOL . Indent::_(2) - . "\$jinput = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;"; + . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; + $getForm[] = PHP_EOL . Indent::_(2) + . "\$jinput = method_exists(\$app, 'getInput') ? \$app->getInput() : \$app->input;"; $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_( __LINE__,__CLASS__ ) @@ -17679,7 +17758,7 @@ class Interpretation extends Fields // build toolbar $toolBar - = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input->set('hidemainmenu', true);"; + = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput()->set('hidemainmenu', true);"; $toolBar .= PHP_EOL . Indent::_(2) . "Joomla__"."_0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Text:" . ":_('" . $viewNameLang_readonly . "'), '" . $nameSingleCode . "');"; @@ -17708,7 +17787,7 @@ class Interpretation extends Fields ); // build toolbar $toolBar - = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input->set('hidemainmenu', true);"; + = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput()->set('hidemainmenu', true);"; if (CFactory::_('Config')->get('joomla_version', 3) == 3) { $toolBar .= PHP_EOL . Indent::_(2) @@ -17925,7 +18004,7 @@ class Interpretation extends Fields // build toolbar $toolBar - = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input->set('hidemainmenu', true);"; + = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput()->set('hidemainmenu', true);"; $toolBar .= PHP_EOL . Indent::_(2) . "Joomla__"."_0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Text:" . ":_('" . $viewNameLang_readonly . "'), '" . $nameSingleCode . "');"; @@ -17954,7 +18033,7 @@ class Interpretation extends Fields ); // build toolbar $toolBar - = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input->set('hidemainmenu', true);"; + = "Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput()->set('hidemainmenu', true);"; if (CFactory::_('Config')->get('joomla_version', 3) == 3) { $toolBar .= PHP_EOL . Indent::_(2) @@ -18074,7 +18153,7 @@ class Interpretation extends Fields $state .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if the form was submitted"; $state .= PHP_EOL . Indent::_(2) . "\$formSubmited" - . " = \$app->input->post->get('form_submited');"; + . " = \$input->post->get('form_submited');"; $new_filter = true; } // add the default populate states (this must be added first) @@ -18150,7 +18229,7 @@ class Interpretation extends Fields . "if (\$formSubmited)"; $state .= PHP_EOL . Indent::_(2) . "{"; $state .= PHP_EOL . Indent::_(3) . "\$" . $filter['code'] - . " = \$app->input->post->get('" . $filter['code'] . "');"; + . " = \$input->post->get('" . $filter['code'] . "');"; $state .= PHP_EOL . Indent::_(3) . "\$this->setState('filter." . $filter['code'] . "', \$" . $filter['code'] . ");";