Apply suggestions from code review

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Philipp 2022-11-27 01:52:14 +01:00 committed by GitHub
parent 4e53ba0c20
commit 272911527c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 8 deletions

View File

@ -66,7 +66,6 @@ class Browser extends BaseModule
$files = Attach::selectToArray(['id', 'filename', 'filetype'], ['uid' => $this->session->getLocalUserId()]); $files = Attach::selectToArray(['id', 'filename', 'filetype'], ['uid' => $this->session->getLocalUserId()]);
$fileArray = array_map([$this, 'map_files'], $files); $fileArray = array_map([$this, 'map_files'], $files);
$tpl = Renderer::getMarkupTemplate('media/browser.tpl'); $tpl = Renderer::getMarkupTemplate('media/browser.tpl');

View File

@ -74,7 +74,6 @@ class Upload extends \Friendica\BaseModule
} }
$owner = User::getOwnerDataById($this->userSession->getLocalUserId()); $owner = User::getOwnerDataById($this->userSession->getLocalUserId());
if (!$owner) { if (!$owner) {
$this->logger->warning('Owner not found.', ['uid' => $this->userSession->getLocalUserId()]); $this->logger->warning('Owner not found.', ['uid' => $this->userSession->getLocalUserId()]);
return $this->return(401, $this->t('Invalid request.')); return $this->return(401, $this->t('Invalid request.'));

View File

@ -67,8 +67,6 @@ const Browser = {
Browser.id = h.split('-')[1]; Browser.id = h.split('-')[1];
} }
console.log('FileBrowser:', nickname, type, Browser.event, Browser.id);
$('.error a.close').on('click', function (e) { $('.error a.close').on('click', function (e) {
e.preventDefault(); e.preventDefault();
$('.error').addClass('hidden'); $('.error').addClass('hidden');
@ -90,7 +88,6 @@ const Browser = {
if (Browser.type === "attachment") { if (Browser.type === "attachment") {
embed = '[attachment]' + this.dataset.link + '[/attachment]'; embed = '[attachment]' + this.dataset.link + '[/attachment]';
} }
console.log(Browser.event, this.dataset.filename, embed, Browser.id);
parent.$('body').trigger(Browser.event, [ parent.$('body').trigger(Browser.event, [
this.dataset.filename, this.dataset.filename,
embed, embed,

View File

@ -56,7 +56,7 @@
* IMPORTANT * IMPORTANT
* *
* This is a modified version to work with * 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: * The original file is under:
* js/module/media/browser.js * js/module/media/browser.js
@ -86,8 +86,6 @@ var Browser = {
} }
} }
console.log('FileBrowser: ' + nickname, type, Browser.event, Browser.id);
Browser.postLoad(); Browser.postLoad();
$('.error .close').on('click', function (e) { $('.error .close').on('click', function (e) {