diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-03-24 09:58:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-24 09:58:21 +0000 |
commit | 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 (patch) | |
tree | 4ad4413b0c00d1a478111b031d9de46218f31a89 /include/photos.php | |
parent | acc1834b0dc4804703610101fa95a3375649bc45 (diff) | |
download | volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.gz volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.bz2 volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.zip |
Deprecate *_config() functions in core.
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 9 |
1 files changed, 5 insertions, 4 deletions
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) |