Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions administrator/components/com_admin/src/Model/HelpModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class HelpModel extends BaseDatabaseModel
public function &getHelpSearch()
{
if (\is_null($this->help_search)) {
$this->help_search = Factory::getApplication()->input->getString('helpsearch');
$this->help_search = Factory::getApplication()->getInput()->getString('helpsearch');
}

return $this->help_search;
Expand All @@ -94,7 +94,7 @@ public function &getHelpSearch()
public function &getPage()
{
if (\is_null($this->page)) {
$this->page = Help::createUrl(Factory::getApplication()->input->get('page', 'Start_Here'));
$this->page = Help::createUrl(Factory::getApplication()->getInput()->get('page', 'Start_Here'));
}

return $this->page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<div class="js-stools" role="search">
<?php // Add the itemtype and language selectors before the form filters. Do not display in modal. ?>
<?php $app = Factory::getApplication(); ?>
<?php if ($app->input->get('forcedItemType', '', 'string') == '') : ?>
<?php if ($app->getInput()->get('forcedItemType', '', 'string') == '') : ?>
<?php $itemTypeField = $data['view']->filterForm->getField('itemtype'); ?>
<div class="js-stools-container-selector">
<div class="js-stools-field-selector js-stools-itemtype">
Expand All @@ -92,7 +92,7 @@
</div>
</div>
<?php endif; ?>
<?php if ($app->input->get('forcedLanguage', '', 'cmd') == '') : ?>
<?php if ($app->getInput()->get('forcedLanguage', '', 'cmd') == '') : ?>
<?php $languageField = $data['view']->filterForm->getField('language'); ?>
<div class="js-stools-container-selector">
<div class="js-stools-field-selector js-stools-language">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ItemlanguageField extends ListField
*/
protected function getOptions()
{
$input = Factory::getApplication()->input;
$input = Factory::getApplication()->getInput();

list($extensionName, $typeName) = explode('.', $input->get('itemtype', '', 'string'), 2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function getInput()
$html = array();

$linkAssociations = 'index.php?option=com_associations&amp;view=associations&amp;layout=modal&amp;tmpl=component'
. '&amp;forcedItemType=' . Factory::getApplication()->input->get('itemtype', '', 'string') . '&amp;function=jSelectAssociation_' . $this->id;
. '&amp;forcedItemType=' . Factory::getApplication()->getInput()->get('itemtype', '', 'string') . '&amp;function=jSelectAssociation_' . $this->id;

$linkAssociations .= "&amp;forcedLanguage=' + document.getElementById('target-association').getAttribute('data-language') + '";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ protected function populateState($ordering = 'ordering', $direction = 'asc')
{
$app = Factory::getApplication();

$forcedLanguage = $app->input->get('forcedLanguage', '', 'cmd');
$forcedItemType = $app->input->get('forcedItemType', '', 'string');
$forcedLanguage = $app->getInput()->get('forcedLanguage', '', 'cmd');
$forcedItemType = $app->getInput()->get('forcedItemType', '', 'string');

// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout')) {
if ($layout = $app->getInput()->get('layout')) {
$this->context .= '.' . $layout;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function display($tpl = null): void
$this->app = Factory::getApplication();
$this->form = $model->getForm();
/** @var Input $input */
$input = $this->app->input;
$input = $this->app->getInput();
$this->referenceId = $input->get('id', 0, 'int');

[$extensionName, $typeName] = explode('.', $input->get('itemtype', '', 'string'), 2);
Expand Down Expand Up @@ -339,7 +339,7 @@ public function display($tpl = null): void
protected function addToolbar(): void
{
// Hide main menu.
$this->app->input->set('hidemainmenu', 1);
$this->app->getInput()->set('hidemainmenu', 1);

$helper = AssociationsHelper::getExtensionHelper($this->extensionName);
$title = $helper->getTypeTitle($this->typeName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function display($tpl = null)

if ($this->getLayout() == 'modal') {
// We need to change the category filter to only show categories tagged to All or to the forced language.
if ($forcedLanguage = Factory::getApplication()->input->get('forcedLanguage', '', 'CMD')) {
if ($forcedLanguage = Factory::getApplication()->getInput()->get('forcedLanguage', '', 'CMD')) {
$this->filterForm->setFieldAttribute('category_id', 'language', '*,' . $forcedLanguage, 'filter');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
->useScript('webcomponent.core-loader');

$options = [
'layout' => $this->app->input->get('layout', '', 'string'),
'layout' => $this->app->getInput()->get('layout', '', 'string'),
'itemtype' => $this->itemType,
'id' => $this->referenceId,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$wa->useScript('multiselect')
->useScript('com_associations.admin-associations-modal');

$function = $app->input->getCmd('function', 'jSelectAssociation');
$function = $app->getInput()->getCmd('function', 'jSelectAssociation');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$canManageCheckin = Factory::getUser()->authorise('core.manage', 'com_checkin');
Expand Down Expand Up @@ -163,8 +163,8 @@
<?php endif; ?>

<input type="hidden" name="task" value="">
<input type="hidden" name="forcedItemType" value="<?php echo $app->input->get('forcedItemType', '', 'string'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'cmd'); ?>">
<input type="hidden" name="forcedItemType" value="<?php echo $app->getInput()->get('forcedItemType', '', 'string'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $app->getInput()->get('forcedLanguage', '', 'cmd'); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ protected function loadFormData()
$filters = (array) $app->getUserState('com_banners.banners.filter');
$filterCatId = $filters['category_id'] ?? null;

$data->set('catid', $app->input->getInt('catid', $filterCatId));
$data->set('catid', $app->getInput()->getInt('catid', $filterCatId));
}
}

Expand Down Expand Up @@ -374,7 +374,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
*/
public function save($data)
{
$input = Factory::getApplication()->input;
$input = Factory::getApplication()->getInput();

// Create new category, if needed.
$createCategory = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DownloadModel extends FormModel
*/
protected function populateState()
{
$input = Factory::getApplication()->input;
$input = Factory::getApplication()->getInput();

$this->setState('basename', $input->cookie->getString(ApplicationHelper::getHash($this->_context . '.basename'), '__SITE__'));
$this->setState('compressed', $input->cookie->getInt(ApplicationHelper::getHash($this->_context . '.compressed'), 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function display($tpl = null): void
*/
protected function addToolbar(): void
{
Factory::getApplication()->input->set('hidemainmenu', true);
Factory::getApplication()->getInput()->set('hidemainmenu', true);

$user = $this->getCurrentUser();
$userId = $user->id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function display($tpl = null): void
*/
protected function addToolbar(): void
{
Factory::getApplication()->input->set('hidemainmenu', true);
Factory::getApplication()->getInput()->set('hidemainmenu', true);

$user = $this->getCurrentUser();
$isNew = ($this->item->id == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Dispatcher extends ComponentDispatcher
*/
protected function checkAccess()
{
$extension = $this->getApplication()->input->getCmd('extension');
$extension = $this->getApplication()->getInput()->getCmd('extension');

$parts = explode('.', $extension);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function getOptions()
$name = (string) $this->element['name'];

// Let's get the id for the current item, either category or content item.
$jinput = Factory::getApplication()->input;
$jinput = Factory::getApplication()->getInput();

// Load the category options for a given extension.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function getInput()
if ($this->element['extension']) {
$extension = (string) $this->element['extension'];
} else {
$extension = (string) Factory::getApplication()->input->get('extension', 'com_content');
$extension = (string) Factory::getApplication()->getInput()->get('extension', 'com_content');
}

$allowNew = ((string) $this->element['new'] == 'true');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ protected function populateState($ordering = 'a.lft', $direction = 'asc')
{
$app = Factory::getApplication();

$forcedLanguage = $app->input->get('forcedLanguage', '', 'cmd');
$forcedLanguage = $app->getInput()->get('forcedLanguage', '', 'cmd');

// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout')) {
if ($layout = $app->getInput()->get('layout')) {
$this->context .= '.' . $layout;
}

Expand Down
30 changes: 15 additions & 15 deletions administrator/components/com_categories/src/Model/CategoryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class CategoryModel extends AdminModel
*/
public function __construct($config = array(), MVCFactoryInterface $factory = null)
{
$extension = Factory::getApplication()->input->get('extension', 'com_content');
$extension = Factory::getApplication()->getInput()->get('extension', 'com_content');
$this->typeAlias = $extension . '.category';

// Add a new batch command
Expand Down Expand Up @@ -172,14 +172,14 @@ protected function populateState()
{
$app = Factory::getApplication();

$parentId = $app->input->getInt('parent_id');
$parentId = $app->getInput()->getInt('parent_id');
$this->setState('category.parent_id', $parentId);

// Load the User state.
$pk = $app->input->getInt('id');
$pk = $app->getInput()->getInt('id');
$this->setState($this->getName() . '.id', $pk);

$extension = $app->input->get('extension', 'com_content');
$extension = $app->getInput()->get('extension', 'com_content');
$this->setState('category.extension', $extension);
$parts = explode('.', $extension);

Expand Down Expand Up @@ -248,7 +248,7 @@ public function getItem($pk = null)
public function getForm($data = array(), $loadData = true)
{
$extension = $this->getState('category.extension');
$jinput = Factory::getApplication()->input;
$jinput = Factory::getApplication()->getInput();

// A workaround to get the extension into the model for save requests.
if (empty($extension) && isset($data['extension'])) {
Expand Down Expand Up @@ -338,15 +338,15 @@ protected function loadFormData()

$data->set(
'published',
$app->input->getInt(
$app->getInput()->getInt(
'published',
((isset($filters['published']) && $filters['published'] !== '') ? $filters['published'] : null)
)
);
$data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null)));
$data->set('language', $app->getInput()->getString('language', (!empty($filters['language']) ? $filters['language'] : null)));
$data->set(
'access',
$app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : $app->get('access')))
$app->getInput()->getInt('access', (!empty($filters['access']) ? $filters['access'] : $app->get('access')))
);
}
}
Expand Down Expand Up @@ -400,7 +400,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
$lang = Factory::getLanguage();
$component = $this->getState('category.component');
$section = $this->getState('category.section');
$extension = Factory::getApplication()->input->get('extension', null);
$extension = Factory::getApplication()->getInput()->get('extension', null);

// Get the component form if it exists
$name = 'category' . ($section ? ('.' . $section) : '');
Expand Down Expand Up @@ -508,7 +508,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
public function save($data)
{
$table = $this->getTable();
$input = Factory::getApplication()->input;
$input = Factory::getApplication()->getInput();
$pk = (!empty($data['id'])) ? $data['id'] : (int) $this->getState($this->getName() . '.id');
$isNew = true;
$context = $this->option . '.' . $this->name;
Expand Down Expand Up @@ -714,7 +714,7 @@ public function save($data)

$this->setState($this->getName() . '.id', $table->id);

if (Factory::getApplication()->input->get('task') == 'editAssociations') {
if (Factory::getApplication()->getInput()->get('task') == 'editAssociations') {
return $this->redirectToAssociations($data);
}

Expand All @@ -737,7 +737,7 @@ public function save($data)
public function publish(&$pks, $value = 1)
{
if (parent::publish($pks, $value)) {
$extension = Factory::getApplication()->input->get('extension');
$extension = Factory::getApplication()->getInput()->get('extension');

// Include the content plugins for the change of category state event.
PluginHelper::importPlugin('content');
Expand Down Expand Up @@ -874,7 +874,7 @@ protected function batchCopy($value, $pks, $contexts)
$parentId = (int) ArrayHelper::getValue($parts, 0, 1);

$db = $this->getDatabase();
$extension = Factory::getApplication()->input->get('extension', '', 'word');
$extension = Factory::getApplication()->getInput()->get('extension', '', 'word');
$newIds = array();

// Check that the parent exists
Expand Down Expand Up @@ -1077,7 +1077,7 @@ protected function batchMove($value, $pks, $contexts)

$db = $this->getDatabase();
$query = $db->getQuery(true);
$extension = Factory::getApplication()->input->get('extension', '', 'word');
$extension = Factory::getApplication()->getInput()->get('extension', '', 'word');

// Check that the parent exists.
if ($parentId) {
Expand Down Expand Up @@ -1202,7 +1202,7 @@ protected function batchMove($value, $pks, $contexts)
*/
protected function cleanCache($group = null, $clientId = 0)
{
$extension = Factory::getApplication()->input->get('extension');
$extension = Factory::getApplication()->getInput()->get('extension');

switch ($extension) {
case 'com_content':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function display($tpl = null)
}
} else {
// In article associations modal we need to remove language filter if forcing a language.
if ($forcedLanguage = Factory::getApplication()->input->get('forcedLanguage', '', 'CMD')) {
if ($forcedLanguage = Factory::getApplication()->getInput()->get('forcedLanguage', '', 'CMD')) {
// If the language is forced we can't allow to select the language, so transform the language selector filter into a hidden field.
$languageXml = new \SimpleXMLElement('<field name="language" type="hidden" default="' . $forcedLanguage . '" />');
$this->filterForm->setField($languageXml, 'filter', true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public function display($tpl = null)
$this->checkTags = true;
}

Factory::getApplication()->input->set('hidemainmenu', true);
Factory::getApplication()->getInput()->set('hidemainmenu', true);

// If we are forcing a language in modal (used for associations).
if ($this->getLayout() === 'modal' && $forcedLanguage = Factory::getApplication()->input->get('forcedLanguage', '', 'cmd')) {
if ($this->getLayout() === 'modal' && $forcedLanguage = Factory::getApplication()->getInput()->get('forcedLanguage', '', 'cmd')) {
// Set the language field to the forcedLanguage and disable changing it.
$this->form->setValue('language', null, $forcedLanguage);
$this->form->setFieldAttribute('language', 'readonly', 'true');
Expand All @@ -131,7 +131,7 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
$extension = Factory::getApplication()->input->get('extension');
$extension = Factory::getApplication()->getInput()->get('extension');
$user = $this->getCurrentUser();
$userId = $user->id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
HTMLHelper::_('behavior.core');

$extension = $this->escape($this->state->get('filter.extension'));
$function = $app->input->getCmd('function', 'jSelectCategory');
$function = $app->getInput()->getCmd('function', 'jSelectCategory');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
Expand Down Expand Up @@ -132,7 +132,7 @@
<input type="hidden" name="extension" value="<?php echo $extension; ?>">
<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'CMD'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $app->getInput()->get('forcedLanguage', '', 'CMD'); ?>">
<?php echo HTMLHelper::_('form.token'); ?>

</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
->useScript('form.validate');

$app = Factory::getApplication();
$input = $app->input;
$input = $app->getInput();

$assoc = Associations::isEnabled();
// Are associations implemented for this extension?
Expand Down
Loading