Release of 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.
This commit is contained in:
2025-09-03 20:34:41 +00:00
parent 129cdfe8da
commit c0aeb798db
381 changed files with 2788 additions and 1601 deletions

View File

@@ -1,13 +1,18 @@
# v5.1.2-alpha2
# v5.1.2-alpha3
- 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
- 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 5s native event dispatcher via the models 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.1

View File

@@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 5.1.2-alpha2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 5.1.2-alpha3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();

View File

@@ -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.

View File

@@ -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.

View File

@@ -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);

View File

@@ -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);

View File

@@ -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###

View File

@@ -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

View File

@@ -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');

View File

@@ -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');

View File

@@ -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');

View File

@@ -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

View File

@@ -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();

View File

@@ -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###

View File

@@ -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');

View File

@@ -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;

View File

@@ -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();

View File

@@ -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();

View File

@@ -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');

View File

@@ -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']))

View File

@@ -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

View File

@@ -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');

View File

@@ -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###

View File

@@ -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###

File diff suppressed because one or more lines are too long

View File

@@ -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

View File

@@ -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]))
{

View File

@@ -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');

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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',

View File

@@ -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',

View File

@@ -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',

View File

@@ -43,7 +43,7 @@ class FilebehaviourField 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);
$options[] = Html::_('select.option', '1', Text::_('COM_COMPONENTBUILDER_ALWAYS_ADD'));

View File

@@ -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

View File

@@ -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

View File

@@ -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',

View File

@@ -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',

View File

@@ -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')];
}
}

View File

@@ -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',

View File

@@ -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'));

View File

@@ -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

View File

@@ -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'));

View File

@@ -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

View File

@@ -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);

View File

@@ -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',

View File

@@ -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',

View File

@@ -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)

View File

@@ -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'));

View File

@@ -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 ||";

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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;

View File

@@ -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())

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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())

View File

@@ -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())

View File

@@ -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'))

View File

@@ -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);
}

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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'))

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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())

View File

@@ -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'))

View File

@@ -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())

Some files were not shown because too many files have changed in this diff Show More