From 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 24 Mar 2024 09:58:21 +0000 Subject: Deprecate *_config() functions in core. --- include/photos.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/photos.php') diff --git a/include/photos.php b/include/photos.php index 5e993e15f..85c97d1fd 100644 --- a/include/photos.php +++ b/include/photos.php @@ -6,6 +6,7 @@ use Zotlabs\Access\PermissionLimits; use Zotlabs\Lib\Activity; +use Zotlabs\Lib\Config; require_once('include/permissions.php'); require_once('include/items.php'); @@ -74,11 +75,11 @@ function photo_upload($channel, $observer, $args) { $os_storage = 0; - $max_thumb = get_config('system', 'max_thumbnail', 1600); + $max_thumb = Config::Get('system', 'max_thumbnail', 1600); if ($args['os_syspath'] && $args['getimagesize']) { if ($args['getimagesize'][0] > $max_thumb || $args['getimagesize'][1] > $max_thumb) { - $imagick_path = get_config('system', 'imagick_convert_path'); + $imagick_path = Config::Get('system', 'imagick_convert_path'); if ($imagick_path && @file_exists($imagick_path)) { $tmp_name = $args['os_syspath'] . '-001'; $newsize = photo_calculate_scale(array_merge($args['getimagesize'], ['max' => $max_thumb])); @@ -146,7 +147,7 @@ function photo_upload($channel, $observer, $args) { logger('Received file: ' . $filename . ' as ' . $src . ' (' . $type . ') ' . $filesize . ' bytes', LOGGER_DEBUG); - $maximagesize = get_config('system', 'maximagesize'); + $maximagesize = Config::Get('system', 'maximagesize'); if (($maximagesize) && ($filesize > $maximagesize)) { $ret['message'] = sprintf(t('Image exceeds website size limit of %lu bytes'), $maximagesize); @@ -219,7 +220,7 @@ function photo_upload($channel, $observer, $args) { @unlink($src); - $max_length = get_config('system', 'max_image_length'); + $max_length = Config::Get('system', 'max_image_length'); if (!$max_length) $max_length = MAX_IMAGE_LENGTH; if ($max_length > 0) -- cgit v1.2.3