]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_upload.php
updated JA translation THX Ozero Dien
[friendica.git] / mod / wall_upload.php
index 2f92b2f03cde260121aab3f85bfa71434948d588..fd33cdd17af813ce4b8f5b28172ae56df4dee3ee 100644 (file)
@@ -1,15 +1,31 @@
 <?php
 /**
- * @file mod/wall_upload.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  * 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;
 use Friendica\Core\Logger;
 use Friendica\Core\Session;
 use Friendica\Database\DBA;
@@ -179,7 +195,7 @@ function wall_upload_post(App $a, $desktopmode = true)
        Logger::log("File upload src: " . $src . " - filename: " . $filename .
                " - size: " . $filesize . " - type: " . $filetype, Logger::DEBUG);
 
-       $maximagesize = Config::get('system', 'maximagesize');
+       $maximagesize = DI::config()->get('system', 'maximagesize');
 
        if (($maximagesize) && ($filesize > $maximagesize)) {
                $msg = DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize));
@@ -209,7 +225,7 @@ function wall_upload_post(App $a, $desktopmode = true)
        $Image->orient($src);
        @unlink($src);
 
-       $max_length = Config::get('system', 'max_image_length');
+       $max_length = DI::config()->get('system', 'max_image_length');
        if (!$max_length) {
                $max_length = MAX_IMAGE_LENGTH;
        }