Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ local: build
docker compose kill || true
docker stop nextcloud-container || true
docker container rm nextcloud-container || true
docker run --rm -d -p 8080:80 --name nextcloud-container -e SERVER_BRANCH="v31.0.8" -v .:/var/www/html/apps-extra/gdatavaas ghcr.io/juliusknorr/nextcloud-dev-php84:latest
docker run --rm -d -p 8080:80 --name nextcloud-container -e SERVER_BRANCH="v32.0.0" -v .:/var/www/html/apps-extra/gdatavaas ghcr.io/juliusknorr/nextcloud-dev-php84:latest
composer install

# Builds the app for production and prepares it for the appstore under ./build/artifacts
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Please make sure the "Authentication Method" "Resource Owner Password Flow" is s
<database>pgsql</database>
<database>mysql</database>
<database>sqlite</database>
<nextcloud min-version="31" max-version="31"/>
<nextcloud min-version="32" max-version="32"/>
</dependencies>
<background-jobs>
<job>OCA\GDataVaas\BackgroundJobs\ScanJob</job>
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"coduo/php-humanizer": "5.0.0"
},
"require-dev": {
"nextcloud/ocp": "v31.0.8",
"nextcloud/ocp": "v32.0.0",
"psalm/phar": "6.8.2",
"nextcloud/coding-standard": "v1.4.0",
"colinodell/psr-testlogger": "1.3.0",
Expand Down Expand Up @@ -45,4 +45,4 @@
"php": "8.1"
}
}
}
}
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

services:
nextcloud-container:
image: nextcloud:31.0.8
image: nextcloud:32.0.0
ports:
- "8080:80"
container_name: nextcloud-container
Expand Down
10 changes: 6 additions & 4 deletions lib/EventListener/FileEventsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
namespace OCA\GDataVaas\EventListener;

use Exception;
use OC_Template;
use OCA\GDataVaas\AppInfo\Application;
use OCA\GDataVaas\Exceptions\VirusFoundException;
use OCA\GDataVaas\Service\FileService;
use OCA\GDataVaas\Service\MailService;
use OCA\GDataVaas\Service\TagService;
use OCA\GDataVaas\Service\VerdictService;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Files\Events\Node\NodeWrittenEvent;
Expand All @@ -27,6 +27,7 @@
use OCP\IRequest;
use OCP\IUserSession;
use OCP\Lock\LockedException;
use OCP\Template\ITemplateManager;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Server;

Expand All @@ -42,6 +43,7 @@ public function __construct(
private readonly TagService $tagService,
private readonly IAppConfig $appConfig,
private readonly MailService $mailService,
private readonly ITemplateManager $templateManager,
) {
}

Expand Down Expand Up @@ -115,17 +117,17 @@ private function sendErrorResponse(Exception $ex): void {

public function generateBody(Exception $ex): string {
if ($this->acceptHtml()) {
$renderAs = 'guest';
$renderAs = TemplateResponse::RENDER_AS_GUEST;
$templateName = 'exception';
} else {
$templateName = 'xml_exception';
$renderAs = null;
$renderAs = TemplateResponse::RENDER_AS_BLANK;
$this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
}

$debug = $this->config->getSystemValueBool('debug');

$content = new OC_Template('gdatavaas', $templateName, $renderAs);
$content = $this->templateManager->getTemplate('gdatavaas', $templateName, $renderAs);
$content->assign('title', 'Error');
$content->assign('message', $ex->getMessage());
$content->assign('remoteAddr', $this->request->getRemoteAddress());
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-nc-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later

rm -rf nextcloud-server/
export NEXTCLOUD_VERSION=${1:-31.0.8}
export NEXTCLOUD_VERSION=${1:-32.0.0}
git clone --depth 1 --recurse-submodules --single-branch --branch v"$NEXTCLOUD_VERSION" https://github.com/nextcloud/server.git ./nextcloud-server
cd nextcloud-server || exit 1
git submodule update --init
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

set -e

export NEXTCLOUD_VERSION=${1:-31.0.8}
export NEXTCLOUD_VERSION=${1:-32.0.0}
export IS_CI=${2:-0}

if [ "$IS_CI" -eq 0 ]; then
Expand Down
Loading