Compare commits

...

2 Commits

Author SHA1 Message Date
b7682a5601 Release of v6.1.2-alpha4
Add Joomla 6 build option :).
2025-09-09 20:26:37 +00:00
c0aeb798db 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.
2025-09-03 20:34:41 +00:00
450 changed files with 15109 additions and 1865 deletions

View File

@@ -1,13 +1,20 @@
# v5.1.2-alpha2
# v6.1.2-alpha4
- Add Joomla 6 build option :)
# v6.1.2-alpha
- Add Joomla 6 build option
- Fix the template and layout linker for packages.
- Add native module builder for Joomla 4/5
- Refactor dynamic get methods into dedicated classes
- Move Joomla DB handling into compiler injector flow
- Fix auto-check(in) method for Joomla 4/5 compatibility
# v5.1.2-alpha
- Fix the template and layout linker for packages.
- 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 5's 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.1
@@ -37,149 +44,6 @@
- Fix bug in the filter of Languages by linked entities. #1230
- Adds option to export Language Translations.
# v5.1.0
- Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class
- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run.
- Added new import powers for custom import of spreadsheets.
- Move the setDocument and _prepareDocument above the display in the site view and custom admin view.
- Update the trashhelper layout to work in Joomla 5.
- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.
- Fix Save failed issue in dynamicGet. #1148
- Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]
- Add the DateHelper class and improve the date methods.
- Add simple SessionHelper class.
- Add first classes for the new import engine.
- Improve the [VDM Registry] to be Joomla Registry Compatible
- Move all registries to the [VDM Registry] class
- Fix Checked Out to be null and not 0. (#1194)
- Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194)
- Update all core date fields in table class. (#1188)
- Update created_by, modified_by, checked_out fields in table class.
- Implementation of the decentralized Super-Power CORE repository network. (#1190)
- Fix the noticeboard to display Llewellyn's Joomla Social feed
- Started compiling JCB5 on Joomla 5 with PHP 8.2
- Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically)
- Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned
- Move all internal ID linking to GUID inside of JCB 5
- Updated the admin-tab-fields in add-fields view. #1205
- Remove Custom Import Tab from admin view
- Improved the customcode and placeholder search features
# v5.0.3
- Add [push] option to powers area.
- Fix error in [Save As Copy] functionality for the library. #1162
- Fix error when no components exist. #1164
- Fix search page error caused by File class.
- Fix UserGroupList compiler triggers. #1100
- Add power integration field type with [init, reset, push] options.
- Fix default database fields to allow NULL values. #1169
- Fix power list field to support search functionality. #1167
- Expand Demo component in JCB v4 to include advanced features.
- Fix missing working path in zip creation.
- Fix dynamic retrieval for the demo site view.
- Fix demo site view to display files.
- Fix field type initialization message.
- Fix type-agnostic comparisons by casting to CHAR in dynamic get joins.
- Fix dynamic download for site area to use correct namespace.
- Fix missing edit button on fields in related views.
- Fix dashboard display issues.
- Restore search option in the [use] field for related views.
- Fix namespace issue causing linker to break.
# v5.0.2
- Fix site view form missing classes in J4+
- Fix permissions tab in items in J4+
- Fix site display controller checkEditId function in J4+
- Add class methods to the HtmlView classes in J4+
- Fix broken toolbar call in HtmlView in J4+
- Fix missing scripts and styles fields and methods in the site admin view model
- Update subform field layout across JCB for cleaner look
- Remove expansion feature
- Fix helper area
- Fix database mySql update in J4+
- Remove phpspreadsheet completely from Joomla 4+
- Add option to use powers in preflight event in the installer class
- Fix abstract schema class function check default index warring
- Fix dynamicGet so that the table values will load again. #1155
- Add more pure JS to the dynamic get area
- Add native plugin builder for Joomla 4 & 5
- Add basic API for admin views
# v5.0.1
- Fix auto build from SQL in Joomla 5.
- Fix permission issue for admin views.
- Add in JCB gitea push feature to help maintain JCB core features.
- Add extending options to interfaces.
- Change the extendsinterfaces field to allow null, #1139
- Update the Schema class to also update null mismatching if needed
- Add repositories for better integration with gitea
- Refactored the Data classes
- Add new Data classes
- Add new subform classes
- Fix registry class methods return type
- Update all list and custom fields to use the new layouts
- Add push options to Joomla Power
- Complete the Joomla Power Init and Reset features
- Fix Gitea Contents class functions
- Fix subform set methods
- Improved the Joomla Power Push path
- Fix the metadata, metadesc, metakey database issue
- Fix function mismatch call in the compiler power class.
- Fix init feature to only add missing powers
- Fix controller postSaveHook function, for correct model class in Joomla 4 and 5
- Fix app instances (mismatch) in the install script and schema class when installing from CLI
- Add option to use placeholders in Joomla Power namespaces.
- Fix subform layout of uikit in JCB
# v5.0.0
- Fix the plug-in installer script builder bug #1067
- Fix Event triggers for Joomla 4 and 5 builds.
- Add fix to the update script, so that upgrading JCB from Joomla 4 to 5 will not fail.
- Fix plugin field selection
- Fix plugin params tab layout
- Add issue templates
- Force autoloader to always load
- Fix repeatable layout #1076
- Add Factory class to the J5 Event class. #1093
- Fix customfilelist field to conform to the new namespacing conventions. #1094
- Add menus for languages, servers, get snippets to J5 #1095
- Fix [Set String Value] in placeholder table to store the value as a base64 string.
- Fix the search area layout.
- Fix the search area code line selection.
- Fix the input edit button for custom fields.
- Add the new layout to list fields (GUI UPDATE)
- Start fixing the field view in Joomla 5. #1096
- Add power path override option on component level.
- Fix the sql build feature. #1032
- Add the compiler menu back.
- Fix the CustomfolderlistField #1094
- Add view list and single name fix.
- Add component code name fix.
- Add reset list of powers.
- Add Joomla powers for namespace dynamic management.
- Add fallback option to ensure that all JCB tables and fields exist.
- Move the powers autoloader to its own file.
- Fix the media field size limitation. #1109
- Add dynamic datatype update to schema field check.
- Fix version_update column size.
- Improved the Schema Table update engine.
- Improved the Schema Table update engine (more).
- Fix autoloader timing, and loading.
- Implement the Joomla Powers in JCB code, to move away from JClasses.
- Remove the SQL update, to only use the Schema updates of table columns to avoid collusion.
- Fix the admin.css file loading on dashboard. #1112
- Fix dynamic get data-type default to 0. #1110
- Fix the missing model call. #1114
- Fix the wrong $date call. #1115
- Add the BaseDatabaseModel use statement to custom site view controller. #1119
- Fix the customfolderlist field. #1120
# v4.1.1
- Move all banners to GitHub.

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 6.1.2-alpha4 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 (**6.1.2-alpha4**) 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:** 9th September, 2025 · **Version:** 6.1.2-alpha4
* **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:** 1197312 · **Fields:** 2091 · **Files:** 7993 · **Folders:** 752
> 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 (**6.1.2-alpha4**) 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:** 9th September, 2025 · **Version:** 6.1.2-alpha4
* **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:** 1197312 · **Fields:** 2091 · **Files:** 7993 · **Folders:** 752
> 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###

View File

@@ -640,10 +640,10 @@
type="number"
name="preferred_joomla_version"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREFERRED_JOOMLA_VERSION_LABEL"
default="3"
default="5"
class="text_area"
min="3"
max="5"
max="6"
step="1"
/>
<!-- Sql Field. Type: Textarea. (joomla) -->

View File

@@ -3294,7 +3294,7 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_STATE_DESCRIPTION="Set the release
COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_STATE_HINT="stable"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_STATE_LABEL="Release State"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_DESCRIPTION="Set the release target version"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_HINT="5\.[0123]"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_HINT="5\.[01234]"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_LABEL="Update Server Release Target Version"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_DESCRIPTION="Enter Download Link"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_HINT="http://www.example.com/file.zip"
@@ -6911,6 +6911,7 @@ COM_COMPONENTBUILDER_JOOMLA_POWER_SYSTEM_NAME_LABEL="System Name"
COM_COMPONENTBUILDER_JOOMLA_POWER_SYSTEM_NAME_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_JOOMLA_POWER_VERSION_DESC="A count of the number of times this Joomla Power has been revised."
COM_COMPONENTBUILDER_JOOMLA_POWER_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_JOOMLA_SIX="Joomla 6"
COM_COMPONENTBUILDER_JOOMLA_SOCIAL_FEED="Joomla! Social Feed"
COM_COMPONENTBUILDER_JOOMLA_THREE="Joomla 3"
COM_COMPONENTBUILDER_JOOMLA_VERSION="Joomla Version"

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@

View File

@@ -1 +0,0 @@

View File

@@ -1 +0,0 @@

View File

@@ -1 +0,0 @@

View File

@@ -1 +0,0 @@

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

@@ -42,9 +42,9 @@ class FilebehaviourField extends ListField
*/
protected function getOptions()
{
// get the input from url
$jinput = Factory::getApplication()->input;
// get the library id
// get the input from url
$jinput = Factory::getApplication()->getInput();
// get the library id
$libID = $jinput->getInt('id', 0);
$options[] = Html::_('select.option', '1', Text::_('COM_COMPONENTBUILDER_ALWAYS_ADD'));
// add build in option for some libraries
@@ -56,6 +56,6 @@ class FilebehaviourField extends ListField
$options[] = Html::_('select.option', '2', Text::_('COM_COMPONENTBUILDER_CONDITIONS'));
$options[] = Html::_('select.option', '3', Text::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT'));
$options[] = Html::_('select.option', '0', Text::_('COM_COMPONENTBUILDER_DO_NOT_ADD'));
return $options;
return $options;
}
}

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

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