X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffbrowser.php;h=ce90eaee9152980c28aef8619339da3dfd2a29bf;hb=db04a78d844f5fc528bf7ffb2c2c04767ab64b5f;hp=9a0e9244c1cbb617511187d7273f58f853e077db;hpb=4d591c4a074a11bb27f5fe0981a13125d4ef2e02;p=friendica.git diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 9a0e9244c1..ce90eaee91 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -5,6 +5,9 @@ * @author Fabio Comuni */ +use Friendica\App; +use Friendica\Core\System; + require_once('include/Photo.php'); /** @@ -53,7 +56,8 @@ function fbrowser_content(App $a) { $path[]=array($a->argv[2], $album); } - $r = q("SELECT `resource-id`, `id`, `filename`, type, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `desc` + $r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`type`) AS `type`, + min(`scale`) AS `hiq`, max(`scale`) AS `loq`, ANY_VALUE(`desc`) AS `desc`, ANY_VALUE(`created`) AS `created` FROM `photo` WHERE `uid` = %d $sql_extra AND `album` != '%s' AND `album` != '%s' GROUP BY `resource-id` $sql_extra2", intval(local_user()), @@ -82,9 +86,9 @@ function fbrowser_content(App $a) { $scale = $rr['loq']; return array( - App::get_baseurl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'], + System::baseUrl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'], $filename_e, - App::get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext + System::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext ); } $files = array_map("_map_files1", $r); @@ -93,7 +97,7 @@ function fbrowser_content(App $a) { $o = replace_macros($tpl, array( '$type' => 'image', - '$baseurl' => App::get_baseurl(), + '$baseurl' => System::baseUrl(), '$path' => $path, '$folders' => $albums, '$files' => $files, @@ -120,7 +124,7 @@ function fbrowser_content(App $a) { $filename_e = $rr['filename']; } - return array( App::get_baseurl() . '/attach/' . $rr['id'], $filename_e, App::get_baseurl() . '/images/icons/16/' . $filetype . '.png'); + return array( System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png'); } $files = array_map("_map_files2", $files); @@ -128,7 +132,7 @@ function fbrowser_content(App $a) { $tpl = get_markup_template($template_file); $o = replace_macros($tpl, array( '$type' => 'file', - '$baseurl' => App::get_baseurl(), + '$baseurl' => System::baseUrl(), '$path' => array( array( "", t("Files")) ), '$folders' => false, '$files' =>$files,