<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$files = Attach::selectToArray(['id', 'filename', 'filetype'], ['uid' => $this->session->getLocalUserId()]);
-
$fileArray = array_map([$this, 'map_files'], $files);
- $tpl = Renderer::getMarkupTemplate('media/filebrowser.tpl');
+ $tpl = Renderer::getMarkupTemplate('media/browser.tpl');
$output = Renderer::replaceMacros($tpl, [
'$type' => 'attachment',
'$path' => ['' => $this->t('Files')],
protected function map_files(array $record): array
{
- [$m1, $m2] = explode('/', $record['filetype']);
+ list($m1, $m2) = explode('/', $record['filetype']);
$filetype = file_exists(sprintf('images/icons/%s.png', $m1) ? $m1 : 'text');
return [