Commit f50098ec authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat(image): add image size's width and height

escape plugin description + replace codeigniter-icons with php-icons v1.2
parent 77e55835
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,5 +109,5 @@ class Autoload extends AutoloadConfig
     *
     * @var list<string>
     */
    public $helpers = ['auth', 'setting', 'icons', 'plugins'];
    public $helpers = ['auth', 'setting', 'plugins'];
}
+5 −6
+112 −171

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -45,10 +45,14 @@ class Image extends BaseMedia
        foreach ($this->sizes as $name => $size) {
            $extension = array_key_exists('extension', $size) ? $size['extension'] : $this->file_extension;
            $mimetype = array_key_exists('mimetype', $size) ? $size['mimetype'] : $this->file_mimetype;
            $width = array_key_exists('width', $size) ? $size['width'] : 0;
            $height = array_key_exists('height', $size) ? $size['height'] : 0;

            $this->{$name . '_key'} = change_file_path($this->file_key, '_' . $name, $extension);
            $this->{$name . '_url'} = service('file_manager')->getUrl($this->{$name . '_key'});
            $this->{$name . '_mimetype'} = $mimetype;
            $this->{$name . '_width'} = $width;
            $this->{$name . '_height'} = $height;
        }

        return true;
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ abstract class BasePlugin implements PluginInterface
        $description = lang($key);

        if ($description === $key) {
            return $this->manifest->description;
            return esc($this->manifest->description);
        }

        return $description;
Loading