]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
rename CSS attributes notify => notification
[friendica.git] / mod / photos.php
index db30c7d94c0e908569873a87fb0c0f6eab2ad823..5b8d22b655fa7ec8fd9103f5b5045643ac77ecb8 100644 (file)
@@ -9,9 +9,7 @@ use Friendica\Content\Nav;
 use Friendica\Content\Pager;
 use Friendica\Content\Text\BBCode;
 use Friendica\Core\ACL;
-use Friendica\Core\Config;
 use Friendica\Core\Hook;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session;
@@ -37,7 +35,7 @@ use Friendica\Util\XML;
 
 function photos_init(App $a) {
 
-       if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
+       if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
                return;
        }
 
@@ -697,7 +695,7 @@ function photos_post(App $a)
 
        Logger::log('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', Logger::DEBUG);
 
-       $maximagesize = Config::get('system', 'maximagesize');
+       $maximagesize = DI::config()->get('system', 'maximagesize');
 
        if ($maximagesize && ($filesize > $maximagesize)) {
                notice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize)) . EOL);
@@ -733,7 +731,7 @@ function photos_post(App $a)
        $exif = $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;
        }
@@ -834,7 +832,7 @@ function photos_content(App $a)
        // photos/name/image/xxxxx/edit
        // photos/name/image/xxxxx/drop
 
-       if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
+       if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
                notice(DI::l10n()->t('Public access denied.') . EOL);
                return;
        }
@@ -1158,7 +1156,7 @@ function photos_content(App $a)
                 * The query leads to a really intense used index.
                 * By now we hide it if someone wants to.
                 */
-               if ($cmd === 'view' && !Config::get('system', 'no_count', false)) {
+               if ($cmd === 'view' && !DI::config()->get('system', 'no_count', false)) {
                        $order_field = $_GET['order'] ?? '';
 
                        if ($order_field === 'posted') {
@@ -1238,7 +1236,7 @@ function photos_content(App $a)
                        } else {
                                $tools['edit'] = ['photos/' . $a->data['user']['nickname'] . '/image/' . $datum . '/edit', DI::l10n()->t('Edit photo')];
                                $tools['delete'] = ['photos/' . $a->data['user']['nickname'] . '/image/' . $datum . '/drop', DI::l10n()->t('Delete photo')];
-                               $tools['profile'] = ['profile_photo/use/'.$ph[0]['resource-id'], DI::l10n()->t('Use as profile photo')];
+                               $tools['profile'] = ['settings/profile/photo/crop/' . $ph[0]['resource-id'], DI::l10n()->t('Use as profile photo')];
                        }
 
                        if (