Changes after code review

This commit is contained in:
Michael 2023-05-03 21:14:35 +00:00
parent b4b9a6a34a
commit bf4d19eed3
3 changed files with 9 additions and 9 deletions

View file

@ -3143,14 +3143,14 @@ class Item
}
if (!empty($shared_attachments)) {
$s = self::AddGallery($s, $shared_attachments, $item['uri-id']);
$s = self::addGallery($s, $shared_attachments, $item['uri-id']);
$s = self::addVisualAttachments($shared_attachments, $shared_item, $s, true);
$s = self::addLinkAttachment($shared_uri_id ?: $item['uri-id'], $shared_attachments, $body, $s, true, $quote_shared_links);
$s = self::addNonVisualAttachments($shared_attachments, $item, $s, true);
$body = BBCode::removeSharedData($body);
}
$s = self::AddGallery($s, $attachments, $item['uri-id']);
$s = self::addGallery($s, $attachments, $item['uri-id']);
$s = self::addVisualAttachments($attachments, $item, $s, false);
$s = self::addLinkAttachment($item['uri-id'], $attachments, $body, $s, false, $shared_links);
$s = self::addNonVisualAttachments($attachments, $item, $s, false);
@ -3208,7 +3208,7 @@ class Item
* @param integer $uri_id
* @return string
*/
private static function AddGallery(string $s, array $attachments, int $uri_id): string
private static function addGallery(string $s, array $attachments, int $uri_id): string
{
foreach ($attachments['visual'] as $attachment) {
if (empty($attachment['preview']) || ($attachment['type'] != Post\Media::IMAGE)) {

View file

@ -7,7 +7,7 @@
<link rel="stylesheet" href="view/asset/jgrowl/jquery.jgrowl.min.css?v={{$smarty.const.FRIENDICA_VERSION}}" type="text/css" media="screen" />
<link rel="stylesheet" href="view/asset/jquery-datetimepicker/build/jquery.datetimepicker.min.css?v={{$smarty.const.FRIENDICA_VERSION}}" type="text/css" media="screen" />
<link rel="stylesheet" href="view/asset/perfect-scrollbar/dist/css/perfect-scrollbar.min.css?v={{$smarty.const.FRIENDICA_VERSION}}" type="text/css" media="screen" />
<link rel="stylesheet" href="view/js/fancybox/jquery.fancybox.min.css?v=2023.06-dev" type="text/css" media="screen" />
<link rel="stylesheet" href="view/js/fancybox/jquery.fancybox.min.css?v={{$smarty.const.FRIENDICA_VERSION}}" type="text/css" media="screen" />
{{foreach $stylesheets as $stylesheetUrl => $media}}
<link rel="stylesheet" href="{{$stylesheetUrl}}" type="text/css" media="{{$media}}" />
@ -45,8 +45,8 @@
<script type="text/javascript" src="view/asset/imagesloaded/imagesloaded.pkgd.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/asset/base64/base64.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/asset/dompurify/dist/purify.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/js/fancybox/jquery.fancybox.min.js?v=2023.06-dev"></script>
<script type="text/javascript" src="view/js/fancybox/fancybox.config.js?v=2023.06-dev"></script>
<script type="text/javascript" src="view/js/fancybox/jquery.fancybox.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/js/fancybox/fancybox.config.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript">
const updateInterval = {{$update_interval}};
const localUser = {{if $local_user}}{{$local_user}}{{else}}false{{/if}};

View file

@ -49,7 +49,7 @@
type="text/css" media="screen" />
<link rel="stylesheet" href="view/theme/frio/font/open_sans/open-sans.css?v={{$smarty.const.FRIENDICA_VERSION}}"
type="text/css" media="screen" />
<link rel="stylesheet" href="view/js/fancybox/jquery.fancybox.min.css?v=2023.06-dev"
<link rel="stylesheet" href="view/js/fancybox/jquery.fancybox.min.css?v={{$smarty.const.FRIENDICA_VERSION}}"
type="text/css" media="screen" />
{{* own css files *}}
@ -146,8 +146,8 @@
<script type="text/javascript" src="vendor/enyo/dropzone/dist/min/dropzone.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/js/dropzone-factory.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript"> const dzFactory = new DzFactory({{$max_imagesize}});</script>
<script type="text/javascript" src="view/js/fancybox/jquery.fancybox.min.js?v=2023.06-dev"></script>
<script type="text/javascript" src="view/js/fancybox/fancybox.config.js?v=2023.06-dev"></script>
<script type="text/javascript" src="view/js/fancybox/jquery.fancybox.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript" src="view/js/fancybox/fancybox.config.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
{{* Include the strings which are needed for some js functions (e.g. translation)
They are loaded into the html <head> so that js functions can use them *}}