]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Replace "group" with "circle" in database comments
[friendica.git] / mod / photos.php
index 5b225489ec3043edee0769145631c3654a9c5c01..0a8dc472d7c5eac89cb3ccd388a29d6b4c38c137 100644 (file)
@@ -32,6 +32,7 @@ use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Database\DBStructure;
+use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Item;
 use Friendica\Model\Photo;
@@ -374,9 +375,7 @@ function photos_post(App $a)
                        $arr['visible']       = 0;
                        $arr['origin']        = 1;
 
-                       $arr['body']          = '[url=' . DI::baseUrl() . '/photos/' . $user['nickname'] . '/image/' . $photo['resource-id'] . ']'
-                                               . '[img]' . DI::baseUrl() . '/photo/' . $photo['resource-id'] . '-' . $photo['scale'] . '.'. $ext . '[/img]'
-                                               . '[/url]';
+                       $arr['body']          = Images::getBBCodeByResource($photo['resource-id'], $user['nickname'], $photo['scale'], $ext);
 
                        $item_id = Item::insert($arr);
                }
@@ -713,7 +712,7 @@ function photos_content(App $a)
                // When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit.
                $maximagesize_bytes = (is_numeric($mis_bytes) && ($mis_bytes < $umf_bytes) ? $mis_bytes : $umf_bytes);
 
-               // @todo We may be want to use appropriate binary prefixed dynamicly
+               // @todo We may be want to use appropriate binary prefixed dynamically
                $usage_message = DI::l10n()->t('The maximum accepted image size is %s', Strings::formatBytes($maximagesize_bytes));
 
                $tpl = Renderer::getMarkupTemplate('photos_upload.tpl');
@@ -1139,8 +1138,6 @@ function photos_content(App $a)
                                                '$loading' => DI::l10n()->t('Loading...'),
                                                '$qcomment' => $qcomment,
                                                '$rand_num' => Crypto::randomDigits(12),
-                                               // Dropzone
-                                               '$max_imagesize' => round(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000, 1),
                                        ]);
                                }
                        }
@@ -1196,8 +1193,6 @@ function photos_content(App $a)
                                                '$preview' => DI::l10n()->t('Preview'),
                                                '$qcomment' => $qcomment,
                                                '$rand_num' => Crypto::randomDigits(12),
-                                               // Dropzone
-                                               '$max_imagesize' => round(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000, 1),
                                        ]);
                                }
 
@@ -1272,8 +1267,6 @@ function photos_content(App $a)
                                                        '$preview' => DI::l10n()->t('Preview'),
                                                        '$qcomment' => $qcomment,
                                                        '$rand_num' => Crypto::randomDigits(12),
-                                                       // Dropzone
-                                                       '$max_imagesize' => round(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000, 1),
                                                ]);
                                        }
                                }