From: Philipp Date: Sun, 27 Nov 2022 00:52:14 +0000 (+0100) Subject: Apply suggestions from code review X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=272911527cc7dd5a32fdf1a24eca641ed31be402;p=friendica.git Apply suggestions from code review Co-authored-by: Hypolite Petovan --- diff --git a/src/Module/Media/Attachment/Browser.php b/src/Module/Media/Attachment/Browser.php index ed9ae74a3f..86ea00faf8 100644 --- a/src/Module/Media/Attachment/Browser.php +++ b/src/Module/Media/Attachment/Browser.php @@ -66,7 +66,6 @@ class Browser extends BaseModule $files = Attach::selectToArray(['id', 'filename', 'filetype'], ['uid' => $this->session->getLocalUserId()]); - $fileArray = array_map([$this, 'map_files'], $files); $tpl = Renderer::getMarkupTemplate('media/browser.tpl'); diff --git a/src/Module/Media/Attachment/Upload.php b/src/Module/Media/Attachment/Upload.php index b11469f5af..0bc95fe792 100644 --- a/src/Module/Media/Attachment/Upload.php +++ b/src/Module/Media/Attachment/Upload.php @@ -74,7 +74,6 @@ class Upload extends \Friendica\BaseModule } $owner = User::getOwnerDataById($this->userSession->getLocalUserId()); - if (!$owner) { $this->logger->warning('Owner not found.', ['uid' => $this->userSession->getLocalUserId()]); return $this->return(401, $this->t('Invalid request.')); diff --git a/view/js/module/media/browser.js b/view/js/module/media/browser.js index 7790e2588b..c78a7f13b6 100644 --- a/view/js/module/media/browser.js +++ b/view/js/module/media/browser.js @@ -67,8 +67,6 @@ const Browser = { Browser.id = h.split('-')[1]; } - console.log('FileBrowser:', nickname, type, Browser.event, Browser.id); - $('.error a.close').on('click', function (e) { e.preventDefault(); $('.error').addClass('hidden'); @@ -90,7 +88,6 @@ const Browser = { if (Browser.type === "attachment") { embed = '[attachment]' + this.dataset.link + '[/attachment]'; } - console.log(Browser.event, this.dataset.filename, embed, Browser.id); parent.$('body').trigger(Browser.event, [ this.dataset.filename, embed, diff --git a/view/theme/frio/js/module/media/browser.js b/view/theme/frio/js/module/media/browser.js index c89f426ebd..ccd2e1b5be 100644 --- a/view/theme/frio/js/module/media/browser.js +++ b/view/theme/frio/js/module/media/browser.js @@ -56,7 +56,7 @@ * IMPORTANT * * This is a modified version to work with - * the frio theme.and bootstrap modals + * the frio theme and Bootstrap modals * * The original file is under: * js/module/media/browser.js @@ -86,8 +86,6 @@ var Browser = { } } - console.log('FileBrowser: ' + nickname, type, Browser.event, Browser.id); - Browser.postLoad(); $('.error .close').on('click', function (e) {