Skip to content

Commit

Permalink
Merge pull request #125 from upiksaleh/master
Browse files Browse the repository at this point in the history
add support language and tinymce support
  • Loading branch information
MihailDev committed Oct 1, 2018
2 parents 4863f6f + 205aa10 commit 3cc3001
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public function getManagerOptions(){
$options['lang'] = $_GET['langCode'];
}

if(isset($_GET['tinymce'])){
$options['getFileCallback'] = new JsExpression('function(file, fm) { '.
'parent.tinymce.activeEditor.windowManager.getParams().oninsert(file, fm);'.
'parent.tinymce.activeEditor.windowManager.close();}');
}

if(isset($_GET['filter'])){
if(is_array($_GET['filter']))
$options['onlyMimes'] = $_GET['filter'];
Expand Down
2 changes: 1 addition & 1 deletion ElFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function init()
static function getSupportedLanguage($language)
{
$supportedLanguages = array('bg', 'jp', 'sk', 'cs', 'ko', 'th', 'de', 'lv', 'tr', 'el', 'nl', 'uk', 'he',
'es', 'no', 'vi', 'fr', 'pl', 'zh_CN', 'hr', 'pt_BR', 'zh_TW', 'hu', 'ro', 'it', 'ru', 'en');
'es', 'no', 'vi', 'fr', 'pl', 'zh_CN', 'hr', 'pt_BR', 'zh_TW', 'hu', 'ro', 'it', 'ru', 'en', 'id');

if(!in_array($language, $supportedLanguages)){
if (strpos($language, '-')){
Expand Down

0 comments on commit 3cc3001

Please sign in to comment.