Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Apr 4, 2023
1 parent 7ea8d1e commit ea3670e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion plugins/system/logout/src/Extension/Logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class Logout extends CMSPlugin
*
* @since 1.6
*/
public function __construct(DispatcherInterface $dispatcher, $config, CMSApplicationInterface $app)
public function __construct(DispatcherInterface $dispatcher, array $config, CMSApplicationInterface $app)
{
parent::__construct($dispatcher, $config);

Expand Down
2 changes: 1 addition & 1 deletion plugins/system/logrotation/logrotation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<authorUrl>www.joomla.org</authorUrl>
<version>3.9.0</version>
<description>PLG_SYSTEM_LOGROTATION_XML_DESCRIPTION</description>
<namespace path="src">Joomla\Plugin\System\Logrotation</namespace>
<namespace path="src">Joomla\Plugin\System\LogRotation</namespace>
<files>
<folder plugin="logrotation">services</folder>
<folder>src</folder>
Expand Down
4 changes: 2 additions & 2 deletions plugins/system/logrotation/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\System\Logrotation\Extension\Logrotation;
use Joomla\Plugin\System\LogRotation\Extension\LogRotation;

return new class () implements ServiceProviderInterface {
/**
Expand All @@ -35,7 +35,7 @@ public function register(Container $container): void
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Logrotation(
$plugin = new LogRotation(
$dispatcher,
(array) PluginHelper::getPlugin('system', 'logrotation')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Plugin\System\Logrotation\Extension;
namespace Joomla\Plugin\System\LogRotation\Extension;

use Exception;
use Joomla\CMS\Cache\Cache;
Expand All @@ -29,7 +29,7 @@
*
* @since 3.9.0
*/
final class Logrotation extends CMSPlugin
final class LogRotation extends CMSPlugin
{
use DatabaseAwareTrait;

Expand Down
2 changes: 1 addition & 1 deletion plugins/system/schedulerunner/schedulerunner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<authorUrl>www.joomla.org</authorUrl>
<version>4.1</version>
<description>PLG_SYSTEM_SCHEDULERUNNER_XML_DESCRIPTION</description>
<namespace path="src">Joomla\Plugin\System\Schedulerunner</namespace>
<namespace path="src">Joomla\Plugin\System\ScheduleRunner</namespace>
<media destination="plg_system_schedulerunner" folder="media">
<folder>js</folder>
<filename>joomla.asset.json</filename>
Expand Down
4 changes: 2 additions & 2 deletions plugins/system/schedulerunner/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\System\Schedulerunner\Extension\Schedulerunner;
use Joomla\Plugin\System\ScheduleRunner\Extension\ScheduleRunner;

return new class () implements ServiceProviderInterface {
/**
Expand All @@ -34,7 +34,7 @@ public function register(Container $container): void
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Schedulerunner(
$plugin = new ScheduleRunner(
$dispatcher,
(array) PluginHelper::getPlugin('system', 'schedulerunner')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Plugin\System\Schedulerunner\Extension;
namespace Joomla\Plugin\System\ScheduleRunner\Extension;

use Exception;
use Joomla\CMS\Component\ComponentHelper;
Expand All @@ -34,15 +34,15 @@
/**
* This plugin implements listeners to support a visitor-triggered lazy-scheduling pattern.
* If `com_scheduler` is installed/enabled and its configuration allows unprotected lazy scheduling, this plugin
* injects into each response with an HTML context a JS file {@see PlgSystemSchedulerunner::injectScheduleRunner()} that
* sets up an AJAX callback to trigger the scheduler {@see PlgSystemSchedulerunner::runScheduler()}. This is achieved
* injects into each response with an HTML context a JS file {@see PlgSystemScheduleRunner::injectScheduleRunner()} that
* sets up an AJAX callback to trigger the scheduler {@see PlgSystemScheduleRunner::runScheduler()}. This is achieved
* through a call to the `com_ajax` component.
* Also supports the scheduler component configuration form through auto-generation of the webcron key and injection
* of JS of usability enhancement.
*
* @since 4.1.0
*/
final class Schedulerunner extends CMSPlugin implements SubscriberInterface
final class ScheduleRunner extends CMSPlugin implements SubscriberInterface
{
/**
* Length of auto-generated webcron key.
Expand Down
2 changes: 1 addition & 1 deletion plugins/system/skipto/src/Extension/Skipto.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function onAfterDispatch()
]
);

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $document->getWebAssetManager();
$wa->useScript('skipto');
}
Expand Down
1 change: 0 additions & 1 deletion plugins/system/stats/src/Extension/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Exception;
use Joomla\CMS\Cache\Cache;
use Joomla\CMS\Http\HttpFactory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Plugin\CMSPlugin;
Expand Down
6 changes: 3 additions & 3 deletions plugins/system/webauthn/src/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public function validateAttestationResponse(string $data): PublicKeyCredentialSo

// Retrieve the stored user ID and make sure it's the same one in the request.
$storedUserId = $this->session->get('plg_system_webauthn.registration_user_id', 0);
$myUser = $this->getApplication()->getIdentity() ?? new User();
$myUser = $this->app->getIdentity() ?? new User();
$myUserId = $myUser->id;

if (($myUser->guest) || ($myUserId != $storedUserId)) {
Expand Down Expand Up @@ -392,7 +392,7 @@ private function getSiteIcon(): ?string
'/images/',
'/media/',
'/templates/',
'/templates/' . $this->getApplication()->getTemplate(),
'/templates/' . $this->app->getTemplate(),
];
} catch (Exception $e) {
return null;
Expand Down Expand Up @@ -526,7 +526,7 @@ private function getPKCredentialRequestOptions(): PublicKeyCredentialRequestOpti
*/
private function getWebauthnServer(): \Webauthn\Server
{
$siteName = $this->getApplication()->get('sitename');
$siteName = $this->app->get('sitename');

// Credentials repository
$repository = $this->credentialsRepository;
Expand Down

0 comments on commit ea3670e

Please sign in to comment.