Skip to content

Commit

Permalink
Merge branch '4.2-dev' into feature/com_joomlaupdate_improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeutz committed Jun 9, 2022
2 parents e5bffa1 + bb2e172 commit 3a57364
Show file tree
Hide file tree
Showing 114 changed files with 781 additions and 314 deletions.
32 changes: 28 additions & 4 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6447,13 +6447,33 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/vendor/maximebf/debugbar/tests/DebugBar/Tests/TracedStatementTest.php',
'/libraries/vendor/maximebf/debugbar/tests/DebugBar/Tests/full_init.html',
'/libraries/vendor/maximebf/debugbar/tests/bootstrap.php',
// From 4.1 to 4.2.0
// From 4.1 to 4.2.0-beta1
'/libraries/src/Service/Provider/ApiRouter.php',
'/libraries/vendor/nyholm/psr7/doc/final.md',
'/media/com_finder/js/index-es5.js',
'/media/com_finder/js/index-es5.min.js',
'/media/com_finder/js/index-es5.min.js.gz',
'/media/com_finder/js/index.js',
'/media/com_finder/js/index.min.js',
'/media/com_finder/js/index.min.js.gz',
'/media/com_users/js/two-factor-switcher-es5.js',
'/media/com_users/js/two-factor-switcher-es5.min.js',
'/media/com_users/js/two-factor-switcher-es5.min.js.gz',
'/media/com_users/js/two-factor-switcher.js',
'/media/com_users/js/two-factor-switcher.min.js',
'/media/com_users/js/two-factor-switcher.min.js.gz',
'/modules/mod_articles_news/mod_articles_news.php',
'/plugins/actionlog/joomla/joomla.php',
'/plugins/api-authentication/basic/basic.php',
'/plugins/api-authentication/token/token.php',
'/plugins/system/cache/cache.php',
'/plugins/twofactorauth/totp/postinstall/actions.php',
'/plugins/twofactorauth/totp/tmpl/form.php',
'/plugins/twofactorauth/totp/totp.php',
'/plugins/twofactorauth/totp/totp.xml',
'/plugins/twofactorauth/yubikey/tmpl/form.php',
'/plugins/twofactorauth/yubikey/yubikey.php',
'/plugins/twofactorauth/yubikey/yubikey.xml',
);

$folders = array(
Expand Down Expand Up @@ -7807,10 +7827,14 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/vendor/maximebf/debugbar/demo/bridge',
'/libraries/vendor/maximebf/debugbar/demo',
'/libraries/vendor/maximebf/debugbar/build',
// From 4.1 to 4.2.0
'/libraries/vendor/nyholm/psr7/doc',
'/plugins/twofactorauth/totp',
// From 4.1 to 4.2.0-beta1
'/plugins/twofactorauth/yubikey/tmpl',
'/plugins/twofactorauth/yubikey',
'/plugins/twofactorauth/totp/tmpl',
'/plugins/twofactorauth/totp/postinstall',
'/plugins/twofactorauth/totp',
'/plugins/twofactorauth',
'/libraries/vendor/nyholm/psr7/doc',
);

$status['files_checked'] = $files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null): void
{
// Access check.
if (!Factory::getUser()->authorise('core.admin'))
if (!$this->getCurrentUser()->authorise('core.admin'))
{
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_associations/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC" >
>
<field
name="rules"
type="rules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
$user = Factory::getUser();
$user = $this->getCurrentUser();

if (isset($this->typeName) && isset($this->extensionName))
{
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_banners/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function addToolbar(): void
{
Factory::getApplication()->input->set('hidemainmenu', true);

$user = Factory::getUser();
$user = $this->getCurrentUser();
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function addToolbar(): void
{
Factory::getApplication()->input->set('hidemainmenu', true);

$user = Factory::getUser();
$user = $this->getCurrentUser();
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $user->id);
$canDo = $this->canDo;
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_cache/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
<field
name="rules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function addToolbar(): void
ToolbarHelper::divider();
}

if (Factory::getUser()->authorise('core.admin', 'com_cache'))
if ($this->getCurrentUser()->authorise('core.admin', 'com_cache'))
{
ToolbarHelper::preferences('com_cache');
ToolbarHelper::divider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function display($tpl = null)
protected function addToolbar()
{
$extension = Factory::getApplication()->input->get('extension');
$user = Factory::getUser();
$user = $this->getCurrentUser();
$userId = $user->id;

$isNew = ($this->item->id == 0);
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_checkin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function display($tpl = null)
// Load Form and Data
$form = $this->get('form');
$data = $this->get('data');
$user = Factory::getUser();
$user = $this->getCurrentUser();
}
catch (\Exception $e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function display($tpl = null)
}

$form = $this->get('form');
$user = Factory::getUser();
$user = $this->getCurrentUser();
}
catch (\Exception $e)
{
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_contact/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,6 @@
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
<field
name="rules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function addToolbar()
{
Factory::getApplication()->input->set('hidemainmenu', true);

$user = Factory::getUser();
$user = $this->getCurrentUser();
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(is_null($this->item->checked_out) || $this->item->checked_out == $userId);
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<config>
<inlinehelp button="show"/>
</config>
<fieldset addfieldprefix="Joomla\Component\Content\Administrator\Field">
<field
name="id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function display($tpl = null)
protected function addToolbar()
{
Factory::getApplication()->input->set('hidemainmenu', true);
$user = Factory::getUser();
$user = $this->getCurrentUser();
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(is_null($this->item->checked_out) || $this->item->checked_out == $userId);
Expand Down Expand Up @@ -239,6 +239,9 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo, $user)
}

$toolbar->divider();

ToolbarHelper::inlinehelp();

$toolbar->help('Articles:_Edit');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected function loadFormData()
if (!$data->id)
{
// Check for which context the Field Group Manager is used and get selected fields
$context = substr($app->getUserState('com_fields.groups.filter.context'), 4);
$context = substr($app->getUserState('com_fields.groups.filter.context', ''), 4);
$filters = (array) $app->getUserState('com_fields.groups.' . $context . '.filter');

$data->set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected function addToolbar()
{
$component = $this->state->get('field.component');
$section = $this->state->get('field.section');
$userId = Factory::getUser()->get('id');
$userId = $this->getCurrentUser()->get('id');
$canDo = $this->canDo;

$isNew = ($this->item->id == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected function addToolbar()
$toolbar->addNew('field.add');
}

if ($canDo->get('core.edit.state') || Factory::getUser()->authorise('core.admin'))
if ($canDo->get('core.edit.state') || $this->getCurrentUser()->authorise('core.admin'))
{
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
Expand All @@ -172,7 +172,7 @@ protected function addToolbar()
$childBar->archive('fields.archive')->listCheck(true);
}

if (Factory::getUser()->authorise('core.admin'))
if ($this->getCurrentUser()->authorise('core.admin'))
{
$childBar->checkin('fields.checkin')->listCheck(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected function addToolbar()
$component = $parts[0];
}

$userId = Factory::getUser()->get('id');
$userId = $this->getCurrentUser()->get('id');
$canDo = $this->canDo;

$isNew = ($this->item->id == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function addToolbar()
$toolbar->addNew('group.add');
}

if ($canDo->get('core.edit.state') || Factory::getUser()->authorise('core.admin'))
if ($canDo->get('core.edit.state') || $this->getCurrentUser()->authorise('core.admin'))
{
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
Expand All @@ -174,7 +174,7 @@ protected function addToolbar()
$childBar->archive('groups.archive')->listCheck(true);
}

if (Factory::getUser()->authorise('core.admin'))
if ($this->getCurrentUser()->authorise('core.admin'))
{
$childBar->checkin('groups.checkin')->listCheck(true);
}
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_finder/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>

<field
Expand Down

0 comments on commit 3a57364

Please sign in to comment.