refactor: Replace OC::$server->getL10N by Util::getL10N

This makes the code more consistent with stable33 and later.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2026-04-28 08:48:53 +02:00
parent b57ad01cc2
commit b3bcd49a6c
2 changed files with 2 additions and 2 deletions

View file

@ -21,6 +21,7 @@ use OCP\IRequest;
use OCP\IUser;
use OCP\IUserSession;
use OCP\Server;
use OCP\Util;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Sabre\CardDAV\Backend;
@ -53,7 +54,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome {
*/
public function getChildren() {
if ($this->l10n === null) {
$this->l10n = \OC::$server->getL10N('dav');
$this->l10n = Util::getL10N('dav');
}
if ($this->config === null) {
$this->config = Server::get(IConfig::class);

View file

@ -594,7 +594,6 @@
<file src="apps/dav/lib/CardDAV/UserAddressBooks.php">
<DeprecatedMethod>
<code><![CDATA[getAppValue]]></code>
<code><![CDATA[getL10N]]></code>
</DeprecatedMethod>
<InvalidArgument>
<code><![CDATA[$this->principalUri]]></code>