From d7d7f24c368d9a735fb9bd4d7ee043001deb374d Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Sat, 23 Oct 2021 16:00:12 +0200 Subject: [PATCH] contents error --- lib/AppInfo/Application.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index b07f084..9ee9b9f 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -16,7 +16,6 @@ use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\Files\Events\Node\BeforeNodeDeletedEvent; - class Application extends App { protected $AppName = 'Agency'; @@ -79,13 +78,15 @@ class LoginByNC extends Controller { protected $session; protected $request; + protected $userStatusManager; private $nclink = 'https://daprd1.digitale-agentur.com'; //private $nclink = 'http://host.docker.internal:8000'; - public function __construct(string $AppName, IRequest $request, IUserSession $session) { + public function __construct(string $AppName, IRequest $request, IUserSession $session, IUserStatusManager $userStatusManager) { $this->request = $request; parent::__construct($AppName, $request); $this->session = $session; + $this->userStatusManager = $userStatusManager; } private function generateRandomString($length = 10) { @@ -114,10 +115,11 @@ class LoginByNC extends Controller { ), "http" => array( "method" => "POST", - "header" => "", + "header" => "Content-Type: application/x-www-form-urlencoded\r\n", "content" => $postdata ) - ]; + ]; + $context = stream_context_create($opts); $file = file_get_contents($this->nclink.'/api/setlog/', false, $context); }