Loading lib/AppInfo/Application.php +4 −10 Original line number Diff line number Diff line Loading @@ -36,8 +36,6 @@ use OCA\Calendar\Middleware\InvitationMiddleware; use OCP\IRequest; use OCP\IConfig; use OCP\IDBConnection; use OC\Core\Application as CoreApplication; use OCP\Http\Client\IResponse; use OCP\Calendar\IManager; use OCP\Mail\IMailer; use OCP\IL10N; Loading @@ -47,24 +45,21 @@ use OCP\ILogger; use OCP\IUserManager; use OCP\BackgroundJob\IJobList; class Application extends App implements IBootstrap { class Application extends App implements IBootstrap { /** @var string */ public const APP_ID = "calendar"; /** * @param array $params */ public function __construct(array $params = []) { public function __construct(array $params = []) { parent::__construct(self::APP_ID, $params); } /** * @inheritDoc */ public function register(IRegistrationContext $context): void { public function register(IRegistrationContext $context): void { $context->registerDashboardWidget(CalendarWidget::class); // TODO: drop conditional code when the app is 23+ Loading @@ -81,8 +76,7 @@ class Application extends App implements IBootstrap /** * @inheritDoc */ public function boot(IBootContext $context): void { public function boot(IBootContext $context): void { $container = $this->getContainer(); /** * Middleware Loading lib/BackgroundJob/SendInviteResponseMailJob.php +77 −83 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCA\Calendar\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\QueuedJob ; use Psr\Log\LoggerInterface; Loading @@ -41,7 +40,6 @@ use Sabre\VObject\Parameter; use OCP\Util; class SendInviteResponseMailJob extends QueuedJob { private const translations = [ "tentative" => [ "meeting_title" => "Invitation Tentatively Accepted: %s", Loading Loading @@ -79,8 +77,6 @@ class SendInviteResponseMailJob extends QueuedJob { $this->l10n = $l10n; $this->defaults = $defaults; $this->iusermanager = $iusermanager; } private function getMailAttributes( Loading Loading @@ -108,8 +104,7 @@ class SendInviteResponseMailJob extends QueuedJob { "meeting_head" => $meetingHead, ]; } private function extract_emails_from($string) { private function extract_emails_from($string) { $string = (string) $string; $matches = []; $found = preg_match("/mailto:(.*)/i", $string, $matches); Loading Loading @@ -190,7 +185,6 @@ class SendInviteResponseMailJob extends QueuedJob { $attendeeName = $attendee1["CN"]; break; } } } $organizerName = empty($vObject->VEVENT->ORGANIZER["CN"]) Loading lib/Controller/InvitationMaybeController.php +1 −2 Original line number Diff line number Diff line Loading @@ -151,5 +151,4 @@ EOF; return $row; } } lib/Middleware/InvitationMiddleware.php +1 −7 Original line number Diff line number Diff line Loading @@ -12,19 +12,14 @@ use OCP\IConfig; use OCP\IRequest; use OCP\AppFramework\Http\Response; use OCP\Calendar\IManager; use Sabre\VObject\Reader; use OCP\Defaults; use OCP\Mail\IMailer; use OCP\IL10N; use OCP\ILogger; use OCP\IUserManager; use OCP\IUser; use OCP\L10N\IFactory; use OCP\Util; class InvitationMiddleware extends Middleware { class InvitationMiddleware extends Middleware { private $request; private $jobList; /** @var IManager */ Loading Loading @@ -90,7 +85,6 @@ class InvitationMiddleware extends Middleware $token = $this->request->getParam("token"); $this->jobList->add(SendInviteResponseMailJob::class, ['token' => $token,'methodName' => $methodName]); } Loading Loading
lib/AppInfo/Application.php +4 −10 Original line number Diff line number Diff line Loading @@ -36,8 +36,6 @@ use OCA\Calendar\Middleware\InvitationMiddleware; use OCP\IRequest; use OCP\IConfig; use OCP\IDBConnection; use OC\Core\Application as CoreApplication; use OCP\Http\Client\IResponse; use OCP\Calendar\IManager; use OCP\Mail\IMailer; use OCP\IL10N; Loading @@ -47,24 +45,21 @@ use OCP\ILogger; use OCP\IUserManager; use OCP\BackgroundJob\IJobList; class Application extends App implements IBootstrap { class Application extends App implements IBootstrap { /** @var string */ public const APP_ID = "calendar"; /** * @param array $params */ public function __construct(array $params = []) { public function __construct(array $params = []) { parent::__construct(self::APP_ID, $params); } /** * @inheritDoc */ public function register(IRegistrationContext $context): void { public function register(IRegistrationContext $context): void { $context->registerDashboardWidget(CalendarWidget::class); // TODO: drop conditional code when the app is 23+ Loading @@ -81,8 +76,7 @@ class Application extends App implements IBootstrap /** * @inheritDoc */ public function boot(IBootContext $context): void { public function boot(IBootContext $context): void { $container = $this->getContainer(); /** * Middleware Loading
lib/BackgroundJob/SendInviteResponseMailJob.php +77 −83 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCA\Calendar\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\QueuedJob ; use Psr\Log\LoggerInterface; Loading @@ -41,7 +40,6 @@ use Sabre\VObject\Parameter; use OCP\Util; class SendInviteResponseMailJob extends QueuedJob { private const translations = [ "tentative" => [ "meeting_title" => "Invitation Tentatively Accepted: %s", Loading Loading @@ -79,8 +77,6 @@ class SendInviteResponseMailJob extends QueuedJob { $this->l10n = $l10n; $this->defaults = $defaults; $this->iusermanager = $iusermanager; } private function getMailAttributes( Loading Loading @@ -108,8 +104,7 @@ class SendInviteResponseMailJob extends QueuedJob { "meeting_head" => $meetingHead, ]; } private function extract_emails_from($string) { private function extract_emails_from($string) { $string = (string) $string; $matches = []; $found = preg_match("/mailto:(.*)/i", $string, $matches); Loading Loading @@ -190,7 +185,6 @@ class SendInviteResponseMailJob extends QueuedJob { $attendeeName = $attendee1["CN"]; break; } } } $organizerName = empty($vObject->VEVENT->ORGANIZER["CN"]) Loading
lib/Controller/InvitationMaybeController.php +1 −2 Original line number Diff line number Diff line Loading @@ -151,5 +151,4 @@ EOF; return $row; } }
lib/Middleware/InvitationMiddleware.php +1 −7 Original line number Diff line number Diff line Loading @@ -12,19 +12,14 @@ use OCP\IConfig; use OCP\IRequest; use OCP\AppFramework\Http\Response; use OCP\Calendar\IManager; use Sabre\VObject\Reader; use OCP\Defaults; use OCP\Mail\IMailer; use OCP\IL10N; use OCP\ILogger; use OCP\IUserManager; use OCP\IUser; use OCP\L10N\IFactory; use OCP\Util; class InvitationMiddleware extends Middleware { class InvitationMiddleware extends Middleware { private $request; private $jobList; /** @var IManager */ Loading Loading @@ -90,7 +85,6 @@ class InvitationMiddleware extends Middleware $token = $this->request->getParam("token"); $this->jobList->add(SendInviteResponseMailJob::class, ['token' => $token,'methodName' => $methodName]); } Loading