Use json_encode() instead of removed convert_phparray_jsarray()

This commit is contained in:
Ralf Becker 2010-06-10 14:41:05 +00:00
parent 5443acbb21
commit 58ce706d2c

View File

@ -235,11 +235,11 @@ class ajax_select_widget
unset($options[$key]); unset($options[$key]);
} }
} }
$options = $GLOBALS['egw']->js->convert_phparray_jsarray("options['$name']", $options, true); $options = json_encode($options);
$GLOBALS['egw']->js->set_onload("if(!options) { $GLOBALS['egw']->js->set_onload("if(!options) {
var options = new Object(); var options = new Object();
}\n }\n
$options;\n options['$name'] = $options;
ajax_select_widget_setup('$name', '$onchange', options['$name'], '" . $GLOBALS['egw_info']['flags']['currentapp'] . "'); ajax_select_widget_setup('$name', '$onchange', options['$name'], '" . $GLOBALS['egw_info']['flags']['currentapp'] . "');
"); ");
$GLOBALS['egw']->js->validate_file('.', 'ajax_select', 'etemplate'); $GLOBALS['egw']->js->validate_file('.', 'ajax_select', 'etemplate');