Skip to content

Commit 8a135ab

Browse files
committed
feat: Add deprecations related to utils
Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent a9e427c commit 8a135ab

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

developer_manual/release_notes/critical_changes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ Removed back-end APIs
6464
- ``\OCP\AppFramework\Http\StrictContentSecurityPolicy``
6565
- ``\OCP\AppFramework\Http\StrictEvalContentSecurityPolicy``
6666
- ``\OCP\AppFramework\Http\StrictInlineContentSecurityPolicy``
67+
- Various methods from the legacy ``OC_Util`` static class were removed.
68+
- Instead of ``\OC_Util::encodePath`` use ``\OCP\Util::encodePath``.
69+
- Instead of ``\OC_Util::sanitizeHTML`` use ``\OCP\Util::sanitizeHTML``
70+
- Instead of ``\OC_Util::redirectToDefaultPage`` and ``\OC_Util::getDefaultPageUrl`` use ``\OCP\IUrlGenerator::linkToDefaultPageUrl``
71+
- Instead of ``\OC_Util::checkAdminUser`` use ``IGroupManager::class::isAdmin``
6772

6873

6974
Unified sharing

developer_manual/release_notes/deprecations.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ New deprecations
2020
2121
.. todo:: This page needs a section for every new deprecation.
2222

23+
- ``\OCP\Util::setChannel`` is now deprecated and you need to use ``\OCP\ServerVersion::setChannel`` instead.
24+
- ``\OCP\Util::linkToAbsolute`` is now deprecated and you need to use ``\OCP\IUrlGenerator::getAbsoluteUrl`` and ``\OCP\IUrlGenerator::linkTo`` instead.
25+
- ``\OCP\Util::linkToRemove`` is now deprecated and you need to use ``\OCP\IUrlGenerator::linkToRemote`` instead.
26+
- ``\OCP\Util::isPublicLinkPasswordRequired`` is now deprecated and you need to use ``\OCP\Share\IManager::shareApiLinkEnforcePassword`` instead.
27+
- ``\OCP\Util::isDefaultExpireDateEnforced`` is now deprecated and you need to use ``\OCP\Share\IManager::shareApiLinkDefaultExpireDateEnforced`` instead.
28+
2329
Older deprecations
2430
------------------
2531

0 commit comments

Comments
 (0)