diff options
author | Mario <mario@mariovavti.com> | 2024-07-06 11:05:22 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-07-06 11:05:22 +0000 |
commit | 45275910e606a02b12393714ea3b0409da440d61 (patch) | |
tree | 10b2d173d58cb930f8df28fe75af73dd4974c08c /include/photos.php | |
parent | 0c1d0f7498661fb34dcca6f3c6566e757af310a7 (diff) | |
parent | c04e781926a78e514cdf211fa24930a331149072 (diff) | |
download | volse-hubzilla-master.tar.gz volse-hubzilla-master.tar.bz2 volse-hubzilla-master.zip |
Merge branch '9.2RC'master
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) |