After importing files I received a screen with text of JSON array log like
------------------------------------------------------------
[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"garland","theme_token":"bW1dyHhr7k64foBIJkm0y55ZlKK8nWwr8V3KWyl2xyY"}},"merge":true},{"command":"redirect","url":"\/filedepot\/folder\/217","delay":0},{"command":"modal_dismiss"}]
-----------------------------------------------------------
as result of
print ajax_render($commands);
exit;
of function filedepot_multiupload_dialog
in filedepot_multiupload.module show herebelow.
I have correct the problem with the herebelow patch :
--------------------------------------------------------------------------
function filedepot_multiupload_dialog($js = NULL) {
// Fall back if $js is not set.
if (!$js) {
return drupal_get_form('filedepot_multiupload_uploadform');
}
ctools_include('modal');
ctools_include('ajax');
ctools_add_js('ajax-responder');
drupal_add_css(drupal_get_path('module', 'filedepot') . '/css/filedepot_ctools.css');
$form_state = array(
'title' => t('New Files'),
'ajax' => TRUE,
'has_file_element' => TRUE,
);
$output = ctools_modal_form_wrapper('filedepot_multiupload_uploadform', $form_state);
if ($form_state['executed'] && ($js)) {
$cid = (int) $form_state['values']['filedepot_folder'];
$commands = array();
$commands[] = ctools_ajax_command_redirect("filedepot/folder/$cid");
$commands[] = ctools_modal_command_dismiss(t('New files success'));
print ajax_render($commands);
+ return drupal_goto('filedepot/folder/'.$cid);
- exit;
}
print ajax_render($output);
exit;
-------------------------------------------------------------------------------------------
Comments