Skip to content

Commit d6439d5

Browse files
authored
Tinymce doesn't need remove the images basepath (#25037)
1 parent 690cf18 commit d6439d5

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

plugins/editors/tinymce/tinymce.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -604,19 +604,10 @@ public function onDisplay(
604604
$isSubDir = JUri::root(true);
605605
}
606606

607-
// Get specific path
608-
$tempPath = $levelParams->get('path', '');
609-
610-
if (!empty($tempPath))
611-
{
612-
// Remove the root images path
613-
$tempPath = str_replace(JComponentHelper::getParams('com_media')->get('image_path') . '/', '', $tempPath);
614-
}
615-
616607
JText::script('PLG_TINY_ERR_UNSUPPORTEDBROWSER');
617608

618609
$scriptOptions['setCustomDir'] = $isSubDir;
619-
$scriptOptions['mediaUploadPath'] = $tempPath;
610+
$scriptOptions['mediaUploadPath'] = $levelParams->get('path', '');
620611
$scriptOptions['uploadUri'] = $uploadUrl;
621612
}
622613

@@ -1895,19 +1886,10 @@ private function onDisplayLegacy(
18951886
$isSubDir = JUri::root(true);
18961887
}
18971888

1898-
// Get specific path
1899-
$tempPath = $this->params->get('path', '');
1900-
1901-
if (!empty($tempPath))
1902-
{
1903-
// Remove the root images path
1904-
$tempPath = str_replace(JComponentHelper::getParams('com_media')->get('image_path') . '/', '', $tempPath);
1905-
}
1906-
19071889
JText::script('PLG_TINY_ERR_UNSUPPORTEDBROWSER');
19081890

19091891
$scriptOptions['setCustomDir'] = $isSubDir;
1910-
$scriptOptions['mediaUploadPath'] = $tempPath;
1892+
$scriptOptions['mediaUploadPath'] = $this->params->get('path', '');
19111893
$scriptOptions['uploadUri'] = $uploadUrl;
19121894

19131895
$externalPlugins = array(

0 commit comments

Comments
 (0)