When I enable elfinder module elfinder-7.08 (with elfinder library 1.2) OR elfinder-7.2x-dev (with elfinder library 2.1), my site is broken with json data when I cleare all cache or access "admin/modules". I found that elfinder alway print " echo json_encode($this->_result); in function run() { } of elFinder.class.php " when $mode = 'default' .
/**
* File browser to filesystem php connector callback for elfinder 7.2x-dev
*/
function elfinder_connector($mode = NULL) {
if (is_null($mode) && !isset($_GET['cmd'])) {
return;
}
global $base_root, $user;
like this:
/**
* File browser to filesystem php connector callback
*/
function elfinder_connector($mode = NULL) {
if (is_null($mode) && !isset($_GET['cmd'])) {
return;
}
global $base_root, $user;
/**
* Emulate json_encode required by filesystem connector for old php without JSON support
*/
if (!function_exists('json_encode')) {
.............................
All changes are in attached file. elfinder 7.08
Comments
Comment #1
trong.nguyen.tcec commentedMy code patch also works on elfinder 7.2x-dev
Comment #2
trong.nguyen.tcec commentedComment #3
ph0enix commentedComment #4
ph0enix commentedComment #5
ph0enix commentedMoved #24