]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_upload.php
added spaces + some curly braces + some usage of dbm::is_result()
[friendica.git] / mod / wall_upload.php
index 3e88bd76b537404cf5b8bb510a9fe9f319f84bda..a35e86a5297a098d75aa9d2a89e861e4bcc9470c 100644 (file)
@@ -3,12 +3,15 @@
 /**
  * @file mod/wall_upload.php
  * @brief Module for uploading a picture to the profile wall
- * 
+ *
  * By default the picture will be stored in the photo album with the name Wall Photos.
  * You can specify a different album by adding an optional query string "album="
  * to the url
  */
 
+use Friendica\App;
+use Friendica\Core\Config;
+
 require_once 'include/Photo.php';
 
 function wall_upload_post(App $a, $desktopmode = true) {
@@ -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;
        }