mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-15 12:37:46 +02:00
chore: update CI to v4.6.3 + all php and js dependencies
This commit is contained in:
parent
96b2df15b0
commit
346c00e7b5
206 changed files with 6239 additions and 5336 deletions
|
|
@ -228,7 +228,8 @@ class AuthGroups extends ShieldAuthGroups
|
|||
* For each podcast, include podcast groups, permissions, and matrix into $groups, $permissions, and $matrix
|
||||
* attributes.
|
||||
*/
|
||||
$podcasts = (new PodcastModel())->findAll();
|
||||
$podcasts = new PodcastModel()
|
||||
->findAll();
|
||||
foreach ($podcasts as $podcast) {
|
||||
$this->generatePodcastAuthorizations($podcast->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Modules\Auth\Config;
|
|||
use CodeIgniter\Router\RouteCollection;
|
||||
|
||||
/**
|
||||
* @var RouteCollection $routes
|
||||
* @var RouteCollection
|
||||
*/
|
||||
|
||||
service('auth')
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class ContributorController extends BaseController
|
|||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
if (! ($podcast = (new PodcastModel())->getPodcastById((int) $params[0])) instanceof Podcast) {
|
||||
if (! ($podcast = new PodcastModel()->getPodcastById((int) $params[0])) instanceof Podcast) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ class ContributorController extends BaseController
|
|||
return $this->{$method}();
|
||||
}
|
||||
|
||||
if (($this->contributor = (new UserModel())->getPodcastContributor(
|
||||
if (($this->contributor = new UserModel()->getPodcastContributor(
|
||||
(int) $params[1],
|
||||
(int) $params[0],
|
||||
)) instanceof User) {
|
||||
|
|
@ -67,7 +67,8 @@ class ContributorController extends BaseController
|
|||
{
|
||||
$data = [
|
||||
'podcast' => $this->podcast,
|
||||
'contributor' => (new UserModel())->getPodcastContributor($this->contributor->id, $this->podcast->id),
|
||||
'contributor' => new UserModel()
|
||||
->getPodcastContributor($this->contributor->id, $this->podcast->id),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Contributor.view', [
|
||||
|
|
@ -85,7 +86,8 @@ class ContributorController extends BaseController
|
|||
{
|
||||
helper('form');
|
||||
|
||||
$users = (new UserModel())->findAll();
|
||||
$users = new UserModel()
|
||||
->findAll();
|
||||
$contributorOptions = array_reduce(
|
||||
$users,
|
||||
static function (array $result, User $user): array {
|
||||
|
|
@ -128,7 +130,8 @@ class ContributorController extends BaseController
|
|||
public function createAction(): RedirectResponse
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = (new UserModel())->find((int) $this->request->getPost('user'));
|
||||
$user = new UserModel()
|
||||
->find((int) $this->request->getPost('user'));
|
||||
|
||||
if (get_podcast_group($user, $this->podcast->id)) {
|
||||
return redirect()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class UserController extends BaseController
|
|||
return $this->{$method}();
|
||||
}
|
||||
|
||||
if (($this->user = (new UserModel())->find($params[0])) instanceof User) {
|
||||
if (($this->user = new UserModel()->find($params[0])) instanceof User) {
|
||||
return $this->{$method}();
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,8 @@ class UserController extends BaseController
|
|||
public function list(): string
|
||||
{
|
||||
$data = [
|
||||
'users' => (new UserModel())->findAll(),
|
||||
'users' => new UserModel()
|
||||
->findAll(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('User.all_users'));
|
||||
|
|
@ -280,7 +281,8 @@ class UserController extends BaseController
|
|||
->with('errors', $this->validator->getErrors());
|
||||
}
|
||||
|
||||
(new UserModel())->delete($this->user->id, true);
|
||||
new UserModel()
|
||||
->delete($this->user->id, true);
|
||||
|
||||
return redirect()
|
||||
->route('user-list')
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ class PermissionFilter implements FilterInterface
|
|||
if (is_numeric($podcastParam)) {
|
||||
$podcastId = (int) $podcastParam;
|
||||
} else {
|
||||
$podcast = (new PodcastModel())->getPodcastByHandle($podcastParam);
|
||||
$podcast = new PodcastModel()
|
||||
->getPodcastByHandle($podcastParam);
|
||||
if ($podcast instanceof Podcast) {
|
||||
$podcastId = $podcast->id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,8 @@ if (! function_exists('get_user_podcasts')) {
|
|||
*/
|
||||
function get_user_podcasts(User $user): array
|
||||
{
|
||||
return (new PodcastModel())->getUserPodcasts($user->id, get_user_podcast_ids($user));
|
||||
return new PodcastModel()
|
||||
->getUserPodcasts($user->id, get_user_podcast_ids($user));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +225,8 @@ if (! function_exists('get_podcasts_user_can_interact_with')) {
|
|||
*/
|
||||
function get_podcasts_user_can_interact_with(User $user): array
|
||||
{
|
||||
$userPodcasts = (new PodcastModel())->getUserPodcasts($user->id, get_user_podcast_ids($user));
|
||||
$userPodcasts = new PodcastModel()
|
||||
->getUserPodcasts($user->id, get_user_podcast_ids($user));
|
||||
|
||||
$hasInteractAsPrivilege = interact_as_actor_id() === null;
|
||||
|
||||
|
|
@ -279,10 +281,8 @@ if (! function_exists('get_actor_ids_with_unread_notifications')) {
|
|||
return [];
|
||||
}
|
||||
|
||||
$unreadNotifications = (new NotificationModel())->whereIn(
|
||||
'target_actor_id',
|
||||
array_column($userPodcasts, 'actor_id'),
|
||||
)
|
||||
$unreadNotifications = new NotificationModel()
|
||||
->whereIn('target_actor_id', array_column($userPodcasts, 'actor_id'))
|
||||
->where('read_at', null)
|
||||
->findAll();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue