]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Move Notify::TYPE_MAIL
[friendica.git] / mod / photos.php
index db30c7d94c0e908569873a87fb0c0f6eab2ad823..0733bbc96001f5e1fe0d98afd04241a5d166145f 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;
@@ -23,6 +21,7 @@ use Friendica\Model\Item;
 use Friendica\Model\Photo;
 use Friendica\Model\Profile;
 use Friendica\Model\User;
+use Friendica\Module\BaseProfile;
 use Friendica\Network\Probe;
 use Friendica\Object\Image;
 use Friendica\Protocol\Activity;
@@ -37,7 +36,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 +696,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 +732,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 +833,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;
        }
@@ -916,7 +915,7 @@ function photos_content(App $a)
 
        // tabs
        $is_owner = (local_user() && (local_user() == $owner_uid));
-       $o .= Profile::getTabs($a, 'photos', $is_owner, $a->data['user']['nickname']);
+       $o .= BaseProfile::getTabsHTML($a, 'photos', $is_owner, $a->data['user']['nickname']);
 
        // Display upload form
        if ($datatype === 'upload') {
@@ -1158,7 +1157,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 +1237,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 (