* @author Fabio Comuni <fabrixxm@kirgroup.com>
*/
+use Friendica\App;
+use Friendica\Core\System;
+
require_once('include/Photo.php');
/**
$types = Photo::supportedTypes();
$ext = $types[$rr['type']];
- if ($a->theme['template_engine'] === 'internal') {
+ if($a->theme['template_engine'] === 'internal') {
$filename_e = template_escape($rr['filename']);
- } else {
+ }
+ else {
$filename_e = $rr['filename'];
}
$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);
$o = replace_macros($tpl, array(
'$type' => 'image',
- '$baseurl' => App::get_baseurl(),
+ '$baseurl' => System::baseUrl(),
'$path' => $path,
'$folders' => $albums,
'$files' => $files,
$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);
$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,