Files
skjnldsv ae4c1065d0 feat(viewer): keep the legacy viewer API in apps/viewer until 39
Dropping the bundled app takes the OCA.Viewer global and the LoadViewer
event with it, and apps in the wild still use both: text and
recommendations ask the global what it can open, photos opens and closes
it, files_pdfviewer re-opens the current file with another handler, and
photos, maps and collectives construct the event without checking that
it exists, so their pages would fail on the missing class.

The global goes back on the page, backed by the package rather than by
the app. open() takes the paths and the loose file info apps passed
before and turns them into nodes, the getters answer from what the last
open() was given, and mimetypes answers by asking the handlers about a
file of that type. registerHandler is deliberately not here: it was
deprecated in the viewer app in August 2025 and this is where it stops.
The event stays as an empty class nobody dispatches.

Both live in apps/viewer, which is not an app: it has no appinfo, the
server autoloads the event from it and the core viewer init script
imports the bridge. The checkers that take every folder in apps/ for an
app are told so: .noopenapi, the untranslated list, and a skip in the
autoloader checker and in tests/enable_all.php for folders without an
appinfo/info.xml. psalm lints it like the others.

Every use of the global logs a warning naming the replacement and
Nextcloud 39, where the folder and those exceptions go.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2026-10-01 15:21:14 +02:00

187 lines
3.0 KiB
Plaintext

# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2011-2016 ownCloud contributors
# SPDX-FileCopyrightText: 2010 ownCloud contributors
# SPDX-License-Identifier: AGPL-3.0-only
# the default generated dir + db file
/data
/config/config.php
/config/*.config.php
/config/mimetype*.json
/config/mount.php
/apps/inc.php
/assets
/.htaccess
node_modules/
/translationfiles
/translationtool.phar
# ignore all apps except core ones
/apps*/*
!/apps/admin_audit
!/apps/appstore
!/apps/cloud_federation_api
!/apps/comments
!/apps/contactsinteraction
!/apps/dashboard
!/apps/dav
!/apps/encryption
!/apps/federation
!/apps/federatedfilesharing
!/apps/files
!/apps/files_external
!/apps/files_reminders
!/apps/files_sharing
!/apps/files_trashbin
!/apps/files_versions
!/apps/lookup_server_connector
!/apps/user_ldap
!/apps/oauth2
!/apps/profile
!/apps/provisioning_api
!/apps/settings
!/apps/sharebymail
!/apps/sharing
!/apps/systemtags
!/apps/testing
!/apps/updatenotification
!/apps/theming
!/apps/twofactor_backupcodes
!/apps/user_status
!/apps/viewer
!/apps/weather_status
!/apps/webhook_listeners
!/apps/workflowengine
/apps/files_external/3rdparty/irodsphp/PHPUnitTest
/apps/files_external/3rdparty/irodsphp/web
/apps/files_external/3rdparty/irodsphp/prods/test
/apps/files_external/3rdparty/irodsphp/prods/tutorials
/apps/files_external/3rdparty/irodsphp/prods/test*
/apps/files_external/tests/config.*.php
# ignore themes except the example and the README
/themes/*
!/themes/example
!/themes/README
# Love to people that develop the updater
/updater
# just sane ignores
.*.sw[po]
*.bak
*.BAK
*~
*.orig
*.class
.cvsignore
Thumbs.db
*.py[co]
_darcs/*
CVS/*
.svn/*
RCS/*
*.backup*
.php_cs.cache
.php-cs-fixer.cache
# kdevelop
.kdev
*.kdev4
*.kate-swp
# Lokalize
*lokalize*
# eclipse
.project
.settings
# netbeans
nbproject
# phpStorm
.idea
*.iml
# vscode
.vscode
*.code-workspace
# geany
*.geany
# Cloud9IDE
.settings.xml
.c9revisions
# vim ex mode
.vimrc
# ack(-grep)
.ackrc
# Mac OS
.DS_Store
# WebFinger
.well-known
/.buildpath
# Tests
/tests/phpunit.xml
# nodejs
/build/bin
/build/lib/
/build/integration/output/
/build/integration/phpserver.log
/npm-debug.log
/PhantomJS_*
# puphpet
puphpet
# vagrant
.vagrant
Vagrantfile
# Tests - auto-generated files
/data-autotest
/playwright-report
/results.sarif
/test-results
/tests/.phpunit.cache
/tests/.phpunit.result.cache
/tests/coverage*
/tests/css
/tests/karma-coverage
/tests/autoconfig*
/tests/autotest*
/tests/data/lorem-copy.txt
/tests/data/testimage-copy.png
/tests/ui-regression/out/
/tests/ui-regression/node_modules/
/tests/ui-regression/package-lock.json
/config/config-autotest-backup.php
/config/autoconfig.php
clover.xml
/coverage
.vitest*/
__screenshots__/
# Tests - dependencies
tests/acceptance/vendor/
composer.phar
/lib/composer/bin
/lib/composer/bamarni
/vendor-bin/**/vendor
./.htaccess
core/js/mimetypelist.js
# Tests - Legacy cypress (to not clobber the directory when changing branches)
/cypress
/.direnv