From: rabuzarus <> Date: Sat, 25 Mar 2017 20:07:12 +0000 (+0100) Subject: make use of Config class X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b6ab3bdd360dc6e326807a826855193b6d4b7726;p=friendica.git make use of Config class --- diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 3e88bd76b5..d29efecc6a 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -9,8 +9,11 @@ * to the url */ +use \Friendica\Core\Config; + require_once 'include/Photo.php'; + function wall_upload_post(App $a, $desktopmode = true) { logger("wall upload: starting new upload", LOGGER_DEBUG); @@ -172,7 +175,7 @@ function wall_upload_post(App $a, $desktopmode = true) { logger("File upload src: " . $src . " - filename: " . $filename . " - size: " . $filesize . " - type: " . $filetype, LOGGER_DEBUG); - $maximagesize = get_config('system', 'maximagesize'); + $maximagesize = Config::get('system', 'maximagesize'); if (($maximagesize) && ($filesize > $maximagesize)) { $msg = sprintf(t('Image exceeds size limit of %s'), formatBytes($maximagesize)); @@ -225,7 +228,7 @@ function wall_upload_post(App $a, $desktopmode = true) { $ph->orient($src); @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; }