X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffbrowser.php;h=559896acb13932ea6c690b4dd93d6dca0a385ef2;hb=0a447cb61ba8ecb0e182dde6e0bb15297990db6a;hp=c6e669d0228d67d82d3aa2e3af624ebef0564947;hpb=895b3abf320a28ecf0f797f4f4900e6baf429308;p=friendica.git diff --git a/mod/fbrowser.php b/mod/fbrowser.php index c6e669d022..559896acb1 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -14,6 +14,8 @@ use Friendica\Object\Image; /** * @param App $a + * @return string + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ function fbrowser_content(App $a) { @@ -26,10 +28,8 @@ function fbrowser_content(App $a) } $template_file = "filebrowser.tpl"; - $mode = ""; - if (!empty($_GET['mode'])) { - $mode = "?mode=".$_GET['mode']; - } + + $o = ''; switch ($a->argv[1]) { case "image": @@ -53,12 +53,11 @@ function fbrowser_content(App $a) $albums = array_map("_map_folder1", $albums); } - $album = ""; - if ($a->argc==3) { + if ($a->argc == 3) { $album = hex2bin($a->argv[2]); $sql_extra = sprintf("AND `album` = '%s' ", DBA::escape($album)); $sql_extra2 = ""; - $path[]=[$a->argv[2], $album]; + $path[] = [$a->argv[2], $album]; } $r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`type`) AS `type`, @@ -116,8 +115,7 @@ function fbrowser_content(App $a) function _map_files2($rr) { - $a = \get_app(); - list($m1,$m2) = explode("/", $rr['filetype']); + list($m1, $m2) = explode("/", $rr['filetype']); $filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip"); $filename_e = $rr['filename'];