diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-08-27 16:18:42 +0200 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-08-29 17:06:32 +0200 |
commit | 47d2cb7479b416bfb7125ae434fc1d280f1312ce (patch) | |
tree | cab0cd0a0c58e1d5d2725fbe311f06469b7c272f /lib | |
parent | 6d04ad829b2814090301b0101dc10fa0617dd783 (diff) | |
download | nextcloud-server-47d2cb7479b416bfb7125ae434fc1d280f1312ce.tar.gz nextcloud-server-47d2cb7479b416bfb7125ae434fc1d280f1312ce.zip |
fix: Move \OC_Image to \OC\Image with the other internal classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 2 | ||||
-rw-r--r-- | lib/private/Image.php (renamed from lib/private/legacy/OC_Image.php) | 14 | ||||
-rw-r--r-- | lib/public/Image.php | 2 |
4 files changed, 12 insertions, 8 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index c962dc72d70..b8d0dd35f12 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -1636,6 +1636,7 @@ return array( 'OC\\Http\\Client\\Response' => $baseDir . '/lib/private/Http/Client/Response.php', 'OC\\Http\\CookieHelper' => $baseDir . '/lib/private/Http/CookieHelper.php', 'OC\\Http\\WellKnown\\RequestManager' => $baseDir . '/lib/private/Http/WellKnown/RequestManager.php', + 'OC\\Image' => $baseDir . '/lib/private/Image.php', 'OC\\InitialStateService' => $baseDir . '/lib/private/InitialStateService.php', 'OC\\Installer' => $baseDir . '/lib/private/Installer.php', 'OC\\IntegrityCheck\\Checker' => $baseDir . '/lib/private/IntegrityCheck/Checker.php', @@ -2003,7 +2004,6 @@ return array( 'OC_Files' => $baseDir . '/lib/private/legacy/OC_Files.php', 'OC_Helper' => $baseDir . '/lib/private/legacy/OC_Helper.php', 'OC_Hook' => $baseDir . '/lib/private/legacy/OC_Hook.php', - 'OC_Image' => $baseDir . '/lib/private/legacy/OC_Image.php', 'OC_JSON' => $baseDir . '/lib/private/legacy/OC_JSON.php', 'OC_Response' => $baseDir . '/lib/private/legacy/OC_Response.php', 'OC_Template' => $baseDir . '/lib/private/legacy/OC_Template.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index cedd2d8e8d0..646a41626b7 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -1669,6 +1669,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC\\Http\\Client\\Response' => __DIR__ . '/../../..' . '/lib/private/Http/Client/Response.php', 'OC\\Http\\CookieHelper' => __DIR__ . '/../../..' . '/lib/private/Http/CookieHelper.php', 'OC\\Http\\WellKnown\\RequestManager' => __DIR__ . '/../../..' . '/lib/private/Http/WellKnown/RequestManager.php', + 'OC\\Image' => __DIR__ . '/../../..' . '/lib/private/Image.php', 'OC\\InitialStateService' => __DIR__ . '/../../..' . '/lib/private/InitialStateService.php', 'OC\\Installer' => __DIR__ . '/../../..' . '/lib/private/Installer.php', 'OC\\IntegrityCheck\\Checker' => __DIR__ . '/../../..' . '/lib/private/IntegrityCheck/Checker.php', @@ -2036,7 +2037,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC_Files' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Files.php', 'OC_Helper' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Helper.php', 'OC_Hook' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Hook.php', - 'OC_Image' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Image.php', 'OC_JSON' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_JSON.php', 'OC_Response' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Response.php', 'OC_Template' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Template.php', diff --git a/lib/private/legacy/OC_Image.php b/lib/private/Image.php index 37cf6b697ac..42a3710b99e 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/Image.php @@ -1,17 +1,21 @@ <?php declare(strict_types=1); + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + +namespace OC; + use OCP\IImage; /** * Class for basic image manipulation */ -class OC_Image implements \OCP\IImage { +class Image implements IImage { // Default memory limit for images to load (256 MBytes). protected const DEFAULT_MEMORY_LIMIT = 256; @@ -1099,7 +1103,7 @@ class OC_Image implements \OCP\IImage { } public function copy(): IImage { - $image = new OC_Image(null, $this->logger, $this->config); + $image = new self(null, $this->logger, $this->config); $image->resource = imagecreatetruecolor($this->width(), $this->height()); imagecopy( $image->resource(), @@ -1116,7 +1120,7 @@ class OC_Image implements \OCP\IImage { } public function cropCopy(int $x, int $y, int $w, int $h): IImage { - $image = new OC_Image(null, $this->logger, $this->config); + $image = new self(null, $this->logger, $this->config); $image->imageType = $this->imageType; $image->mimeType = $this->mimeType; $image->resource = $this->cropNew($x, $y, $w, $h); @@ -1125,7 +1129,7 @@ class OC_Image implements \OCP\IImage { } public function preciseResizeCopy(int $width, int $height): IImage { - $image = new OC_Image(null, $this->logger, $this->config); + $image = new self(null, $this->logger, $this->config); $image->imageType = $this->imageType; $image->mimeType = $this->mimeType; $image->resource = $this->preciseResizeNew($width, $height); @@ -1134,7 +1138,7 @@ class OC_Image implements \OCP\IImage { } public function resizeCopy(int $maxSize): IImage { - $image = new OC_Image(null, $this->logger, $this->config); + $image = new self(null, $this->logger, $this->config); $image->imageType = $this->imageType; $image->mimeType = $this->mimeType; $image->resource = $this->resizeNew($maxSize); diff --git a/lib/public/Image.php b/lib/public/Image.php index e2565cca9a4..a9aab778207 100644 --- a/lib/public/Image.php +++ b/lib/public/Image.php @@ -14,5 +14,5 @@ namespace OCP; * This class provides functions to handle images * @since 6.0.0 */ -class Image extends \OC_Image { +class Image extends \OC\Image { } |