From 1f9024763d9224c4cd9a181bac27e6b9f12ad672 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Wed, 18 Sep 2024 14:14:53 -0400 Subject: refactor --- src/web/helpers/image.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/web/helpers/image.php') diff --git a/src/web/helpers/image.php b/src/web/helpers/image.php index fd395b5..ec867b8 100644 --- a/src/web/helpers/image.php +++ b/src/web/helpers/image.php @@ -1,6 +1,7 @@ get_url('public/' . $name . '.' . $format, TRUE); + $path = Core::get_url('public/' . $name . '.' . $format, TRUE); $mime = __get_mime($format); return sprintf('', $mime, $path, $media); @@ -45,8 +45,8 @@ function image( $height = NULL, $width = NULL, - $size = NULL, -) :string { + $size = NULL) :string +{ if ($animated === TRUE) { $animated = array('gif'); @@ -68,8 +68,7 @@ function image( } $format = end($formats); - $main = $GLOBALS['main_model']; - $path = $main->get_url('public/' . $name . '.' . $format, TRUE); + $path = Core::get_url('public/' . $name . '.' . $format, TRUE); $out .= "