From 6be3e0bf949bdf85a635e0bc5a46db5a742caae8 Mon Sep 17 00:00:00 2001 From: e107steved Date: Sun, 10 Oct 2010 21:26:18 +0000 Subject: [PATCH] tif files not generally supported, but svg are --- e107_core/shortcodes/single/imageselector.php | 2 +- e107_core/shortcodes/single/imageselector.sc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/single/imageselector.php b/e107_core/shortcodes/single/imageselector.php index 3cc20fbfd..717a28105 100644 --- a/e107_core/shortcodes/single/imageselector.php +++ b/e107_core/shortcodes/single/imageselector.php @@ -39,7 +39,7 @@ function imageselector_shortcode($parm = '', $mod = '') { $qry = "SELECT * FROM `#core_media` WHERE media_userclass IN (".USERCLASS_LIST.") "; $qry .= vartrue($parms['media']) && $parms['media'] !== 'all' ? " AND media_category='".$tp->toDB($parms['media'])."' " : " AND `media_category` NOT REGEXP '_icon_16|_icon_32|_icon_48|_icon_64' "; - $qry .= " AND media_url REGEXP '.jpg|.png|.gif|.JPG|.PNG|.GIF' ORDER BY media_name"; + $qry .= " AND media_url REGEXP '\.jpg$|\.png$|\.gif$|\.jpeg$|\.svn$|\.JPG$|\.PNG$|\.GIF$|\.jpeg$|\.SVN$' ORDER BY media_name"; // FIXME - media_type=image? if($sql->db_Select_gen($qry)) { diff --git a/e107_core/shortcodes/single/imageselector.sc b/e107_core/shortcodes/single/imageselector.sc index 950c7a569..57e851945 100644 --- a/e107_core/shortcodes/single/imageselector.sc +++ b/e107_core/shortcodes/single/imageselector.sc @@ -39,7 +39,7 @@ if($scaction == 'select' || $scaction == 'all') foreach($paths as $pths) { - $imagelist[$tp->createConstants($pths, 'mix')]= $fl->get_files($pths,'\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG|\.jpeg|\.JPEG|\.tif|\.TIF|\.tiff|\.TIFF', 'standard', $recurse); + $imagelist[$tp->createConstants($pths, 'mix')]= $fl->get_files($pths,'\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG|\.jpeg|\.JPEG|\.svg|\.SVG', 'standard', $recurse); }