FIX Disable svg as supported image by default. Set
MAIN_ALLOW_SVG_FILES_AS_IMAGES to 1 to have svg working.
This commit is contained in:
parent
01babc452c
commit
c6ee80eefd
@ -151,6 +151,7 @@ if ($action == 'create')
|
|||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">'."\n";
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">'."\n";
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewBookmark"));
|
print load_fiche_titre($langs->trans("NewBookmark"));
|
||||||
|
|
||||||
|
|||||||
@ -158,7 +158,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create&backtopage='.urlencode(DOL_URL_ROOT.'/bookmarks/list.php'), '', !empty($user->rights->bookmark->creer));
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,12 @@ $quality = 80;
|
|||||||
*/
|
*/
|
||||||
function image_format_supported($file)
|
function image_format_supported($file)
|
||||||
{
|
{
|
||||||
$regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm|\.svg'; // See also into product.class.php
|
global $conf;
|
||||||
|
|
||||||
|
$regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into product.class.php
|
||||||
|
if (! empty($conf->global->MAIN_ALLOW_PREVIEW_OF_UPLOADED_SVG_FILES)) {
|
||||||
|
$regeximgext .= '|\.svg'; // Not allowed by default. SVG can contains javascript
|
||||||
|
}
|
||||||
|
|
||||||
// Case filename is not a format image
|
// Case filename is not a format image
|
||||||
$reg = array();
|
$reg = array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user