Skip to content

Commit b13e4f6

Browse files
authored
add nextcloud 28 support (#311)
Signed-off-by: WhoAmI0501 <106559758+WhoAmI0501@users.noreply.github.com>
1 parent e2e9ac8 commit b13e4f6

5 files changed

Lines changed: 3 additions & 16 deletions

File tree

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Additionally, the community document server only supports running on x86-64 Linu
3131
<screenshot>https://raw.githubusercontent.com/nextcloud/documentserver_community/master/screenshots/main.png</screenshot>
3232
<screenshot>https://raw.githubusercontent.com/nextcloud/documentserver_community/master/screenshots/new.png</screenshot>
3333
<dependencies>
34-
<nextcloud min-version="21" max-version="27"/>
34+
<nextcloud min-version="21" max-version="28"/>
3535
</dependencies>
3636

3737
<background-jobs>

lib/Controller/StaticController.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ public function webApps(string $path) {
9696
$rawContent = file_get_contents($localPath);
9797
$content = str_replace('__HINT__', addcslashes($hint, "'"), $rawContent);
9898
return $this->createFileResponseWithContent($localPath, $content, false);
99-
} elseif ($this->sessionManager->getSessionCount() >= 20) {
100-
$localPath = __DIR__ . '/../../js/sessionlimit.js';
10199
}
102100
}
103101

lib/FileResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct($data, int $length, int $lastModified, string $mimeT
3737
$this->data = $data;
3838
$this->name = $name;
3939
$this->setStatus($statusCode);
40-
$this->setHeaders(array_merge($this->getHeaders(), $headers));
40+
$this->setHeaders($headers);
4141
$this->addHeader('Content-Length', $length);
4242
$this->addHeader('Content-Type', $mimeType);
4343

lib/XHRCommand/AuthCommand.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
use OCA\DocumentServer\OnlyOffice\WebVersion;
3333

3434
class AuthCommand implements ICommandHandler {
35-
public const MAX_CONNECTIONS = 20;
36-
3735
private $changeStore;
3836
private $sessionManager;
3937
private $lockStore;
@@ -75,15 +73,6 @@ public function handle(array $command, Session $session, IIPCChannel $sessionCha
7573

7674
$participants = $this->sessionManager->getSessionsForDocument($session->getDocumentId());
7775

78-
if (count($participants) > self::MAX_CONNECTIONS) {
79-
$sessionChannel->pushMessage(json_encode([
80-
'type' => 'auth',
81-
'result' => 0,
82-
]));
83-
84-
return;
85-
}
86-
8776
$sessionChannel->pushMessage(json_encode([
8877
'type' => 'auth',
8978
'result' => 1,

lib/XHRResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(
4141
$this->type = $type;
4242
$this->data = $data;
4343
$this->setStatus($statusCode);
44-
$this->setHeaders(array_merge($this->getHeaders(), $headers));
44+
$this->setHeaders($headers);
4545

4646
$this->addHeader('Content-Type', 'application/javascript; charset=UTF-8');
4747
}

0 commit comments

Comments
 (0)