File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,27 @@ public function getConfigValue($path)
8888 );
8989 }
9090
91+
92+ /**
93+ * This is used for the Gd2
94+ *
95+ * @return array
96+ */
97+ public function getImageFiletypes ()
98+ {
99+ return [
100+ 'jpg ' ,
101+ 'jpeg ' ,
102+ 'png ' ,
103+ 'gif ' ,
104+ 'webp ' ,
105+ 'bmp ' ,
106+ 'xpm ' ,
107+ 'xbm ' ,
108+ 'wbmp '
109+ ];
110+ }
111+
91112 /**
92113 * Get extra file types (allowed)
93114 *
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ public function __construct(
3131 array $ data = []
3232 ) {
3333 $ this ->settings = $ helperSettings ;
34-
3534 parent ::__construct ($ filesystem , $ logger , $ data );
3635 }
3736
@@ -46,7 +45,7 @@ public function open($filename)
4645 {
4746 $ pathInfo = pathinfo ($ filename );
4847 if (key_exists ('extension ' , $ pathInfo )
49- && in_array ($ pathInfo ['extension ' ], $ this ->settings ->getExtraFiletypes ())
48+ && in_array ($ pathInfo ['extension ' ], $ this ->settings ->getImageFiletypes ())
5049 ) {
5150 parent ::open ($ filename );
5251 }
@@ -66,7 +65,7 @@ public function save($destination = null, $newName = null)
6665 $ fileName = $ this ->_prepareDestination ($ destination , $ newName );
6766 $ pathInfo = pathinfo ($ fileName );
6867 if (key_exists ('extension ' , $ pathInfo )
69- && in_array ($ pathInfo ['extension ' ], $ this ->settings ->getExtraFiletypes ())
68+ && in_array ($ pathInfo ['extension ' ], $ this ->settings ->getImageFiletypes ())
7069 ) {
7170 parent ::save ($ destination , $ newName );
7271 }
You can’t perform that action at this time.
0 commit comments