Skip to content

Commit

Permalink
Tinymce doesn't need remove the images basepath
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner committed May 29, 2019
1 parent 9c2f288 commit 0c74692
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions plugins/editors/tinymce/tinymce.php
Expand Up @@ -604,19 +604,10 @@ public function onDisplay(
$isSubDir = JUri::root(true);
}

// Get specific path
$tempPath = $levelParams->get('path', '');

if (!empty($tempPath))
{
// Remove the root images path
$tempPath = str_replace(JComponentHelper::getParams('com_media')->get('image_path') . '/', '', $tempPath);
}

JText::script('PLG_TINY_ERR_UNSUPPORTEDBROWSER');

$scriptOptions['setCustomDir'] = $isSubDir;
$scriptOptions['mediaUploadPath'] = $tempPath;
$scriptOptions['mediaUploadPath'] = $levelParams->get('path', '');
$scriptOptions['uploadUri'] = $uploadUrl;
}

Expand Down Expand Up @@ -1895,19 +1886,10 @@ private function onDisplayLegacy(
$isSubDir = JUri::root(true);
}

// Get specific path
$tempPath = $this->params->get('path', '');

if (!empty($tempPath))
{
// Remove the root images path
$tempPath = str_replace(JComponentHelper::getParams('com_media')->get('image_path') . '/', '', $tempPath);
}

JText::script('PLG_TINY_ERR_UNSUPPORTEDBROWSER');

$scriptOptions['setCustomDir'] = $isSubDir;
$scriptOptions['mediaUploadPath'] = $tempPath;
$scriptOptions['mediaUploadPath'] = $this->params->get('path', '');
$scriptOptions['uploadUri'] = $uploadUrl;

$externalPlugins = array(
Expand Down

0 comments on commit 0c74692

Please sign in to comment.