Skip to content

Commit 3ea0760

Browse files
committed
Fixed J4 compatibility issue with upload field
1 parent c152fe2 commit 3ea0760

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ public static function uploadFile($name, $src) {
447447
$filename = JFile::makeSafe($fullFileName."_".mt_rand(10000000,99999999).".".$filetype);
448448

449449
$params = JComponentHelper::getParams('com_media');
450-
$allowable = array_map('trim', explode(',', $params->get('upload_extensions')));
450+
$allowable = array_map('trim', explode(',', $params->get('restrict_uploads_extensions')));
451451

452452
if ($filetype == '' || $filetype == false || (!in_array($filetype, $allowable) ))
453453
{

layouts/fields/file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
// fetching allowed types
2323
$params = JComponentHelper::getParams('com_media');
24-
$allowable = array_map('trim', explode(',', $params->get('upload_extensions')));
24+
$allowable = array_map('trim', explode(',', $params->get('restrict_uploads_extensions')));
2525
$allowedMaxSize = $params->get('upload_maxsize');
2626
$document = JFactory::getDocument();
2727
$style = '.filesize-err {'

0 commit comments

Comments
 (0)